Skip to content

Commit

Permalink
Merge pull request #3957 from dlabrecq/cost-model
Browse files Browse the repository at this point in the history
Refactor "cost distribution" layout for cost model
  • Loading branch information
dlabrecq authored Jul 29, 2024
2 parents f12a724 + 8e74bac commit eb92acc
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 316 deletions.
54 changes: 30 additions & 24 deletions locales/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3663,6 +3663,24 @@
"value": "value"
}
],
"distributeCostsToProjects": [
{
"type": 0,
"value": "Distribute these costs to projects, based on the above description type"
}
],
"distributeNetwork": [
{
"type": 0,
"value": "Network traffic"
}
],
"distributePlatform": [
{
"type": 0,
"value": "Platform overhead (OpenShift services)"
}
],
"distributePlatformCosts": [
{
"options": {
Expand Down Expand Up @@ -3690,6 +3708,12 @@
"value": "value"
}
],
"distributeStorage": [
{
"type": 0,
"value": "Storage"
}
],
"distributeUnallocatedCapacity": [
{
"options": {
Expand Down Expand Up @@ -3717,6 +3741,12 @@
"value": "value"
}
],
"distributeWorker": [
{
"type": 0,
"value": "Worker unallowcated (unused and non-reserved resources)"
}
],
"distributionModelDesc": [
{
"type": 0,
Expand Down Expand Up @@ -3756,12 +3786,6 @@
"value": "type"
}
],
"doNotDistribute": [
{
"type": 0,
"value": "Do not distribute"
}
],
"docsAddOcpSources": [
{
"type": 0,
Expand Down Expand Up @@ -10745,18 +10769,6 @@
"value": "count"
}
],
"network": [
{
"type": 0,
"value": "Network"
}
],
"networkDesc": [
{
"type": 0,
"value": "Distribute the cost of network traffic to projects based on distribution type."
}
],
"next": [
{
"type": 0,
Expand Down Expand Up @@ -12554,12 +12566,6 @@
"value": "StorageClass"
}
],
"storageDesc": [
{
"type": 0,
"value": "Distribute the cost of storage to projects based on distribution type."
}
],
"suggestions": [
{
"type": 0,
Expand Down
9 changes: 5 additions & 4 deletions locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,16 @@
"discountMinus": "Discount (-)",
"distribute": "Distribute",
"distributeCosts": "{value, select, true {Distribute {type, select, network {network} storage {storage} other {}} costs}false {Do not distribute {type, select, network {network} storage {storage} other {}} costs}other {}}",
"distributeCostsToProjects": "Distribute these costs to projects, based on the above description type",
"distributeNetwork": "Network traffic",
"distributePlatform": "Platform overhead (OpenShift services)",
"distributePlatformCosts": "{value, select, true {Distribute platform costs}false {Do not distribute platform costs}other {}}",
"distributeStorage": "Storage",
"distributeUnallocatedCapacity": "{value, select, true {Distribute worker unallocated capacity}false {Do not distribute worker unallocated capacity}other {}}",
"distributeWorker": "Worker unallowcated (unused and non-reserved resources)",
"distributionModelDesc": "Choose how your raw costs are distributed at the project level.",
"distributionType": "Distribution type",
"distributionTypeDesc": "{type, select, cpu {Distribute costs based on CPU usage}memory {Distribute costs based on memory usage}other {}}",
"doNotDistribute": "Do not distribute",
"docsAddOcpSources": "https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management",
"docsCostCategory": "https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/managing_cost_data_using_tagging/assembly-configuring-tags-and-labels-in-cost-management#configuring-categories_configuring-tags-int",
"docsCostModelTerminology": "https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html-single/using_cost_models/index#cost-model-terminology",
Expand Down Expand Up @@ -392,8 +396,6 @@
"monthOverMonthChange": "Month over month change",
"moreOptions": "More options",
"names": "{count, plural, one {Name} other {Names}}",
"network": "Network",
"networkDesc": "Distribute the cost of network traffic to projects based on distribution type.",
"next": "next",
"no": "No",
"noDataForDate": "No data available for {dateRange}",
Expand Down Expand Up @@ -562,7 +564,6 @@
"statusActions": "Status/Actions",
"storage": "Storage",
"storageClass": "StorageClass",
"storageDesc": "Distribute the cost of storage to projects based on distribution type.",
"suggestions": "Suggestions",
"sumPlatformCosts": "Sum platform costs",
"summary": "Summary",
Expand Down
45 changes: 25 additions & 20 deletions src/locales/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,21 @@ export default defineMessages({
description: 'distribute costs',
id: 'distributeCosts',
},
distributeCostsToProjects: {
defaultMessage: 'Distribute these costs to projects, based on the above description type',
description: 'Distribute these costs to projects, based on the above description type',
id: 'distributeCostsToProjects',
},
distributeNetwork: {
defaultMessage: 'Network traffic',
description: 'Network traffic',
id: 'distributeNetwork',
},
distributePlatform: {
defaultMessage: 'Platform overhead (OpenShift services)',
description: 'Platform overhead (OpenShift services)',
id: 'distributePlatform',
},
distributePlatformCosts: {
defaultMessage:
'{value, select, ' +
Expand All @@ -1463,6 +1478,11 @@ export default defineMessages({
description: 'Distribute platform costs',
id: 'distributePlatformCosts',
},
distributeStorage: {
defaultMessage: 'Storage',
description: 'Storage',
id: 'distributeStorage',
},
distributeUnallocatedCapacity: {
defaultMessage:
'{value, select, ' +
Expand All @@ -1472,6 +1492,11 @@ export default defineMessages({
description: 'Distribute unallocated capacity',
id: 'distributeUnallocatedCapacity',
},
distributeWorker: {
defaultMessage: 'Worker unallowcated (unused and non-reserved resources)',
description: 'Worker unallowcated (unused and non-reserved resources)',
id: 'distributeWorker',
},
distributionModelDesc: {
defaultMessage: 'Choose how your raw costs are distributed at the project level.',
description: 'Choose how your raw costs are distributed at the project level.',
Expand All @@ -1491,11 +1516,6 @@ export default defineMessages({
description: 'Distribution type description',
id: 'distributionTypeDesc',
},
doNotDistribute: {
defaultMessage: 'Do not distribute',
description: 'Do not distribute',
id: 'doNotDistribute',
},
docsAddOcpSources: {
defaultMessage:
'https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management',
Expand Down Expand Up @@ -2529,16 +2549,6 @@ export default defineMessages({
description: 'Name plural or singular',
id: 'names',
},
network: {
defaultMessage: 'Network',
description: 'Network',
id: 'network',
},
networkDesc: {
defaultMessage: 'Distribute the cost of network traffic to projects based on distribution type.',
description: 'Distribute the cost of network traffic to projects based on distribution type.',
id: 'networkDesc',
},
next: {
defaultMessage: 'next',
description: 'next',
Expand Down Expand Up @@ -3454,11 +3464,6 @@ export default defineMessages({
description: 'StorageClass',
id: 'storageClass',
},
storageDesc: {
defaultMessage: 'Distribute the cost of storage to projects based on distribution type.',
description: 'Distribute the cost of storage to projects based on distribution type.',
id: 'storageDesc',
},
suggestions: {
defaultMessage: 'Suggestions',
description: 'Suggestions',
Expand Down
Loading

0 comments on commit eb92acc

Please sign in to comment.