Skip to content

Commit

Permalink
feat(config): sw-925 activate rosa graph (#1135)
Browse files Browse the repository at this point in the history
* config, activate rosa graph, inventory cols
* locale, rosa strings
* rhsmServices, mock updates
  • Loading branch information
cdcabrera committed Jul 24, 2023
1 parent 57dc018 commit d89af74
Show file tree
Hide file tree
Showing 12 changed files with 1,052 additions and 88 deletions.
25 changes: 24 additions & 1 deletion public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"cardHeading_Cores_OpenShift Container Platform": "Annual subscriptions",
"cardHeading_Cores_OpenShift-dedicated-metrics": "On-Demand subscriptions",
"cardHeading_Cores_OpenShift-metrics": "Core hours",
"cardHeading_Cores_rosa": "vCPU hour usage",
"cardHeading_Instance-hours": "Instance hours",
"cardHeading_Instance-hours_rosa": "Control plan hour usage",
"cardHeading_Storage-gibibytes": "Data storage",
"cardHeading_Storage-gibibyte-months": "Data storage",
"cardHeading_Transfer-gibibytes": "Data transfer",
Expand All @@ -24,18 +26,21 @@
"cardHeadingDescription_Cores_OpenShift-dedicated-metrics": "$t(curiosity-graph.cardHeadingDescription_Cores_OpenShift-metrics)",
"cardHeadingDescription_Cores_OpenShift-metrics": "A subscription model that offers purchasing options to match your usage patterns.",
"cardHeadingDescription_Instance-hours": "Instance hours usage in hours",
"cardHeadingDescription_Instance-hours_rosa": "Control plane hours usage in hours",
"cardHeadingDescription_Sockets_OpenShift Container Platform": "$t(curiosity-graph.cardHeadingDescription_Cores_OpenShift Container Platform)",
"cardHeadingDescription_Storage-gibibytes": "Data storage usage in binary gigabyte hours",
"cardHeadingDescription_Storage-gibibyte-months": "Data storage usage in binary gigabyte months",
"cardHeadingDescription_Transfer-gibibytes": "Data transfer usage in binary gigabytes",
"cardHeadingMetric": "Total",
"cardHeadingMetric_dailyTotal": "Daily total",
"cardHeadingMetric_dailyTotal_Cores": "Daily vCPU hours",
"cardHeadingMetric_dailyTotal_Cores_prepaid": "$t(curiosity-graph.cardHeadingMetric_dailyTotal_Cores)",
"cardHeadingMetric_dailyTotal_Cores_OpenShift-dedicated-metrics": "$t(curiosity-graph.cardHeadingMetric_dailyTotal_Cores_OpenShift-metrics)",
"cardHeadingMetric_dailyTotal_Cores_OpenShift-metrics": "Daily core hours",
"cardHeadingMetric_dailyTotal_Instance-hours": "Daily instance hours",
"cardHeadingMetric_dailyTotal_Instance-hours_prepaid": "$t(curiosity-graph.cardHeadingMetric_dailyTotal_Instance-hours)",
"cardHeadingMetric_dailyTotal_Storage-gibibytes": "Daily data storage",
"cardHeadingMetric_dailyTotal_Storage-gibibyte-months": "Daily data storage",
"cardHeadingMetric_dailyTotal_Storage-gibibyte-months": "$t(curiosity-graph.cardHeadingMetric_dailyTotal_Storage-gibibytes)",
"cardHeadingMetric_dailyTotal_Transfer-gibibytes": "Daily data transfer",
"cardHeadingMetric_monthlyTotal": "Monthly total",
"cardHeadingMetric_monthlyTotal_Cores": "Monthly vCPU hours",
Expand All @@ -45,12 +50,16 @@
"cardHeadingMetric_monthlyTotal_Storage-gibibytes": "Monthly data storage",
"cardHeadingMetric_monthlyTotal_Storage-gibibyte-months": "Monthly data storage",
"cardHeadingMetric_monthlyTotal_Transfer-gibibytes": "Monthly data transfer",
"cardHeadingMetric_remainingCapacity_Cores_prepaid": "Remaining capacity",
"cardHeadingMetric_remainingCapacity_Instance-hours_prepaid": "Remaining capacity",
"cardBodyMetric": "{{context}}",
"cardBodyMetric_total": "No data",
"cardBodyMetric_total_Cores": "<0>{{total}}</0> vCPU hours",
"cardBodyMetric_total_Cores_OpenShift-dedicated-metrics": "$t(curiosity-graph.cardBodyMetric_total_Cores_OpenShift-metrics)",
"cardBodyMetric_total_Cores_OpenShift-metrics": "<0>{{total}}</0> Core hours",
"cardBodyMetric_total_Cores_prepaid_rosa": "$t(curiosity-graph.cardBodyMetric_total_Cores)",
"cardBodyMetric_total_Instance-hours": "<0>{{total}}</0> Instance hours",
"cardBodyMetric_total_Instance-hours_prepaid_rosa": "<0>{{total}}</0> Control plane hours",
"cardBodyMetric_total_Storage-gibibytes": "<0>{{total}}</0> Binary gigabyte hours",
"cardBodyMetric_total_Storage-gibibyte-months": "<0>{{total}}</0> Binary gigabyte months",
"cardBodyMetric_total_Transfer-gibibytes": "<0>{{total}}</0> Binary gigabytes",
Expand All @@ -70,9 +79,13 @@
"label_Cores_OpenShift-dedicated-metrics": "Core hours",
"label_Cores_cloud": "Public cloud",
"label_Cores_hypervisor": "Hypervisor",
"label_Cores_on-demand": "Monthly On-Demand",
"label_Cores_physical": "Physical cores",
"label_Cores_prepaid": "Monthly pre-paid",
"label_Cores_virtual": "Virtual",
"label_Instance-hours": "Instance hours",
"label_Instance-hours_on-demand": "$t(curiosity-graph.label_Cores_on-demand)",
"label_Instance-hours_prepaid": "$t(curiosity-graph.label_Cores_prepaid)",
"label_Sockets": "Sockets",
"label_Sockets_cloud": "Public cloud",
"label_Sockets_hypervisor": "Hypervisor",
Expand All @@ -86,15 +99,21 @@
"label_threshold": "Subscription threshold",
"label_threshold_infinite": "<0>unlimited</0>",
"label_threshold_Cores": "Subscription threshold",
"label_threshold_Cores_rosa": "Pre-paid threshold",
"label_threshold_Instance-hours_rosa": "$t(curiosity-graph.label_threshold_Cores_rosa)",
"label_threshold_Sockets": "Subscription threshold",
"label_Transfer-gibibytes": "Data transfer",
"legendTooltip": "{{product}} metric usage",
"legendTooltip_Cores": "vCPU hours usage",
"legendTooltip_Cores_OpenShift Container Platform": "{{product}} CPU usage, per CPU core.",
"legendTooltip_Cores_OpenShift-metrics": "OpenShift Container Platform <0>On-Demand</0> core hour usage.",
"legendTooltip_Cores_OpenShift-dedicated-metrics": "OpenShift Dedicated <0>On-Demand</0> core hour usage.",
"legendTooltip_Cores_on-demand": "Monthly <0>On-Demand</0> vCPU hours usage.",
"legendTooltip_Cores_prepaid": "Monthly <0>pre-paid</0> vCPU hours usage.",
"legendTooltip_Instance-hours": "Instance hours usage",
"legendTooltip_Instance-hours_OpenShift-dedicated-metrics": "OpenShift Dedicated <0>On-Demand</0> instance hour usage.",
"legendTooltip_Instance-hours_on-demand": "Monthly <0>On-Demand</0> Control plan hour usage.",
"legendTooltip_Instance-hours_prepaid": "Monthly <0>pre-paid</0> Control plan hour usage.",
"legendTooltip_Sockets": "{{product}} CPU usage, per CPU socket pair.",
"legendTooltip_Sockets_cloud": "Public cloud {{product}} CPU usage, per socket. Each instance is considered a single socket.",
"legendTooltip_Sockets_hypervisor": "{{product}} CPU socket usage, per socket pair.",
Expand All @@ -121,6 +140,8 @@
"legendTooltip_Storage-gibibytes": "Data storage usage",
"legendTooltip_Storage-gibibyte-months": "Data storage usage",
"legendTooltip_threshold_Cores_OpenShift Container Platform": "Maximum capacity, as CPU cores, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_threshold_Cores_rosa": "Maximum capacity, as vCPU hours, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_threshold_Instance-hours_rosa": "Maximum capacity, as Control plan hours, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_threshold_Sockets": "Maximum capacity, based on total {{product}} subscriptions in this account.",
"legendTooltip_threshold_Sockets_OpenShift Container Platform": "Maximum capacity, as CPU sockets, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_threshold_Sockets_rhel": "$t(curiosity-graph.legendTooltip_threshold_Sockets_RHEL)",
Expand Down Expand Up @@ -208,11 +229,13 @@
"header_coreHours": "Core hours",
"header_displayName": "Name",
"header_display_name": "Name",
"header_display_name_rosa": "Name (control plane)",
"header_guestsDisplayName": "Guest name",
"header_hardwareType": "Type",
"header_instanceHours": "Instance hours",
"header_instance_hours": "Instance hours",
"header_Instance-hours": "Instance hours",
"header_Instance-hours_rosa": "Control plane hours",
"header_measurementType": "Type",
"header_measurement_type": "Type",
"header_number_of_guests": "Guests",
Expand Down
30 changes: 27 additions & 3 deletions src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,32 @@ exports[`I18n Component should generate a predictable locale key output snapshot
"file": "src/config/product.rosa.js",
"keys": [
{
"key": "curiosity-inventory.measurement",
"match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.CORES, total: helpers.numberDisplay(total?.value)",
"key": "curiosity-graph.cardHeadingMetric",
"match": "translate('curiosity-graph.cardHeadingMetric', { context: ['dailyTotal', dataSets?.[0]?.display?.chartId], testId: 'graphDailyTotalCard-header' })",
},
{
"key": "curiosity-graph.cardBodyMetric",
"match": "translate( 'curiosity-graph.cardBodyMetric', { context: ['total', dataSets?.[0]?.display?.dailyHasData && dataSets?.[0]?.display?.chartId], testId: 'graphDailyTotalCard-body', total: helpers .numberDisplay(dataSets?.[0]?.display?.dailyValue)",
},
{
"key": "curiosity-graph.cardFooterMetric",
"match": "translate('curiosity-graph.cardFooterMetric', { date: moment .utc(dataSets?.[0]?.display?.dailyDate)",
},
{
"key": "curiosity-graph.cardHeadingMetric",
"match": "translate('curiosity-graph.cardHeadingMetric', { context: ['remainingCapacity', dataSets?.[0]?.display?.chartId], testId: 'graphRemainingCapacityCard-header' })",
},
{
"key": "curiosity-graph.cardBodyMetric",
"match": "translate( 'curiosity-graph.cardBodyMetric', { context: ['total', dataSets?.[0]?.display?.remainingCapacityHasData && dataSets?.[0]?.display?.chartId], testId: 'graphRemainingCapacityCard-body', total: helpers .numberDisplay(dataSets?.[0]?.display?.remainingCapacity)",
},
{
"key": "curiosity-graph.cardFooterMetric",
"match": "translate('curiosity-graph.cardFooterMetric', { date: moment .utc(dataSets?.[0]?.display?.dailyDate)",
},
{
"key": "curiosity-graph.label_axisX",
"match": "translate('curiosity-graph.label_axisX', { context: GRANULARITY_TYPES.DAILY })",
},
],
},
Expand Down Expand Up @@ -1076,7 +1100,7 @@ exports[`I18n Component should have locale keys that exist in the default langua
},
{
"file": "src/config/product.rosa.js",
"key": "curiosity-inventory.measurement",
"key": "curiosity-graph.label_axisX",
},
{
"file": "src/config/product.satellite.js",
Expand Down
19 changes: 1 addition & 18 deletions src/config/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@

exports[`Configuration should have a consistent route configuration: inconsistent entries 1`] = `[]`;

exports[`Configuration should have consistent product configuration: inconsistent entries 1`] = `
[
{
"Entry 7, rosa inconsistent": {
"graphTallyQuery": "PASS",
"initialGraphFilters": "FAIL",
"initialInventoryFilters": "PASS",
"inventoryHostsQuery": "PASS",
"productGroup": "PASS",
"productId": "PASS",
"productLabel": "PASS",
"productPath": "PASS",
"query": "PASS",
"viewId": "PASS",
},
},
]
`;
exports[`Configuration should have consistent product configuration: inconsistent entries 1`] = `[]`;

exports[`Configuration should have consistent product configuration: products 1`] = `
[
Expand Down
Loading

0 comments on commit d89af74

Please sign in to comment.