mirror of https://github.com/portainer/portainer
feat(storidge): update 7 - node details + cluster views
parent
bf42276950
commit
daacef199a
|
@ -25,7 +25,7 @@ angular.module('extension.storidge')
|
||||||
return 'green-icon';
|
return 'green-icon';
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter('clusterStatusBadge', function () {
|
.filter('storidgeClusterConditionBadge', function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
return function (text) {
|
return function (text) {
|
||||||
var status = text ? _.toLower(text) : '';
|
var status = text ? _.toLower(text) : '';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export function StoridgeInfoModel(data) {
|
export function StoridgeInfoModel(data) {
|
||||||
this.Domain = data.domain;
|
this.Domain = data.domain;
|
||||||
this.Nodes = data.nodes;
|
this.Nodes = data.nodes;
|
||||||
this.Status = data.status;
|
this.Condition = data.condition;
|
||||||
this.ProvisionedBandwidth = data.provisionedBandwidth;
|
this.ProvisionedBandwidth = data.provisionedBandwidth;
|
||||||
this.UsedBandwidth = data.usedBandwidth;
|
this.UsedBandwidth = data.usedBandwidth;
|
||||||
this.FreeBandwidth = data.freeBandwidth;
|
this.FreeBandwidth = data.freeBandwidth;
|
||||||
|
|
|
@ -7,6 +7,7 @@ export function StoridgeNodeModel(name, data) {
|
||||||
|
|
||||||
export function StoridgeNodeDetailedModel(name, properties) {
|
export function StoridgeNodeDetailedModel(name, properties) {
|
||||||
this.Name = name;
|
this.Name = name;
|
||||||
|
this.Condition = properties.condition;
|
||||||
this.Domain = properties.domain;
|
this.Domain = properties.domain;
|
||||||
this.DomainID = properties.domainID;
|
this.DomainID = properties.domainID;
|
||||||
this.FreeBandwidth = properties.freeBandwidth;
|
this.FreeBandwidth = properties.freeBandwidth;
|
||||||
|
|
|
@ -21,8 +21,10 @@
|
||||||
<td>{{ clusterInfo.Domain }}</td>
|
<td>{{ clusterInfo.Domain }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Condition</td>
|
||||||
<td><i class="fa fa-heartbeat space-right {{ clusterInfo.Status | clusterStatusBadge }}"></i> {{ clusterInfo.Status }}</td>
|
<td><i class="fa fa-heartbeat space-right {{ clusterInfo.Condition | storidgeClusterConditionBadge }}"></i>
|
||||||
|
{{ clusterInfo.Condition }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Version</td>
|
<td>Version</td>
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
<rd-widget>
|
<rd-widget>
|
||||||
<rd-widget-header icon="fa-object-group" title-text="Node details">
|
<rd-widget-header icon="fa-object-group" title-text="Node details">
|
||||||
<button type="button" class="btn btn-sm btn-danger"
|
<button type="button" class="btn btn-sm btn-danger"
|
||||||
ng-disabled="node.Status !== 'Normal'" ng-click="removeNodeAction()">
|
ng-disabled="(node.Status | lowercase) !== 'normal'" ng-click="removeNodeAction()">
|
||||||
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove node
|
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove node
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary"
|
<button type="button" class="btn btn-sm btn-primary"
|
||||||
ng-disabled="node.Status !== 'Normal'" ng-click="cordonNodeAction()">
|
ng-disabled="(node.Status | lowercase) !== 'normal'" ng-click="cordonNodeAction()">
|
||||||
<i class="fas fa-wrench space-right" aria-hidden="true"></i>Enter maintenance mode
|
<i class="fas fa-wrench space-right" aria-hidden="true"></i>Enter maintenance mode
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary"
|
<button type="button" class="btn btn-sm btn-primary"
|
||||||
ng-disabled="node.Status !== 'Cordoned'" ng-click="uncordonNodeAction()">
|
ng-disabled="(node.Status | lowercase) !== 'cordoned'" ng-click="uncordonNodeAction()">
|
||||||
<i class="fa fa-power-off space-right" aria-hidden="true"></i>Exit maintenance mode
|
<i class="fa fa-power-off space-right" aria-hidden="true"></i>Exit maintenance mode
|
||||||
</button>
|
</button>
|
||||||
</rd-widget-header>
|
</rd-widget-header>
|
||||||
|
@ -39,8 +39,18 @@
|
||||||
<td>{{ node.DomainID }}</td>
|
<td>{{ node.DomainID }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Node status</td>
|
||||||
<td>{{ node.Status }}</td>
|
<td>
|
||||||
|
<i class="fa fa-heartbeat space-right {{ node.Status | storidgeNodeStatusBadge }}"></i>
|
||||||
|
{{ node.Status }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cluster condition</td>
|
||||||
|
<td>
|
||||||
|
<i class="fa fa-heartbeat space-right {{ node.Condition | storidgeClusterConditionBadge }}"></i>
|
||||||
|
{{ node.Condition }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Metadata version</td>
|
<td>Metadata version</td>
|
||||||
|
|
|
@ -54,6 +54,9 @@ function ($scope, $state, $transition$, Notifications, StoridgeNodeService, Moda
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to put node in maintenance mode');
|
Notifications.error('Failure', err, 'Unable to put node in maintenance mode');
|
||||||
|
})
|
||||||
|
.finally(function final() {
|
||||||
|
$state.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +84,9 @@ function ($scope, $state, $transition$, Notifications, StoridgeNodeService, Moda
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to put node out of maintenance mode');
|
Notifications.error('Failure', err, 'Unable to put node out of maintenance mode');
|
||||||
|
})
|
||||||
|
.finally(function final() {
|
||||||
|
$state.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue