diff --git a/www/dashboard/TaskSummary.js b/www/dashboard/TaskSummary.js
index 5e2a4b13..fcf32ab1 100644
--- a/www/dashboard/TaskSummary.js
+++ b/www/dashboard/TaskSummary.js
@@ -7,30 +7,36 @@ Ext.define('PBS.TaskSummary', {
controller: {
xclass: 'Ext.app.ViewController',
- render_count: function(value, md, record, rowindex, colindex) {
+ render_icon: function(state, count) {
let cls = 'question';
let color = 'faded';
- switch (colindex) {
- case 1:
+ switch (state) {
+ case "error":
cls = "times-circle";
color = "critical";
break;
- case 2:
+ case "warning":
cls = "exclamation-circle";
color = "warning";
break;
- case 3:
+ case "ok":
cls = "check-circle";
color = "good";
break;
default: break;
}
- if (value < 1) {
+ if (count < 1) {
color = "faded";
}
cls += " " + color;
- return ` ${value}`;
+ return ``;
+ },
+
+ render_count: function(value, md, record, rowindex, colindex) {
+ let me = this;
+ let icon = me.render_icon(me.states[colindex], value);
+ return `${icon} ${value}`;
},
},