mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-15 19:17:02 +02:00
* Client count updates - Added Current month tab which leverages partial monthly activity api - Refactored Vault usage to Monthly history - New client count history component based on StatText and BarChart component - Restrict bar chart to showcase only top 10 namespaces - Removed config route, as config and history component will be rendered based on query param - Updated all metrics reference to clients - Removed old tests and added integration test for current month * Fixed navbar permission - Added changelog * Updated the model for current month data * Fixed current month tests * Fixed indentation and chart label
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import Model, { attr } from '@ember-data/model';
|
||
import { computed } from '@ember/object';
|
||
import attachCapabilities from 'vault/lib/attach-capabilities';
|
||
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||
import { apiPath } from 'vault/macros/lazy-capabilities';
|
||
|
||
const M = Model.extend({
|
||
queriesAvailable: attr('boolean'),
|
||
defaultReportMonths: attr('number', {
|
||
label: 'Default display',
|
||
subText: 'The number of months we’ll display in the Vault usage dashboard by default.',
|
||
}),
|
||
retentionMonths: attr('number', {
|
||
label: 'Retention period',
|
||
subText: 'The number of months of activity logs to maintain for client tracking.',
|
||
}),
|
||
enabled: attr('string', {
|
||
editType: 'boolean',
|
||
trueValue: 'On',
|
||
falseValue: 'Off',
|
||
label: 'Enable usage data collection',
|
||
helpText:
|
||
'Enable or disable client tracking. Keep in mind that disabling tracking will delete the data for the current month.',
|
||
}),
|
||
|
||
configAttrs: computed(function() {
|
||
let keys = ['enabled', 'defaultReportMonths', 'retentionMonths'];
|
||
return expandAttributeMeta(this, keys);
|
||
}),
|
||
});
|
||
|
||
export default attachCapabilities(M, {
|
||
configPath: apiPath`sys/internal/counters/config`,
|
||
});
|