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

@@ -74,15 +74,9 @@ System.register(['lodash', 'app/core/table_model', './constants'], function (_ex
return convertHistory(history, items, addHostName, convertTextCallback);
}function handleHistoryAsTable(history, items, target) {
var table = new TableModel();
if (target.table.host) {
table.addColumn({ text: 'Host' });
}
if (target.table.item) {
table.addColumn({ text: 'Item' });
}
if (target.table.key) {
table.addColumn({ text: 'Key' });
}
table.addColumn({ text: 'Host' });
table.addColumn({ text: 'Item' });
table.addColumn({ text: 'Key' });
table.addColumn({ text: 'Last value' });
var grouped_history = _.groupBy(history, 'itemid');
@@ -103,19 +97,7 @@ System.register(['lodash', 'app/core/table_model', './constants'], function (_ex
var host = _.first(item.hosts);
host = host ? host.name : "";
var row = [];
if (target.table.host) {
row.push(host);
}
if (target.table.item) {
row.push(item.name);
}
if (target.table.key) {
row.push(item.key_);
}
row.push(lastValue);
table.rows.push(row);
table.rows.push([host, item.name, item.key_, lastValue]);
});
return table;