You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2019/03/06 06:14:19 UTC
[kylin] branch 2.5.x updated: KYLIN-3842 kylinProperties.js Unable
to get the public configuration of the first line in the front end
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch 2.5.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.5.x by this push:
new a280db2 KYLIN-3842 kylinProperties.js Unable to get the public configuration of the first line in the front end
a280db2 is described below
commit a280db22b7235ec231b54b82e1f109a6803edad4
Author: yuzhang <sh...@163.com>
AuthorDate: Wed Mar 6 09:28:34 2019 +0800
KYLIN-3842 kylinProperties.js Unable to get the public configuration of the first line in the front end
---
webapp/app/js/services/kylinProperties.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/webapp/app/js/services/kylinProperties.js b/webapp/app/js/services/kylinProperties.js
index 5b64f7a..3c7a66f 100644
--- a/webapp/app/js/services/kylinProperties.js
+++ b/webapp/app/js/services/kylinProperties.js
@@ -31,10 +31,12 @@ KylinApp.service('kylinConfig', function (AdminService, $log) {
};
this.getProperty = function (name) {
- if(angular.isUndefined(_config)){
+ if(angular.isUndefined(name)
+ || name.length === 0
+ || angular.isUndefined(_config)){
return '';
}
- var keyIndex = _config.indexOf('\n' + name + '=');
+ var keyIndex = _config.indexOf(name + '=');
var keyLength = name.length;
var partialResult = _config.substr(keyIndex);
var preValueIndex = partialResult.indexOf("=");