From be30e7d269faea4ddf5f04b6344f746339ddf320 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 9 Jul 2020 16:11:51 +0200 Subject: [PATCH] ui: dashboard/TaskSummary: fade icons if count is zero so that users can see the relevant counts faster Signed-off-by: Dominik Csapak --- www/dashboard/TaskSummary.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/www/dashboard/TaskSummary.js b/www/dashboard/TaskSummary.js index c51eaffb..2e24ba2b 100644 --- a/www/dashboard/TaskSummary.js +++ b/www/dashboard/TaskSummary.js @@ -9,12 +9,27 @@ Ext.define('PBS.TaskSummary', { render_count: function(value, md, record, rowindex, colindex) { let cls = 'question'; + let color = 'faded'; switch (colindex) { - case 1: cls = "times-circle critical"; break; - case 2: cls = "exclamation-circle warning"; break; - case 3: cls = "check-circle good"; break; + case 1: + cls = "times-circle"; + color = "critical"; + break; + case 2: + cls = "exclamation-circle"; + color = "warning"; + break; + case 3: + cls = "check-circle"; + color = "good"; + break; default: break; } + + if (value < 1) { + color = "faded"; + } + cls += " " + color; return ` ${value}`; }, },