Commit 539333bb by David Kaltschmidt

Explore: Enable click on name label

- click on the name label in a prometheus table was disabled
- it was disabled because every query used to have a metric which is no
longer true
- this change enables it
parent c04395ce
......@@ -100,7 +100,7 @@ export class ResultTransformer {
table.columns.push({ text: 'Time', type: 'time' });
_.each(sortedLabels, (label, labelIndex) => {
metricLabels[label] = labelIndex + 1;
table.columns.push({ text: label, filterable: !label.startsWith('__') });
table.columns.push({ text: label, filterable: true });
});
const valueText = resultCount > 1 || valueWithRefId ? `Value #${refId}` : 'Value';
table.columns.push({ text: valueText });
......
......@@ -66,11 +66,12 @@ describe('Prometheus Result Transformer', () => {
]);
expect(table.columns).toMatchObject([
{ text: 'Time', type: 'time' },
{ text: '__name__' },
{ text: 'instance' },
{ text: '__name__', filterable: true },
{ text: 'instance', filterable: true },
{ text: 'job' },
{ text: 'Value' },
]);
expect(table.columns[4].filterable).toBeUndefined();
});
it('should column title include refId if response count is more than 2', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment