Skip to content

Commit

Permalink
Merge pull request #897 from dlabrecq/254-sources-of-spend
Browse files Browse the repository at this point in the history
UI to show new sources of spend
  • Loading branch information
dlabrecq authored Dec 5, 2023
2 parents 1f68894 + f7023cc commit 0e793c0
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
24 changes: 24 additions & 0 deletions locales/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,14 @@
}
]
},
"embedded": {
"value": [
{
"type": 0,
"value": "Embedded"
}
]
},
"gcp": {
"value": [
{
Expand All @@ -1287,6 +1295,14 @@
}
]
},
"oem": {
"value": [
{
"type": 0,
"value": "OEM"
}
]
},
"on_demand": {
"value": [
{
Expand All @@ -1298,6 +1314,14 @@
"other": {
"value": []
},
"svp": {
"value": [
{
"type": 0,
"value": "SVP"
}
]
},
"training": {
"value": [
{
Expand Down
2 changes: 1 addition & 1 deletion locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"percent": "{value} %",
"secondaryGroupByLabel": "Secondary group by",
"sourceOfSpendLabel": "View",
"sourceOfSpendValues": "{value, select, all {All sources of spend} aws {Amazon Web Services} azure {Azure} ccsp {CCSP} consulting {Consulting} gcp {Google Cloud Platform} miscellaneous {Miscellaneous} oci {Oracle Cloud Infrastructure} on_demand {On-demand subscriptions} training {Training} yearly_subscriptions {Yearly subscriptions} other {}}",
"sourceOfSpendValues": "{value, select, all {All sources of spend} aws {Amazon Web Services} azure {Azure} ccsp {CCSP} consulting {Consulting} embedded {Embedded} gcp {Google Cloud Platform} miscellaneous {Miscellaneous} oci {Oracle Cloud Infrastructure} oem {OEM} on_demand {On-demand subscriptions} svp {SVP} training {Training} yearly_subscriptions {Yearly subscriptions} other {}}",
"suggestions": "Suggestions",
"viewDetails": "View details"
}
3 changes: 3 additions & 0 deletions src/locales/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,13 @@ export default defineMessages({
'azure {Azure} ' +
'ccsp {CCSP} ' +
'consulting {Consulting} ' +
'embedded {Embedded} ' +
'gcp {Google Cloud Platform} ' +
'miscellaneous {Miscellaneous} ' +
'oci {Oracle Cloud Infrastructure} ' +
'oem {OEM} ' +
'on_demand {On-demand subscriptions} ' +
'svp {SVP} ' +
'training {Training} ' +
'yearly_subscriptions {Yearly subscriptions} ' +
'other {}}',
Expand Down
9 changes: 9 additions & 0 deletions src/routes/details/DetailsHeaderToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ const DetailsHeaderToolbar: React.FC<DetailsToolbarProps> = ({
case SourceOfSpendType.consulting:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.consulting });
break;
case SourceOfSpendType.embedded:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.embedded });
break;
case SourceOfSpendType.gcp:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.gcp });
break;
Expand All @@ -213,9 +216,15 @@ const DetailsHeaderToolbar: React.FC<DetailsToolbarProps> = ({
case SourceOfSpendType.on_demand:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.on_demand });
break;
case SourceOfSpendType.oem:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.oem });
break;
case SourceOfSpendType.oci:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.oci });
break;
case SourceOfSpendType.svp:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.svp });
break;
case SourceOfSpendType.training:
newOptions.push({ label: messages.sourceOfSpendValues, value: SourceOfSpendType.training });
break;
Expand Down
3 changes: 3 additions & 0 deletions src/routes/details/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ export enum SourceOfSpendType {
azure = 'azure',
ccsp = 'ccsp',
consulting = 'consulting',
embedded = 'embedded',
gcp = 'gcp',
miscellaneous = 'miscellaneous',
none = 'none',
oci = 'oci',
oem = 'oem',
on_demand = 'on_demand',
svp = 'svp',
training = 'training',
yearlySubscriptions = 'yearly_subscriptions',
}
Expand Down

0 comments on commit 0e793c0

Please sign in to comment.