Merge pull request #417 from 4Oranges/master
support config server connection config in uri
This commit is contained in:
commit
c5f4ee2c3f
|
@ -27,7 +27,7 @@ function mergeTranslation(translation, base) {
|
||||||
return translation;
|
return translation;
|
||||||
}
|
}
|
||||||
|
|
||||||
webui.config(['$translateProvider', function ($translateProvider) {
|
webui.config(function ($translateProvider, $locationProvider) {
|
||||||
$translateProvider
|
$translateProvider
|
||||||
.translations('en_US', translations.en_US)
|
.translations('en_US', translations.en_US)
|
||||||
.translations('nl_NL', mergeTranslation(translations.nl_NL, translations.en_US))
|
.translations('nl_NL', mergeTranslation(translations.nl_NL, translations.en_US))
|
||||||
|
@ -45,7 +45,12 @@ webui.config(['$translateProvider', function ($translateProvider) {
|
||||||
.translations('fa_IR', mergeTranslation(translations.fa_IR, translations.en_US))
|
.translations('fa_IR', mergeTranslation(translations.fa_IR, translations.en_US))
|
||||||
.useSanitizeValueStrategy('escapeParameters')
|
.useSanitizeValueStrategy('escapeParameters')
|
||||||
.determinePreferredLanguage();
|
.determinePreferredLanguage();
|
||||||
}]);
|
|
||||||
|
$locationProvider.html5Mode({
|
||||||
|
enabled: true,
|
||||||
|
requireBase: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
if (!String.prototype.startsWith) {
|
if (!String.prototype.startsWith) {
|
||||||
|
|
|
@ -19,6 +19,15 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter
|
||||||
// try at the start, so that it is presistant even when default authconf works
|
// try at the start, so that it is presistant even when default authconf works
|
||||||
if(cookieConf) configurations.unshift(cookieConf);
|
if(cookieConf) configurations.unshift(cookieConf);
|
||||||
|
|
||||||
|
if (uri.search().host) {
|
||||||
|
configurations.unshift(uri.search());
|
||||||
|
configurations[0].auth = {
|
||||||
|
token: configurations[0].token,
|
||||||
|
user: configurations[0].username,
|
||||||
|
pass: configurations[0].password
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (['http', 'https'].indexOf(uri.protocol()) != -1 && uri.host() != 'localhost') {
|
if (['http', 'https'].indexOf(uri.protocol()) != -1 && uri.host() != 'localhost') {
|
||||||
configurations.push({
|
configurations.push({
|
||||||
host: uri.host(),
|
host: uri.host(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user