mirror of https://github.com/portainer/portainer
refactor(service): Config factory returns a promise
parent
9468839bf9
commit
91f3b1f138
|
@ -9,7 +9,7 @@ angular.module('dashboard')
|
||||||
return window.innerWidth;
|
return window.innerWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.config = Config.get();
|
$scope.config = Config;
|
||||||
|
|
||||||
$scope.$watch($scope.getWidth, function(newValue, oldValue) {
|
$scope.$watch($scope.getWidth, function(newValue, oldValue) {
|
||||||
if (newValue >= mobileView) {
|
if (newValue >= mobileView) {
|
||||||
|
|
|
@ -143,7 +143,7 @@ angular.module('dockerui.services', ['ngResource', 'ngSanitize'])
|
||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
.factory('Config', ['$resource', 'CONFIG_ENDPOINT', function($resource, CONFIG_ENDPOINT) {
|
.factory('Config', ['$resource', 'CONFIG_ENDPOINT', function($resource, CONFIG_ENDPOINT) {
|
||||||
return $resource(CONFIG_ENDPOINT);
|
return $resource(CONFIG_ENDPOINT).get();
|
||||||
}])
|
}])
|
||||||
.factory('Settings', ['DOCKER_ENDPOINT', 'DOCKER_PORT', 'UI_VERSION', function SettingsFactory(DOCKER_ENDPOINT, DOCKER_PORT, UI_VERSION) {
|
.factory('Settings', ['DOCKER_ENDPOINT', 'DOCKER_PORT', 'UI_VERSION', function SettingsFactory(DOCKER_ENDPOINT, DOCKER_PORT, UI_VERSION) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
Loading…
Reference in New Issue