remove options to hide columns

This commit is contained in:
akotynski
2018-02-16 09:08:06 +01:00
parent 456fbd6a5e
commit a9d0b4195e
10 changed files with 12 additions and 100 deletions

View File

@@ -128,9 +128,6 @@ describe('ZabbixDatasource', () => {
mode: 2,
resultFormat: "table",
table: {
host: true,
item: true,
key: true,
skipEmptyValues: false
}
}
@@ -162,22 +159,6 @@ describe('ZabbixDatasource', () => {
});
});
it('should return table only with `Last value` column when other columns are not selected', () => {
ctx.options.targets[0].table = {
host: false,
item: false,
key: false,
skipEmptyValues: false
};
return ctx.ds.query(ctx.options).then(result => {
let tableData = result.data[0];
expect(tableData.columns.length).toBe(1);
expect(tableData.columns[0].text).toEqual('Last value');
expect(tableData.rows[0].length).toBe(1);
expect(tableData.rows[0][0]).toEqual('Linux last');
});
});
it('should skip item when last value is empty', () => {
ctx.options.targets[0].skipEmptyValues = true;
ctx.ds.zabbix.getHistory = jest.fn().mockReturnValue(Promise.resolve([