From 9f5b7b4264eed536c127633b42a30cbe30cc2859 Mon Sep 17 00:00:00 2001 From: moisseev Date: Fri, 29 Dec 2023 13:32:37 +0300 Subject: [Minor] Combine history table column definitions --- interface/js/app/upload.js | 58 +--------------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) (limited to 'interface/js/app/upload.js') diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js index e5ddb1c84..546f5cc84 100644 --- a/interface/js/app/upload.js +++ b/interface/js/app/upload.js @@ -73,62 +73,6 @@ define(["jquery", "app/common", "app/libft"], }); } - function columns_v2() { - return [{ - name: "id", - title: "ID", - style: { - minWidth: 130, - overflow: "hidden", - textOverflow: "ellipsis", - wordBreak: "break-all", - whiteSpace: "normal" - } - }, { - name: "action", - title: "Action", - style: {minwidth: 82} - }, { - name: "passthrough_module", - title: '
Pass-through module
', - breakpoints: "xs sm md" - }, { - name: "score", - title: "Score", - style: {maxWidth: 110}, - sortValue: function (val) { return Number(val.options.sortValue); } - }, { - name: "symbols", - title: "Symbols" + - '
' + - '
Sort by:
' + - '
' + - '' + - '' + - '' + - "
" + - "
", - breakpoints: "all", - style: {width: 550, maxWidth: 550} - }, { - name: "time_real", - title: "Scan time", - breakpoints: "xs sm md", - style: {maxWidth: 72}, - sortValue: function (val) { return Number(val); } - }, { - classes: "history-col-time", - sorted: true, - direction: "DESC", - name: "time", - title: "Time", - sortValue: function (val) { return Number(val.options.sortValue); } - }]; - } - function get_server() { const checked_server = common.getSelector("selSrv"); return (checked_server === "All SERVERS") ? "local" : checked_server; @@ -171,7 +115,7 @@ define(["jquery", "app/common", "app/libft"], require(["footable"], () => { // Is there a way to get an event when the table is destroyed? setTimeout(() => { - libft.initHistoryTable(data, items, "scan", columns_v2(), true); + libft.initHistoryTable(data, items, "scan", libft.columns_v2("scan"), true); scrollTop(rows_total); }, 200); }); -- cgit v1.2.3