mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add test for prometheus table column title
This commit is contained in:
parent
c2b720835b
commit
253b2cc081
@ -47,6 +47,18 @@ describe('Prometheus Result Transformer', () => {
|
||||
{ text: 'Value' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('should column title include refId if response count is more than 2', () => {
|
||||
var table = ctx.resultTransformer.transformMetricDataToTable(response.data.result, 2, "B");
|
||||
expect(table.type).toBe('table');
|
||||
expect(table.columns).toEqual([
|
||||
{ text: 'Time', type: 'time' },
|
||||
{ text: '__name__' },
|
||||
{ text: 'instance' },
|
||||
{ text: 'job' },
|
||||
{ text: 'Value #B' },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('When resultFormat is table and instant = true', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user