fix(ui): adjust tests to match simplified labels

pull/5997/head
Pavel Zavora 2022-08-16 19:25:28 +02:00
parent 4d1feefcc6
commit 0433845c26
2 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ function fluxTableKey(table: FluxTable, columnName: string): string {
}
return acc
}, [])
return groupKeys.length ? `${name} (${groupKeys.join(' ')})` : name
return groupKeys.length ? `${name} ${groupKeys.join(' ')}` : name
}
export const parseTablesByTime = (

View File

@ -39,10 +39,10 @@ describe('fluxTablesToDygraph', () => {
const expected = {
labels: [
'time',
'mean_usage_idle[_measurement=cpu]',
'mean_usage_user[_measurement=cpu]',
'mean_usage_idle[_measurement=mem]',
'mean_usage_user[_measurement=mem]',
'mean_usage_idle measurement=cpu',
'mean_usage_user measurement=cpu',
'mean_usage_idle measurement=mem',
'mean_usage_user measurement=mem',
],
dygraphsData: [
[new Date('2018-09-10T16:54:37Z'), 85, 10, 8, 1],
@ -60,8 +60,8 @@ describe('fluxTablesToDygraph', () => {
const expected = {
labels: [
'time',
'mean_usage_idle[_measurement=cpu]',
'mean_usage_idle[_measurement=mem]',
'mean_usage_idle measurement=cpu',
'mean_usage_idle measurement=mem',
],
dygraphsData: [
[new Date('2018-09-10T16:54:37Z'), 85, 8],