mirror of https://github.com/portainer/portainer
refactor(storidge): split cluster and node status badge filter
parent
b3170b7f8e
commit
f603b335c4
|
@ -19,7 +19,15 @@ angular.module('extension.storidge')
|
||||||
var status = _.toLower(text);
|
var status = _.toLower(text);
|
||||||
if (status === 'maintenance') {
|
if (status === 'maintenance') {
|
||||||
return 'orange-icon';
|
return 'orange-icon';
|
||||||
} else if (status === 'alert') {
|
}
|
||||||
|
return 'green-icon';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.filter('clusterStatusBadge', function () {
|
||||||
|
'use strict';
|
||||||
|
return function (text) {
|
||||||
|
var status = _.toLower(text);
|
||||||
|
if (status === 'alert') {
|
||||||
return 'red-icon';
|
return 'red-icon';
|
||||||
}
|
}
|
||||||
return 'green-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 {{ clusterInfo.Status | nodeStatusBadge }}"></i> {{ clusterInfo.Status }}</td>
|
<td><i class="fa fa-heartbeat space-right {{ clusterInfo.Status | clusterStatusBadge }}"></i> {{ clusterInfo.Status }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Version</td>
|
<td>Version</td>
|
||||||
|
|
Loading…
Reference in New Issue