You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2019/07/31 12:18:03 UTC

[GitHub] [kylin] luguosheng1314 commented on a change in pull request #780: KYLIN-4113 Remove the surplus allCubes field

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

 ##########
 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

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services