portainer/app/components/docker/dockerController.js

25 lines
738 B
JavaScript
Raw Normal View History

angular.module('docker', [])
2016-10-27 04:13:53 +00:00
.controller('DockerController', ['$scope', 'Info', 'Version', 'Messages',
function ($scope, Info, Version, Messages) {
$scope.state = {
loaded: false
};
2016-10-27 04:13:53 +00:00
$scope.info = {};
$scope.version = {};
2016-10-27 04:13:53 +00:00
Info.get({}, function (infoData) {
$scope.info = infoData;
Version.get({}, function (versionData) {
$scope.version = versionData;
$scope.state.loaded = true;
$('#loadingViewSpinner').hide();
}, function (e) {
Messages.error("Failure", e, 'Unable to retrieve engine details');
$('#loadingViewSpinner').hide();
});
}, function (e) {
Messages.error("Failure", e, 'Unable to retrieve engine information');
$('#loadingViewSpinner').hide();
});
}]);