You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ch...@apache.org on 2018/03/02 08:59:21 UTC
[kylin] branch master updated: KYLIN-3236 The function
'reGenerateAdvancedDict()' has an error logical judgment,
which will cause an exception when you edit the cube.
This is an automated email from the ASF dual-hosted git repository.
chen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 39ef73c KYLIN-3236 The function 'reGenerateAdvancedDict()' has an error logical judgment, which will cause an exception when you edit the cube.
39ef73c is described below
commit 39ef73ccade23fe3c0e95ea1e29b5090d9b16e76
Author: xingpeng1 <xi...@zte.com.cn>
AuthorDate: Tue Feb 6 17:11:50 2018 +0800
KYLIN-3236 The function 'reGenerateAdvancedDict()' has an error logical judgment, which will cause an exception when you edit the cube.
Signed-off-by: xingpeng1 <xi...@zte.com.cn>
---
webapp/app/js/controllers/cubeAdvanceSetting.js | 5 +++++
webapp/app/js/controllers/cubeEdit.js | 15 +++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index dd00da4..5687e12 100755
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -440,4 +440,9 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
}
};
+ if ($scope.state.mode == 'edit') {
+ $scope.$on('$destroy', function () {
+ $scope.$emit('AdvancedSettingEdited');
+ });
+ }
});
diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js
index 3cf248f..1a87dc3 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -773,11 +773,12 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio
});
//remove deprecated distinct measures
- angular.forEach($scope.cubeMetaFrame.dictionaries, function (dict, index) {
- if (distinctMeasures.indexOf(dict.column) === -1 && reuseColumns.indexOf(dict.column) === -1) {
- $scope.cubeMetaFrame.dictionaries.splice(index, 1);
+ for (var i = $scope.cubeMetaFrame.dictionaries.length - 1; i >= 0; i--) {
+ var dictColumn = $scope.cubeMetaFrame.dictionaries[i].column;
+ if (distinctMeasures.indexOf(dictColumn) === -1 && reuseColumns.indexOf(dictColumn) === -1) {
+ $scope.cubeMetaFrame.dictionaries.splice(i, 1);
}
- });
+ }
}
$scope.$on('MeasuresEdited', function (event) {
@@ -786,6 +787,12 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio
}
});
+ $scope.$on('AdvancedSettingEdited', function (event) {
+ if ($scope.cubeMetaFrame) {
+ reGenerateAdvancedDict();
+ }
+ });
+
$scope.$on('DimensionsEdited', function (event) {
if ($scope.cubeMetaFrame) {
reGenerateRowKey();
--
To stop receiving notification emails like this one, please contact
chen@apache.org.