added optional currencies config
Signed-off-by: Vannarath Poeu <vannarath.poeu@gmail.com>
This commit is contained in:
@@ -148,6 +148,36 @@ costInsights:
|
||||
name: Metric C
|
||||
```
|
||||
|
||||
### Currencies (Optional)
|
||||
|
||||
In the `Cost Overview` panel, users can choose from a dropdown of currencies to see costs in, such as Engineers or USD. Currencies must be defined as keys on the `currencies` field. A user-friendly label and unit are **required**. If not set, the `defaultCurrencies` in `currenc.ts` will be used.
|
||||
|
||||
A currency without `kind` is reserved to calculate cost for `engineers`. There should only be one currency without `kind`.
|
||||
|
||||
```yaml
|
||||
## ./app-config.yaml
|
||||
costInsights:
|
||||
engineerCost: 200000
|
||||
products:
|
||||
productA:
|
||||
name: Some Cloud Product
|
||||
icon: storage
|
||||
productB:
|
||||
name: Some Other Cloud Product
|
||||
icon: data
|
||||
currencies:
|
||||
metricA:
|
||||
currencyA:
|
||||
label: Currency A
|
||||
unit: Unit A
|
||||
currencyB:
|
||||
label: Currency B
|
||||
kind: CURRENCY_B
|
||||
unit: Unit B
|
||||
prefix: B
|
||||
rate: 3.5
|
||||
```
|
||||
|
||||
## Alerts
|
||||
|
||||
The CostInsightsApi `getAlerts` method may return any type of alert or recommendation (called collectively "Action Items" in Cost Insights) that implements the [Alert type](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Alert.ts). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations.
|
||||
|
||||
Reference in New Issue
Block a user