2015-03-31 21:37:03 +00:00
|
|
|
angular.module('containerTop', [])
|
2016-02-16 05:34:55 +00:00
|
|
|
.controller('ContainerTopController', ['$scope', '$routeParams', 'ContainerTop', 'Container', 'ViewSpinner', function ($scope, $routeParams, ContainerTop, Container, ViewSpinner) {
|
2015-03-31 21:37:03 +00:00
|
|
|
$scope.ps_args = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get container processes
|
|
|
|
*/
|
|
|
|
$scope.getTop = function () {
|
|
|
|
ViewSpinner.spin();
|
|
|
|
ContainerTop.get($routeParams.id, {
|
|
|
|
ps_args: $scope.ps_args
|
|
|
|
}, function (data) {
|
|
|
|
$scope.containerTop = data;
|
|
|
|
ViewSpinner.stop();
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2016-02-16 05:34:55 +00:00
|
|
|
Container.get({id: $routeParams.id}, function (d) {
|
|
|
|
$scope.containerName = d.Name.substring(1);
|
|
|
|
}, function (e) {
|
|
|
|
Messages.error("Failure", e.data);
|
|
|
|
});
|
|
|
|
|
2015-03-31 21:37:03 +00:00
|
|
|
$scope.getTop();
|
|
|
|
}]);
|