ClausClaus commented on a change in pull request #780: KYLIN-4113  Remove the 
surplus allCubes field
URL: https://github.com/apache/kylin/pull/780#discussion_r309638188
 
 

 ##########
 File path: webapp/app/js/controllers/cubeSchema.js
 ##########
 @@ -303,9 +290,16 @@ KylinApp.controller('CubeSchemaCtrl', function ($scope, 
QueryService, UserServic
 
   $scope.check_cube_info = function(){
 
-    if(($scope.state.mode === "edit") 
&&$scope.cubeMode=="addNewCube"&&($scope.allCubes.indexOf($scope.cubeMetaFrame.name.toUpperCase())
 >= 0)){
-      SweetAlert.swal('Oops...', "The cube named [" + 
$scope.cubeMetaFrame.name.toUpperCase() + "] already exists", 'warning');
-      return false;
+    if ($scope.state.mode === "edit" && $scope.cubeMode === "addNewCube") {
+      var cubeName = $scope.cubeMetaFrame.name;
+      return new Promise(function (resolve) {
+        $http.get(Config.service.url + "cubes/validate/" + 
cubeName).success(function (res) {
 
 Review comment:
   > It is better to move these request code to app/js/services/cubes.js
   
   Hello there! My original warehouse was messed up, I re-forked a code to 
mention the PR, I made some code changes for your modification comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to