2018-02-01 12:27:52 +00:00
|
|
|
angular.module('portainer.docker')
|
2018-06-11 13:13:19 +00:00
|
|
|
.controller('ContainersController', ['$scope', 'ContainerService', 'Notifications',
|
|
|
|
function ($scope, ContainerService, Notifications) {
|
2017-12-06 11:04:02 +00:00
|
|
|
|
2017-06-20 11:00:32 +00:00
|
|
|
function initView() {
|
2018-04-04 00:31:04 +00:00
|
|
|
ContainerService.containers(1)
|
2017-06-20 11:00:32 +00:00
|
|
|
.then(function success(data) {
|
2018-06-11 13:13:19 +00:00
|
|
|
$scope.containers = data;
|
2017-06-20 11:00:32 +00:00
|
|
|
})
|
|
|
|
.catch(function error(err) {
|
2017-12-06 11:04:02 +00:00
|
|
|
Notifications.error('Failure', err, 'Unable to retrieve containers');
|
|
|
|
$scope.containers = [];
|
2017-06-20 11:00:32 +00:00
|
|
|
});
|
2017-06-01 08:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
initView();
|
2016-06-02 05:34:03 +00:00
|
|
|
}]);
|