diff --git a/ui/app/components/billing/metric-card.ts b/ui/app/components/billing/metric-card.ts index ae53ab77e7..6ca2b9e02d 100644 --- a/ui/app/components/billing/metric-card.ts +++ b/ui/app/components/billing/metric-card.ts @@ -38,11 +38,11 @@ export default class MetricCard extends Component { [NormalizedBillingMetrics.STATIC_SECRETS_KV]: { label: 'KV Secrets', }, - [NormalizedBillingMetrics.DYNAMIC_ROLES]: { + [NormalizedBillingMetrics.DYNAMIC_ROLES_TOTAL]: { label: 'Dynamic roles', tooltipText: 'Highest number of dynamic roles for the month', }, - [NormalizedBillingMetrics.STATIC_ROLES]: { + [NormalizedBillingMetrics.AUTO_ROTATED_ROLES_TOTAL]: { label: 'Static roles', tooltipText: 'Highest number of static roles for the month', }, diff --git a/ui/app/components/billing/page/overview.ts b/ui/app/components/billing/page/overview.ts index c19f1e1bea..adbc28f923 100644 --- a/ui/app/components/billing/page/overview.ts +++ b/ui/app/components/billing/page/overview.ts @@ -31,8 +31,8 @@ export default class BillingPageOverview extends Component { detailsByMetric = { Secrets: [ NormalizedBillingMetrics.STATIC_SECRETS_KV, - NormalizedBillingMetrics.DYNAMIC_ROLES, - NormalizedBillingMetrics.STATIC_ROLES, + NormalizedBillingMetrics.DYNAMIC_ROLES_TOTAL, + NormalizedBillingMetrics.AUTO_ROTATED_ROLES_TOTAL, ], 'Credential units': [ NormalizedBillingMetrics.PKI_UNITS_TOTAL, diff --git a/ui/app/utils/metrics-helpers.ts b/ui/app/utils/metrics-helpers.ts index 06b03d124b..bbc1b3157d 100644 --- a/ui/app/utils/metrics-helpers.ts +++ b/ui/app/utils/metrics-helpers.ts @@ -6,23 +6,24 @@ import type { Month, NormalizedMetricsData } from 'vault/vault/billing/overview'; export enum NormalizedBillingMetrics { + AUTO_ROTATED_ROLES_TOTAL = 'auto_rotated_roles_total', + DATA_PROTECTION_CALLS_TOTAL = 'data_protection_calls_total', DATA_PROTECTION_CALLS_TRANSFORM = 'data_protection_calls_transform', DATA_PROTECTION_CALLS_TRANSIT = 'data_protection_calls_transit', - DYNAMIC_ROLES = 'dynamic_roles', + DYNAMIC_ROLES_TOTAL = 'dynamic_roles_total', + EXTERNAL_PLUGINS_TOTAL = 'external_plugins_total', KMIP_USED_IN_MONTH = 'kmip_used_in_month', MANAGED_KEYS = 'managed_keys', MANAGED_KEYS_KMSE = 'managed_keys_kmse', + MANAGED_KEYS_TOTAL = 'managed_keys_total', MANAGED_KEYS_TOTP = 'managed_keys_totp', PKI_UNITS_TOTAL = 'pki_units_total', SSH_UNITS = 'ssh_units', SSH_UNITS_CERTIFICATE_UNITS = 'ssh_units_certificate_units', SSH_UNITS_OTP_UNITS = 'ssh_units_otp_units', - STATIC_ROLES = 'static_roles', + SSH_UNITS_TOTAL = 'ssh_units_total', STATIC_SECRETS_KV = 'static_secrets_kv', STATIC_SECRETS_TOTAL = 'static_secrets_total', - DATA_PROTECTION_CALLS_TOTAL = `data_protection_calls_total`, - MANAGED_KEYS_TOTAL = `managed_keys_total`, - EXTERNAL_PLUGINS_TOTAL = 'external_plugins_total', } export enum BillingMetricsKeys { diff --git a/ui/tests/acceptance/billing/overview-test.js b/ui/tests/acceptance/billing/overview-test.js index 1e3fe0b506..a16c29f10c 100644 --- a/ui/tests/acceptance/billing/overview-test.js +++ b/ui/tests/acceptance/billing/overview-test.js @@ -193,10 +193,10 @@ module('Acceptance | billing/overview', function (hooks) { assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.STATIC_SECRETS_KV)).exists(); assert.dom(SELECTORS.metricDetailValue(NormalizedBillingMetrics.STATIC_SECRETS_KV)).hasText('10'); - assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.DYNAMIC_ROLES)).exists(); - assert.dom(SELECTORS.metricDetailValue(NormalizedBillingMetrics.DYNAMIC_ROLES)).hasText('0'); - assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.STATIC_ROLES)).exists(); - assert.dom(SELECTORS.metricDetailValue(NormalizedBillingMetrics.STATIC_ROLES)).hasText('0'); + assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.DYNAMIC_ROLES_TOTAL)).exists(); + assert.dom(SELECTORS.metricDetailValue(NormalizedBillingMetrics.DYNAMIC_ROLES_TOTAL)).hasText('60'); + assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.AUTO_ROTATED_ROLES_TOTAL)).exists(); + assert.dom(SELECTORS.metricDetailValue(NormalizedBillingMetrics.AUTO_ROTATED_ROLES_TOTAL)).hasText('30'); assert.dom(GENERAL.cardContainer('Credential units')).exists(); assert.dom(SELECTORS.metricDetail(NormalizedBillingMetrics.PKI_UNITS_TOTAL)).exists(); diff --git a/ui/tests/unit/utils/metric-helpers-test.js b/ui/tests/unit/utils/metric-helpers-test.js index 9cee7f990f..064322bb16 100644 --- a/ui/tests/unit/utils/metric-helpers-test.js +++ b/ui/tests/unit/utils/metric-helpers-test.js @@ -77,7 +77,6 @@ module('Unit | Utility | metric utils', function () { data_protection_calls_total: 0, data_protection_calls_transform: 0, data_protection_calls_transit: 0, - dynamic_roles: 0, dynamic_roles_total: 0, external_plugins_total: 0, kmip_used_in_month: false, @@ -89,7 +88,7 @@ module('Unit | Utility | metric utils', function () { ssh_units: 0, ssh_units_certificate_units: 0, ssh_units_otp_units: 0, - static_roles: 0, + ssh_units_total: 0, static_secrets_kv: 0, static_secrets_total: 0, };