mirror of https://github.com/portainer/portainer
feat(storidge): update 8 - node availability on swarm overview
parent
b52dcaacc8
commit
d4772672bb
|
@ -63,6 +63,13 @@
|
||||||
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Status' && $ctrl.state.reverseOrder"></i>
|
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Status' && $ctrl.state.reverseOrder"></i>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<a ng-click="$ctrl.changeOrderBy('Availability')">
|
||||||
|
Availability
|
||||||
|
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Availability' && !$ctrl.state.reverseOrder"></i>
|
||||||
|
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Availability' && $ctrl.state.reverseOrder"></i>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -77,6 +84,7 @@
|
||||||
<td>{{ item.EngineVersion }}</td>
|
<td>{{ item.EngineVersion }}</td>
|
||||||
<td ng-if="$ctrl.showIpAddressColumn">{{ item.Addr }}</td>
|
<td ng-if="$ctrl.showIpAddressColumn">{{ item.Addr }}</td>
|
||||||
<td><span class="label label-{{ item.Status | nodestatusbadge }}">{{ item.Status }}</span></td>
|
<td><span class="label label-{{ item.Status | nodestatusbadge }}">{{ item.Status }}</span></td>
|
||||||
|
<td><span class="label label-{{ item.Availability | dockerNodeAvailabilityBadge }}">{{ item.Availability }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-if="!$ctrl.dataset">
|
<tr ng-if="!$ctrl.dataset">
|
||||||
<td colspan="7" class="text-center text-muted">Loading...</td>
|
<td colspan="7" class="text-center text-muted">Loading...</td>
|
||||||
|
|
|
@ -97,6 +97,18 @@ angular.module('portainer.docker')
|
||||||
return 'success';
|
return 'success';
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
.filter('dockerNodeAvailabilityBadge', function () {
|
||||||
|
'use strict';
|
||||||
|
return function (text) {
|
||||||
|
if (text === 'pause') {
|
||||||
|
return 'warning';
|
||||||
|
}
|
||||||
|
else if (text === 'drain') {
|
||||||
|
return 'danger';
|
||||||
|
}
|
||||||
|
return 'success';
|
||||||
|
};
|
||||||
|
})
|
||||||
.filter('trimcontainername', function () {
|
.filter('trimcontainername', function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
return function (name) {
|
return function (name) {
|
||||||
|
|
|
@ -17,9 +17,9 @@ angular.module('extension.storidge')
|
||||||
'use strict';
|
'use strict';
|
||||||
return function (text) {
|
return function (text) {
|
||||||
var status = text ? _.toLower(text) : '';
|
var status = text ? _.toLower(text) : '';
|
||||||
if (status === 'cordoned') {
|
if (status === 'cordoned' || status === 'maintenance') {
|
||||||
return 'orange-icon';
|
return 'orange-icon';
|
||||||
} else if (status === 'leaving') {
|
} else if (status === 'leaving' || status === 'failed') {
|
||||||
return 'red-icon'
|
return 'red-icon'
|
||||||
}
|
}
|
||||||
return 'green-icon';
|
return 'green-icon';
|
||||||
|
|
Loading…
Reference in New Issue