mirror of
https://github.com/portainer/portainer.git
synced 2025-08-06 22:35:23 +02:00
refactor(storidge): split cluster and node status badge filter
This commit is contained in:
parent
b3170b7f8e
commit
f603b335c4
2 changed files with 10 additions and 2 deletions
|
@ -19,7 +19,15 @@ angular.module('extension.storidge')
|
|||
var status = _.toLower(text);
|
||||
if (status === 'maintenance') {
|
||||
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 'green-icon';
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td>Version</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue