2016-06-16 05:27:07 +00:00
|
|
|
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-06-16 05:27:07 +00:00
|
|
|
};
|
2016-10-27 04:13:53 +00:00
|
|
|
$scope.info = {};
|
|
|
|
$scope.version = {};
|
2016-06-16 05:27:07 +00:00
|
|
|
|
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();
|
2016-06-16 05:27:07 +00:00
|
|
|
});
|
|
|
|
}]);
|