KYLIN-2939 Get config properties not correct in UI
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d4b63d3d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d4b63d3d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d4b63d3d Branch: refs/heads/master Commit: d4b63d3dee734811a1ea084971dfea2de0dd8f3d Parents: fa482cc Author: liapan <lia...@ebay.com> Authored: Fri Dec 8 09:58:17 2017 +0800 Committer: chenzhx <c...@apache.org> Committed: Fri Dec 22 16:34:38 2017 +0800 ---------------------------------------------------------------------- webapp/app/js/services/kylinProperties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/d4b63d3d/webapp/app/js/services/kylinProperties.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/services/kylinProperties.js b/webapp/app/js/services/kylinProperties.js index 74e5bba..e31dd6c 100644 --- a/webapp/app/js/services/kylinProperties.js +++ b/webapp/app/js/services/kylinProperties.js @@ -31,11 +31,11 @@ KylinApp.service('kylinConfig', function (AdminService, $log) { }; this.getProperty = function (name) { - var keyIndex = _config.indexOf(name); + var keyIndex = _config.indexOf('\n' + name + '='); var keyLength = name.length; var partialResult = _config.substr(keyIndex); var preValueIndex = partialResult.indexOf("="); - var sufValueIndex = partialResult.indexOf("\n"); + var sufValueIndex = partialResult.indexOf("\n", 2); return partialResult.substring(preValueIndex + 1, sufValueIndex); }