mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
* Update the key list so it displays units correctly * Fix failing test Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
This commit is contained in:
parent
522be03417
commit
f3e31c6473
@ -38,11 +38,11 @@ export default class MetricCard extends Component<Args> {
|
||||
[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',
|
||||
},
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user