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