[pbs-devel] [PATCH proxmox-backup] ui: dashboard/TaskSummary: fade icons if count is zero

Dominik Csapak d.csapak at proxmox.com
Thu Jul 9 16:11:51 CEST 2020


so that users can see the relevant counts faster

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 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 c51eaff..2e24ba2 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 `<i class="fa fa-${cls}"></i> ${value}`;
 	},
     },
-- 
2.20.1






More information about the pbs-devel mailing list