portainer/app/docker/views/engine/engineController.js

23 lines
596 B
JavaScript
Raw Normal View History

angular.module('portainer.docker')
.controller('EngineController', ['$q', '$scope', 'SystemService', 'Notifications',
function ($q, $scope, SystemService, Notifications) {
2017-11-12 19:27:28 +00:00
function initView() {
$q.all({
version: SystemService.version(),
info: SystemService.info()
})
.then(function success(data) {
$scope.version = data.version;
$scope.info = data.info;
})
.catch(function error(err) {
$scope.info = {};
$scope.version = {};
Notifications.error('Failure', err, 'Unable to retrieve engine details');
2016-10-27 04:13:53 +00:00
});
}
initView();
}]);