refactor(storidge): split cluster and node status badge filter

storidge-standalone
baron_l 2019-03-12 18:27:15 +01:00
parent b3170b7f8e
commit f603b335c4
2 changed files with 10 additions and 2 deletions

View File

@ -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';

View File

@ -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>