Rename developmentConfig.json => config.json

Change-Id: I0e8a17404df86aa3a21492927336bc1cac91db7c
This commit is contained in:
Vincent Fournier 2015-07-30 16:07:03 -04:00
parent e6cbd2e844
commit a66a0e404c
3 changed files with 12 additions and 12 deletions

View File

@ -31,8 +31,8 @@ angular.module('bansho.authentication', [])
login($scope.credentials);
};
configManager.loadDevelopmentConfig().then(function () {
var devConfig = configManager.getDevelopmentConfig();
configManager.loadConfig().then(function () {
var devConfig = configManager.getConfig();
if (devConfig.env === 'development') {
login({
@ -67,7 +67,7 @@ angular.module('bansho.authentication', [])
session.create(data.access.token.id, data.access.token.expires);
$http.defaults.headers.common['X-Auth-Token'] = session.sessionId;
configManager.fetchLayoutConfig(configManager.getDevelopmentConfig().useStoredConfig).then(function () {
configManager.fetchLayoutConfig(configManager.getConfig().useStoredConfig).then(function () {
themeManager.setTheme(configManager.getTheme());
$location.path('/view');
}, function (message) {

View File

@ -90,16 +90,16 @@ angular.module('bansho.config', [])
.service('configManager', ['$http', '$q', 'componentsConfig', 'surveilConfig',
function ($http, $q, componentsConfig, surveilConfig) {
var layoutConfig = {},
developmentConfig = {};
config = {};
this.loadDevelopmentConfig = function() {
this.loadConfig = function() {
var promise = $q.defer();
$http.get('components/config/developmentConfig.json')
.success(function (config) {
developmentConfig = config;
surveilConfig.setSurveilApiUrl(config.surveilApiUrl);
surveilConfig.setAuthUrl(config.surveilAuthUrl);
$http.get('components/config/config.json')
.success(function (c) {
config = c;
surveilConfig.setSurveilApiUrl(c.surveilApiUrl);
surveilConfig.setAuthUrl(c.surveilAuthUrl);
promise.resolve();
})
.error(function() {
@ -109,8 +109,8 @@ angular.module('bansho.config', [])
return promise.promise;
};
this.getDevelopmentConfig = function () {
return developmentConfig;
this.getConfig = function () {
return config;
};
this.getConfigData = function (templateName) {