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.IP }}</td>
|
||||||
<td>{{ item.Role }}</td>
|
<td>{{ item.Role }}</td>
|
||||||
<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 }}
|
{{ item.Status }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -12,4 +12,16 @@ angular.module('extension.storidge')
|
||||||
}
|
}
|
||||||
return 'info';
|
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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Version</td>
|
<td>Version</td>
|
||||||
|
|
Loading…
Reference in New Issue