From 317a1f87fa145bfb2385f65404156b9b5f19022a Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 4 Nov 2022 13:56:54 +0100 Subject: [PATCH] Added colors to the LogsViewer app --- public/js/apps/LogsViewer/TabulatorSetup.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/js/apps/LogsViewer/TabulatorSetup.js b/public/js/apps/LogsViewer/TabulatorSetup.js index 377b04ed6..7d98ba2f6 100644 --- a/public/js/apps/LogsViewer/TabulatorSetup.js +++ b/public/js/apps/LogsViewer/TabulatorSetup.js @@ -19,7 +19,7 @@ * */ export const LogsViewerTabulatorOptions = { - height: 500, + height: 700, layout: 'fitColumns', columns: [ {title: 'Log ID', field: 'LogId'}, @@ -29,7 +29,17 @@ export const LogsViewerTabulatorOptions = { {title: 'Description', field: 'Description'}, {title: 'Data', field: 'Data'}, {title: 'Web service type', field: 'WebserviceType'} - ] + ], + rowFormatter: function(row) { + if (row.getData().RequestId.includes("error")) + { + row.getElement().style.color = "red"; + } + else if (row.getData().RequestId.includes("warning")) + { + row.getElement().style.color = "orange"; + } + } }; /**