1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 16:29:44 +02:00
portainer/app/docker/views/containers/containersController.js
2018-06-11 15:13:19 +02:00

17 lines
477 B
JavaScript

angular.module('portainer.docker')
.controller('ContainersController', ['$scope', 'ContainerService', 'Notifications',
function ($scope, ContainerService, Notifications) {
function initView() {
ContainerService.containers(1)
.then(function success(data) {
$scope.containers = data;
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to retrieve containers');
$scope.containers = [];
});
}
initView();
}]);