mirror of https://github.com/portainer/portainer
fix(docker): surface node details docker error [EE-7054] (#11752)
Co-authored-by: testa113 <testa113>pull/11604/merge
parent
014c491205
commit
6ae0a972d4
|
@ -5,7 +5,8 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
|
||||||
'StateManager',
|
'StateManager',
|
||||||
'AgentService',
|
'AgentService',
|
||||||
'Authentication',
|
'Authentication',
|
||||||
function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, Authentication) {
|
'Notifications',
|
||||||
|
function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, Authentication, Notifications) {
|
||||||
var ctrl = this;
|
var ctrl = this;
|
||||||
|
|
||||||
ctrl.$onInit = initView;
|
ctrl.$onInit = initView;
|
||||||
|
@ -24,7 +25,8 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
|
||||||
var nodeId = $stateParams.id;
|
var nodeId = $stateParams.id;
|
||||||
$q.all({
|
$q.all({
|
||||||
node: NodeService.node(nodeId),
|
node: NodeService.node(nodeId),
|
||||||
}).then(function (data) {
|
})
|
||||||
|
.then(function (data) {
|
||||||
var node = data.node;
|
var node = data.node;
|
||||||
ctrl.originalNode = node;
|
ctrl.originalNode = node;
|
||||||
ctrl.hostDetails = buildHostDetails(node);
|
ctrl.hostDetails = buildHostDetails(node);
|
||||||
|
@ -42,6 +44,9 @@ angular.module('portainer.docker').controller('NodeDetailsViewController', [
|
||||||
ctrl.disks = agentHostInfo.PhysicalDisks;
|
ctrl.disks = agentHostInfo.PhysicalDisks;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
Notifications.error('Failure', err, 'Unable to retrieve node details');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue