From 555b398dc1991251e4f088723e4eab9e53b5946a Mon Sep 17 00:00:00 2001 From: "peng.jianhua" Date: Wed, 29 Nov 2017 21:33:22 +0800 Subject: [PATCH] KYLIN-3029 The warning window of exist cube name is not work --- webapp/app/js/controllers/cubeSchema.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/webapp/app/js/controllers/cubeSchema.js b/webapp/app/js/controllers/cubeSchema.js index a912c72c7..5c843b0f6 100755 --- a/webapp/app/js/controllers/cubeSchema.js +++ b/webapp/app/js/controllers/cubeSchema.js @@ -160,6 +160,18 @@ KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserServic }); + var queryParam = {offset: 0, limit: 65535}; + + CubeService.list(queryParam, function (all_cubes) { + if($scope.allCubes.length > 0){ + $scope.allCubes.splice(0,$scope.allCubes.length); + } + + for (var i = 0; i < all_cubes.length; i++) { + $scope.allCubes.push(all_cubes[i].name.toUpperCase()); + } + }); + // ~ public methods $scope.filterProj = function(project){ return $scope.userService.hasRole('ROLE_ADMIN') || $scope.hasPermission(project,$scope.permissions.ADMINISTRATION.mask); @@ -292,18 +304,6 @@ KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserServic $scope.check_cube_info = function(){ - var queryParam = {offset: 0, limit: 65535}; - - CubeService.list(queryParam, function (all_cubes) { - if($scope.allCubes.length > 0){ - $scope.allCubes.splice(0,$scope.allCubes.length); - } - - for (var i = 0; i < all_cubes.length; i++) { - $scope.allCubes.push(all_cubes[i].name.toUpperCase()); - } - }); - 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; -- 2.14.2.windows.3