mirror of https://github.com/portainer/portainer
style(storidge): change cluster / node icon color based on status
parent
46b2124544
commit
072b20b9cc
|
@ -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>
|
||||
|
|
|
@ -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';
|
||||
};
|
||||
});
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue