Metrictank: Fix meta inspector consolidator field names (#23838)

to match https://github.com/grafana/metrictank/pull/1798
This commit is contained in:
Dieter Plaetinck 2020-04-28 11:48:21 +03:00 committed by GitHub
parent 94e28cb65b
commit 3d17d63891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,7 @@ export class MetricTankMetaInspector extends PureComponent<Props, State> {
const buckets = parseSchemaRetentions(meta['schema-retentions']);
const rollupNotice = getRollupNotice([meta]);
const runtimeNotice = getRuntimeConsolidationNotice([meta]);
const normFunc = (meta['consolidate-normfetch'] || '').replace('Consolidator', '');
const normFunc = (meta['consolidator-normfetch'] || '').replace('Consolidator', '');
let totalSeconds = 0;

View File

@ -38,7 +38,7 @@ export function getRollupNotice(metaList: MetricTankSeriesMeta[]): QueryResultMe
if (archiveIndex > 0) {
const schema = parseSchemaRetentions(meta['schema-retentions']);
const intervalString = schema[archiveIndex].interval;
const func = meta['consolidate-normfetch'].replace('Consolidator', '');
const func = meta['consolidator-normfetch'].replace('Consolidator', '');
return {
text: `Data is rolled up, aggregated over ${intervalString} using ${func} function`,
@ -56,7 +56,7 @@ export function getRuntimeConsolidationNotice(metaList: MetricTankSeriesMeta[]):
const runtimeNr = meta['aggnum-rc'];
if (runtimeNr > 0) {
const func = meta['consolidate-rc'].replace('Consolidator', '');
const func = meta['consolidator-rc'].replace('Consolidator', '');
return {
text: `Data is runtime consolidated, ${runtimeNr} datapoints combined using ${func} function`,

View File

@ -58,8 +58,8 @@ describe('graphiteDatasource', () => {
'aggnum-rc': 7,
'archive-interval': 3600,
'archive-read': 1,
'consolidate-normfetch': 'AverageConsolidator',
'consolidate-rc': 'AverageConsolidator',
'consolidator-normfetch': 'AverageConsolidator',
'consolidator-rc': 'AverageConsolidator',
count: 1,
'schema-name': 'wpUsageMetrics',
'schema-retentions': '1h:35d:6h:2,2h:2y:6h:2',
@ -74,8 +74,8 @@ describe('graphiteDatasource', () => {
'aggnum-rc': 0,
'archive-interval': 3600,
'archive-read': 0,
'consolidate-normfetch': 'AverageConsolidator',
'consolidate-rc': 'NoneConsolidator',
'consolidator-normfetch': 'AverageConsolidator',
'consolidator-rc': 'NoneConsolidator',
count: 1,
'schema-name': 'wpUsageMetrics',
'schema-retentions': '1h:35d:6h:2,2h:2y:6h:2',

View File

@ -25,9 +25,9 @@ export interface MetricTankSeriesMeta {
'archive-read': number;
'archive-interval': number;
'aggnum-norm': number;
'consolidate-normfetch': string; //"MaximumConsolidator",
'consolidator-normfetch': string; //"MaximumConsolidator",
'aggnum-rc': number;
'consolidate-rc': string; //"MaximumConsolidator",
'consolidator-rc': string; //"MaximumConsolidator",
count: number;
}