2018-05-06 09:15:57 +02:00
|
|
|
angular.module('portainer.docker').controller('ContainerInspectController', [
|
|
|
|
'$scope',
|
|
|
|
'$transition$',
|
|
|
|
'Notifications',
|
|
|
|
'ContainerService',
|
|
|
|
'HttpRequestHelper',
|
|
|
|
function ($scope, $transition$, Notifications, ContainerService, HttpRequestHelper) {
|
2017-11-12 20:27:28 +01:00
|
|
|
$scope.state = {
|
|
|
|
DisplayTextView: false,
|
2020-04-11 00:54:53 +03:00
|
|
|
};
|
2017-10-24 09:32:21 +02:00
|
|
|
$scope.containerInfo = {};
|
|
|
|
|
2017-11-12 20:27:28 +01:00
|
|
|
function initView() {
|
2018-05-06 09:15:57 +02:00
|
|
|
HttpRequestHelper.setPortainerAgentTargetHeader($transition$.params().nodeName);
|
2017-11-12 20:27:28 +01:00
|
|
|
ContainerService.inspect($transition$.params().id)
|
2017-10-24 09:32:21 +02:00
|
|
|
.then(function success(d) {
|
|
|
|
$scope.containerInfo = d;
|
2020-04-11 00:54:53 +03:00
|
|
|
})
|
2017-10-17 09:56:40 +03:00
|
|
|
.catch(function error(e) {
|
|
|
|
Notifications.error('Failure', e, 'Unable to inspect container');
|
2020-04-11 00:54:53 +03:00
|
|
|
});
|
|
|
|
}
|
2017-10-24 09:32:21 +02:00
|
|
|
|
2017-10-17 09:56:40 +03:00
|
|
|
initView();
|
|
|
|
},
|
|
|
|
]);
|