fix getting default rpc host error when access AriaNg by opening file directly
This commit is contained in:
parent
042e5040f7
commit
86199cca05
|
@ -9,6 +9,7 @@
|
||||||
languagePath: '/langs',
|
languagePath: '/langs',
|
||||||
languageFileExtension: '.json',
|
languageFileExtension: '.json',
|
||||||
defaultLanguage: 'en',
|
defaultLanguage: 'en',
|
||||||
|
defaultHost: 'localhost',
|
||||||
globalStatStorageCapacity: 120,
|
globalStatStorageCapacity: 120,
|
||||||
taskStatStorageCapacity: 300,
|
taskStatStorageCapacity: 300,
|
||||||
lazySaveTimeout: 500,
|
lazySaveTimeout: 500,
|
||||||
|
|
|
@ -32,7 +32,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var getDefaultRpcHost = function () {
|
var getDefaultRpcHost = function () {
|
||||||
return $location.$$host;
|
var currentHost = $location.$$host;
|
||||||
|
|
||||||
|
if (currentHost) {
|
||||||
|
return currentHost;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ariaNgConstants.defaultHost;
|
||||||
};
|
};
|
||||||
|
|
||||||
var setOptions = function (options) {
|
var setOptions = function (options) {
|
||||||
|
|
Reference in a new issue