Merge "developmentConfig: New option to ignore server config"

This commit is contained in:
Jenkins 2015-05-20 15:41:29 +00:00 committed by Gerrit Code Review
commit fbd4bc8bc1
3 changed files with 5 additions and 4 deletions

View File

@ -63,7 +63,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.fetchConfig().then(function () {
configManager.fetchConfig(configManager.getDevelopmentConfig().useStoredConfig).then(function () {
$location.path('/view');
}, function (message) {
throw new Error(message);

View File

@ -40,12 +40,12 @@ angular.module('bansho.config', [])
return config.data;
};
this.fetchConfig = function () {
this.fetchConfig = function (useStoredConfig) {
var responsePromise = $q.defer();
$http.get('surveil/v2/bansho/config')
.success(function (conf) {
if (jQuery.isEmptyObject(conf)) {
if (!useStoredConfig || jQuery.isEmptyObject(conf)) {
$http.get('components/config/config.json')
.success(function (conf) {

View File

@ -1,5 +1,6 @@
{
"env": "production",
"username":"",
"password":""
"password":"",
"useStoredConfig": true
}