Skip to content

Commit eb92acc

Browse files
authored
Merge pull request #3957 from dlabrecq/cost-model
Refactor "cost distribution" layout for cost model
2 parents f12a724 + 8e74bac commit eb92acc

File tree

6 files changed

+145
-316
lines changed

6 files changed

+145
-316
lines changed

locales/data.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,6 +3663,24 @@
36633663
"value": "value"
36643664
}
36653665
],
3666+
"distributeCostsToProjects": [
3667+
{
3668+
"type": 0,
3669+
"value": "Distribute these costs to projects, based on the above description type"
3670+
}
3671+
],
3672+
"distributeNetwork": [
3673+
{
3674+
"type": 0,
3675+
"value": "Network traffic"
3676+
}
3677+
],
3678+
"distributePlatform": [
3679+
{
3680+
"type": 0,
3681+
"value": "Platform overhead (OpenShift services)"
3682+
}
3683+
],
36663684
"distributePlatformCosts": [
36673685
{
36683686
"options": {
@@ -3690,6 +3708,12 @@
36903708
"value": "value"
36913709
}
36923710
],
3711+
"distributeStorage": [
3712+
{
3713+
"type": 0,
3714+
"value": "Storage"
3715+
}
3716+
],
36933717
"distributeUnallocatedCapacity": [
36943718
{
36953719
"options": {
@@ -3717,6 +3741,12 @@
37173741
"value": "value"
37183742
}
37193743
],
3744+
"distributeWorker": [
3745+
{
3746+
"type": 0,
3747+
"value": "Worker unallowcated (unused and non-reserved resources)"
3748+
}
3749+
],
37203750
"distributionModelDesc": [
37213751
{
37223752
"type": 0,
@@ -3756,12 +3786,6 @@
37563786
"value": "type"
37573787
}
37583788
],
3759-
"doNotDistribute": [
3760-
{
3761-
"type": 0,
3762-
"value": "Do not distribute"
3763-
}
3764-
],
37653789
"docsAddOcpSources": [
37663790
{
37673791
"type": 0,
@@ -10745,18 +10769,6 @@
1074510769
"value": "count"
1074610770
}
1074710771
],
10748-
"network": [
10749-
{
10750-
"type": 0,
10751-
"value": "Network"
10752-
}
10753-
],
10754-
"networkDesc": [
10755-
{
10756-
"type": 0,
10757-
"value": "Distribute the cost of network traffic to projects based on distribution type."
10758-
}
10759-
],
1076010772
"next": [
1076110773
{
1076210774
"type": 0,
@@ -12554,12 +12566,6 @@
1255412566
"value": "StorageClass"
1255512567
}
1255612568
],
12557-
"storageDesc": [
12558-
{
12559-
"type": 0,
12560-
"value": "Distribute the cost of storage to projects based on distribution type."
12561-
}
12562-
],
1256312569
"suggestions": [
1256412570
{
1256512571
"type": 0,

locales/translations.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,16 @@
247247
"discountMinus": "Discount (-)",
248248
"distribute": "Distribute",
249249
"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 {}}",
250+
"distributeCostsToProjects": "Distribute these costs to projects, based on the above description type",
251+
"distributeNetwork": "Network traffic",
252+
"distributePlatform": "Platform overhead (OpenShift services)",
250253
"distributePlatformCosts": "{value, select, true {Distribute platform costs}false {Do not distribute platform costs}other {}}",
254+
"distributeStorage": "Storage",
251255
"distributeUnallocatedCapacity": "{value, select, true {Distribute worker unallocated capacity}false {Do not distribute worker unallocated capacity}other {}}",
256+
"distributeWorker": "Worker unallowcated (unused and non-reserved resources)",
252257
"distributionModelDesc": "Choose how your raw costs are distributed at the project level.",
253258
"distributionType": "Distribution type",
254259
"distributionTypeDesc": "{type, select, cpu {Distribute costs based on CPU usage}memory {Distribute costs based on memory usage}other {}}",
255-
"doNotDistribute": "Do not distribute",
256260
"docsAddOcpSources": "https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management",
257261
"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",
258262
"docsCostModelTerminology": "https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html-single/using_cost_models/index#cost-model-terminology",
@@ -392,8 +396,6 @@
392396
"monthOverMonthChange": "Month over month change",
393397
"moreOptions": "More options",
394398
"names": "{count, plural, one {Name} other {Names}}",
395-
"network": "Network",
396-
"networkDesc": "Distribute the cost of network traffic to projects based on distribution type.",
397399
"next": "next",
398400
"no": "No",
399401
"noDataForDate": "No data available for {dateRange}",
@@ -562,7 +564,6 @@
562564
"statusActions": "Status/Actions",
563565
"storage": "Storage",
564566
"storageClass": "StorageClass",
565-
"storageDesc": "Distribute the cost of storage to projects based on distribution type.",
566567
"suggestions": "Suggestions",
567568
"sumPlatformCosts": "Sum platform costs",
568569
"summary": "Summary",

src/locales/messages.ts

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,21 @@ export default defineMessages({
14541454
description: 'distribute costs',
14551455
id: 'distributeCosts',
14561456
},
1457+
distributeCostsToProjects: {
1458+
defaultMessage: 'Distribute these costs to projects, based on the above description type',
1459+
description: 'Distribute these costs to projects, based on the above description type',
1460+
id: 'distributeCostsToProjects',
1461+
},
1462+
distributeNetwork: {
1463+
defaultMessage: 'Network traffic',
1464+
description: 'Network traffic',
1465+
id: 'distributeNetwork',
1466+
},
1467+
distributePlatform: {
1468+
defaultMessage: 'Platform overhead (OpenShift services)',
1469+
description: 'Platform overhead (OpenShift services)',
1470+
id: 'distributePlatform',
1471+
},
14571472
distributePlatformCosts: {
14581473
defaultMessage:
14591474
'{value, select, ' +
@@ -1463,6 +1478,11 @@ export default defineMessages({
14631478
description: 'Distribute platform costs',
14641479
id: 'distributePlatformCosts',
14651480
},
1481+
distributeStorage: {
1482+
defaultMessage: 'Storage',
1483+
description: 'Storage',
1484+
id: 'distributeStorage',
1485+
},
14661486
distributeUnallocatedCapacity: {
14671487
defaultMessage:
14681488
'{value, select, ' +
@@ -1472,6 +1492,11 @@ export default defineMessages({
14721492
description: 'Distribute unallocated capacity',
14731493
id: 'distributeUnallocatedCapacity',
14741494
},
1495+
distributeWorker: {
1496+
defaultMessage: 'Worker unallowcated (unused and non-reserved resources)',
1497+
description: 'Worker unallowcated (unused and non-reserved resources)',
1498+
id: 'distributeWorker',
1499+
},
14751500
distributionModelDesc: {
14761501
defaultMessage: 'Choose how your raw costs are distributed at the project level.',
14771502
description: 'Choose how your raw costs are distributed at the project level.',
@@ -1491,11 +1516,6 @@ export default defineMessages({
14911516
description: 'Distribution type description',
14921517
id: 'distributionTypeDesc',
14931518
},
1494-
doNotDistribute: {
1495-
defaultMessage: 'Do not distribute',
1496-
description: 'Do not distribute',
1497-
id: 'doNotDistribute',
1498-
},
14991519
docsAddOcpSources: {
15001520
defaultMessage:
15011521
'https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management',
@@ -2529,16 +2549,6 @@ export default defineMessages({
25292549
description: 'Name plural or singular',
25302550
id: 'names',
25312551
},
2532-
network: {
2533-
defaultMessage: 'Network',
2534-
description: 'Network',
2535-
id: 'network',
2536-
},
2537-
networkDesc: {
2538-
defaultMessage: 'Distribute the cost of network traffic to projects based on distribution type.',
2539-
description: 'Distribute the cost of network traffic to projects based on distribution type.',
2540-
id: 'networkDesc',
2541-
},
25422552
next: {
25432553
defaultMessage: 'next',
25442554
description: 'next',
@@ -3454,11 +3464,6 @@ export default defineMessages({
34543464
description: 'StorageClass',
34553465
id: 'storageClass',
34563466
},
3457-
storageDesc: {
3458-
defaultMessage: 'Distribute the cost of storage to projects based on distribution type.',
3459-
description: 'Distribute the cost of storage to projects based on distribution type.',
3460-
id: 'storageDesc',
3461-
},
34623467
suggestions: {
34633468
defaultMessage: 'Suggestions',
34643469
description: 'Suggestions',

0 commit comments

Comments
 (0)