style(storidge): change cluster / node icon color based on status

storidge-standalone
baron_l 2019-03-12 17:32:12 +01:00
parent 46b2124544
commit 072b20b9cc
3 changed files with 14 additions and 2 deletions

View File

@ -71,7 +71,7 @@
<td>{{ item.IP }}</td>
<td>{{ item.Role }}</td>
<td>
<i class="fa fa-heartbeat space-right green-icon"></i>
<i class="fa fa-heartbeat space-right {{ item.Status | nodeStatusBadge }}"></i>
{{ item.Status }}
</td>
</tr>

View File

@ -12,4 +12,16 @@ angular.module('extension.storidge')
}
return 'info';
};
})
.filter('nodeStatusBadge', function () {
'use strict';
return function (text) {
var status = _.toLower(text);
if (status === 'maintenance') {
return 'orange-icon';
} else if (status === 'alert') {
return 'red-icon';
}
return 'green-icon';
};
});

View File

@ -22,7 +22,7 @@
</tr>
<tr>
<td>Status</td>
<td><i class="fa fa-heartbeat space-right green-icon"></i> {{ clusterInfo.Status }}</td>
<td><i class="fa fa-heartbeat space-right {{ clusterInfo.Status | nodeStatusBadge }}"></i> {{ clusterInfo.Status }}</td>
</tr>
<tr>
<td>Version</td>