portainer/app/docker/views/containers/inspect/containerInspectController.js

23 lines
700 B
JavaScript
Raw Normal View History

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-11-12 19:27:28 +00:00
$scope.state = {
DisplayTextView: false
};
$scope.containerInfo = {};
function initView() {
2018-05-06 07:15:57 +00:00
HttpRequestHelper.setPortainerAgentTargetHeader($transition$.params().nodeName);
ContainerService.inspect($transition$.params().id)
.then(function success(d) {
$scope.containerInfo = d;
})
.catch(function error(e) {
Notifications.error('Failure', e, 'Unable to inspect container');
});
}
initView();
}]);