You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by lu...@apache.org on 2015/09/06 09:39:24 UTC

[18/50] [abbrv] incubator-kylin git commit: KYLIN-866 , confirm with user when selects empty segments to merge

KYLIN-866 ,confirm with user when selects empty segments to merge


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/5bcce8b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/5bcce8b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/5bcce8b9

Branch: refs/heads/master
Commit: 5bcce8b9fe19e49e7121875c74c13a22e8be18ab
Parents: 9c72e30
Author: jiazhong <ji...@ebay.com>
Authored: Wed Aug 12 10:46:04 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Wed Aug 12 10:46:51 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubes.js | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5bcce8b9/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index b5d31d0..75bcb6d 100755
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -420,6 +420,25 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
       loadingRequest.hide();
       if (e.data && e.data.exception) {
         var message = e.data.exception;
+
+        if(message.indexOf("Empty cube segment found")!=-1){
+          var _segment = message.substring(message.indexOf(":")+1,message.length-1);
+          SweetAlert.swal({
+            title:'',
+            type:'info',
+            text: 'Empty cube segment found'+':'+_segment+', do you want to merge segments forcely ?',
+            showCancelButton: true,
+            confirmButtonColor: '#DD6B55',
+            closeOnConfirm: true
+          }, function (isConfirm) {
+            if (isConfirm) {
+              $scope.jobBuildRequest.forceMergeEmptySegment = true;
+              $scope.rebuild(jobsubmit);
+            }
+          });
+          return;
+        }
+
         var msg = !!(message) ? message : 'Failed to take action.';
         SweetAlert.swal('Oops...', msg, 'error');
       } else {
@@ -464,12 +483,6 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
   };
 
   $scope.updateDate = function () {
-
-
-//        if ($scope.cube.detail.partition_desc.cube_partition_type=='UPDATE_INSERT')
-//        {
-//            $scope.jobBuildRequest.startTime=$scope.formatDate($scope.jobBuildRequest.startTime);
-//        }
     $scope.jobBuildRequest.endTime = $scope.formatDate($scope.jobBuildRequest.endTime);
   };