Skip to content

Commit

Permalink
fix: from instance to infrastructure hour strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Aug 19, 2024
1 parent 514a0b4 commit e41242d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
24 changes: 23 additions & 1 deletion public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"cardHeading_Cores_OpenShift-metrics": "Core hours",
"cardHeading_Cores_rosa": "vCPU hour usage",
"cardHeading_Instance-hours": "Instance hours",
"cardHeading_Instance-hours_ansible-aap-managed": "infrastructure hours",
"cardHeading_Instance-hours_rosa": "Control plane hour usage",
"cardHeading_Managed-nodes": "Managed active nodes",
"cardHeading_Storage-gibibytes": "Data storage",
"cardHeading_Storage-gibibyte-months": "Data storage",
"cardHeading_Transfer-gibibytes": "Data transfer",
Expand All @@ -27,7 +29,9 @@
"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_ansible-aap-managed": "Infrastructure hours usage in hours",
"cardHeadingDescription_Instance-hours_rosa": "Control plane hours usage in hours",
"cardHeadingDescription_Managed-nodes": "Managed active nodes 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",
Expand Down Expand Up @@ -56,14 +60,17 @@
"cardHeadingMetric_monthlyTotal_vCPUs": "$t(curiosity-graph.cardHeadingMetric_monthlyTotal_Cores)",
"cardHeadingMetric_remainingCapacity_Cores_prepaid": "Remaining capacity",
"cardHeadingMetric_remainingCapacity_Instance-hours_prepaid": "Remaining capacity",
"cardHeadingMetric_remainingCapacity_Managed-nodes_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_ansible-aap-managed": "<0>{{total}}</0> Ansible infrastructure hours",
"cardBodyMetric_total_Instance-hours_prepaid_rosa": "<0>{{total}}</0> Control plane hours",
"cardBodyMetric_total_Managed-nodes_prepaid_ansible-aap-managed": "<0>{{total}}</0> Ansible managed active nodes",
"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 Down Expand Up @@ -92,6 +99,9 @@
"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_Instance-hours_prepaid_ansible-aap-managed": "Ansible infrastructure hours",
"label_Managed-nodes_on-demand": "Monthly On-Demand",
"label_Managed-nodes_prepaid": "Ansible managed active nodes",
"label_Sockets": "Sockets",
"label_Sockets_cloud": "Public cloud",
"label_Sockets_hypervisor": "Hypervisor",
Expand All @@ -106,7 +116,8 @@
"label_threshold_infinite": "<0>unlimited</0>",
"label_threshold_Cores": "Subscription threshold",
"label_threshold_Cores_rosa": "Pre-paid subscription threshold",
"label_threshold_Instance-hours_rosa": "$t(curiosity-graph.label_threshold_Cores_rosa)",
"label_threshold_Instance-hours": "$t(curiosity-graph.label_threshold_Cores_rosa)",
"label_threshold_Managed-nodes": "$t(curiosity-graph.label_threshold_Cores_rosa)",
"label_threshold_Sockets": "Subscription threshold",
"label_Transfer-gibibytes": "Data transfer",
"label_vCPUs": "$t(curiosity-graph.label_Cores)",
Expand All @@ -121,6 +132,9 @@
"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 plane hour usage.",
"legendTooltip_Instance-hours_prepaid": "Monthly <0>pre-paid</0> control plane hour usage.",
"legendTooltip_Instance-hours_prepaid_ansible-aap-managed": "Monthly <0>pre-paid</0> infrastructure hour usage.",
"legendTooltip_Managed-nodes_on-demand": "Monthly <0>On-Demand</0> vCPU hours usage.",
"legendTooltip_Managed-nodes_prepaid": "Monthly <0>pre-paid</0> managed active nodes 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 Down Expand Up @@ -163,6 +177,8 @@
"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 ROSA Hosted Control Planes pre-paid subscriptions in this account.",
"legendTooltip_threshold_Managed-nodes": "Maximum capacity, based on total Ansible managed active nodes pre-paid subscriptions in this account.",
"legendTooltip_threshold_Instance-hours_ansible-aap-managed": "Maximum capacity, as infrastructure hours, based on total Ansible managed active nodes pre-paid subscriptions in this account.",
"legendTooltip_threshold_Instance-hours_rosa": "Maximum capacity, as control plane hours, based on total ROSA Hosted Control Planes pre-paid 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.",
Expand All @@ -186,6 +202,7 @@
"tabHeading": "Inventory tabs",
"tabSubHeading": "Tab {{count}}",
"tabInstances": "Current monthly instances",
"tabInstances_ansible-aap-managed": "Current nodes",
"tabInstances_RHEL": "Current instances",
"tabInstances_RHEL for ARM": "$t(curiosity-inventory.tabInstances_RHEL)",
"tabInstances_RHEL for IBM Power": "$t(curiosity-inventory.tabInstances_RHEL)",
Expand Down Expand Up @@ -250,9 +267,11 @@
"header_Cores_OpenShift-metrics": "$t(curiosity-inventory.header_Cores_OpenShift Container Platform)",
"header_Cores_OpenShift-dedicated-metrics": "Core hours",
"header_display_name": "Name",
"header_display_name_ansible-aap-managed": "Host name",
"header_display_name_rosa": "Name (control plane)",
"header_Instance-hours": "Instance hours",
"header_Instance-hours_rosa": "Control plane hours",
"header_Managed-nodes": "Managed nodes",
"header_measurement_type": "Type",
"header_number_of_guests": "Guests",
"header_Sockets": "Sockets",
Expand Down Expand Up @@ -443,6 +462,9 @@
"title": "{{appName}}",
"subtitle": "Monitor your usage based on your subscription terms. <0>Learn more about {{appName}} reporting</0>",
"description": "Monitor your usage based on your subscription terms.",
"title_ansible-aap-managed": "Red Hat Ansible",
"subtitle_ansible-aap-managed": "Monitor your Ansible subscription and contract usage. <0>Learn more about {{appName}} reporting</0>",
"description_ansible-aap-managed": "Monitor your Ansible subscription and contract usage",
"title_openshift": "Red Hat OpenShift",
"subtitle_openshift": "Monitor your OpenShift usage for both Annual and On-Demand subscriptions. <0>Learn more about {{appName}} reporting</0>",
"description_openshift": "Monitor your OpenShift usage for both Annual and On-Demand subscriptions.",
Expand Down
25 changes: 4 additions & 21 deletions src/config/product.ansible.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,11 @@ const config = {
fill: chartColorBlueLight.value,
stroke: chartColorBlueDark.value,
color: chartColorBlueDark.value,
chartType: ChartTypeVariant.line,
query: {
[RHSM_API_QUERY_SET_TYPES.BILLING_CATEGORY]: CATEGORY_TYPES.PREPAID
}
},
{
metric: RHSM_API_PATH_METRIC_TYPES.MANAGED_NODES,
fill: chartColorGoldLight.value,
stroke: chartColorGoldDark.value,
color: chartColorGoldDark.value,
query: {
[RHSM_API_QUERY_SET_TYPES.BILLING_CATEGORY]: CATEGORY_TYPES.ON_DEMAND
}
},
{
metric: RHSM_API_PATH_METRIC_TYPES.MANAGED_NODES,
chartType: ChartTypeVariant.threshold
Expand All @@ -130,19 +122,11 @@ const config = {
fill: chartColorBlueLight.value,
stroke: chartColorBlueDark.value,
color: chartColorBlueDark.value,
chartType: ChartTypeVariant.line,
query: {
[RHSM_API_QUERY_SET_TYPES.BILLING_CATEGORY]: CATEGORY_TYPES.PREPAID
}
},
{
metric: RHSM_API_PATH_METRIC_TYPES.INSTANCE_HOURS,
fill: chartColorGoldLight.value,
stroke: chartColorGoldDark.value,
color: chartColorGoldDark.value,
query: {
[RHSM_API_QUERY_SET_TYPES.BILLING_CATEGORY]: CATEGORY_TYPES.ON_DEMAND
}
},
{
metric: RHSM_API_PATH_METRIC_TYPES.INSTANCE_HOURS,
chartType: ChartTypeVariant.threshold
Expand Down Expand Up @@ -279,6 +263,7 @@ const config = {
},
isSort: true
},
/*
{
metric: RHSM_API_PATH_METRIC_TYPES.MANAGED_NODES,
cell: ({ [RHSM_API_PATH_METRIC_TYPES.MANAGED_NODES]: total } = {}) =>
Expand Down Expand Up @@ -307,6 +292,7 @@ const config = {
isWrap: true,
width: 15
},
*/
{
metric: INVENTORY_TYPES.LAST_SEEN,
cell: ({ [INVENTORY_TYPES.LAST_SEEN]: lastSeen }) => (lastSeen && <DateFormat date={lastSeen} />) || '',
Expand Down Expand Up @@ -356,9 +342,6 @@ const config = {
}
],
initialToolbarFilters: [
{
id: RHSM_API_QUERY_SET_TYPES.BILLING_PROVIDER
},
{
id: 'rangedMonthly',
isSecondary: true,
Expand Down

0 comments on commit e41242d

Please sign in to comment.