kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject [1/2] kylin git commit: minor, code review
Date Mon, 08 Jan 2018 06:02:18 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 2ee18bc82 -> 91c76dd2d


minor, code review


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

Branch: refs/heads/master
Commit: 91c76dd2d28c6d198bafdb84db04190a7e796159
Parents: 3931157
Author: chenzhx <chen@apache.org>
Authored: Mon Jan 8 14:01:47 2018 +0800
Committer: chenzhx <chen@apache.org>
Committed: Mon Jan 8 14:02:11 2018 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubes.js | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/91c76dd2/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index e6f4d71..c123f1c 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -597,7 +597,7 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
       if (e.data && e.data.exception) {
         var message = e.data.exception;
 
-        if(message.indexOf("Empty cube segment found")!=-1 || message.indexOf("Merging segments
must not have gaps between")!=-1){
+        if(message.indexOf("Empty cube segment found")!=-1){
           var _segment = message.substring(message.indexOf(":")+1,message.length-1);
           SweetAlert.swal({
             title:'',
@@ -610,11 +610,29 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
             if (isConfirm) {
               $scope.jobBuildRequest.forceMergeEmptySegment = true;
               $scope.rebuild();
+              delete $scope.jobBuildRequest.forceMergeEmptySegment;
             }
           });
           return;
         }
 
+        if(message.indexOf("Merging segments must not have gaps between")!=-1){
+          SweetAlert.swal({
+            title:'',
+            type:'info',
+            text: 'There ares gaps between segments, do you want to merge segments forcely
?',
+            showCancelButton: true,
+            confirmButtonColor: '#DD6B55',
+            closeOnConfirm: true
+          }, function (isConfirm) {
+            if (isConfirm) {
+              $scope.jobBuildRequest.forceMergeEmptySegment = true;
+              $scope.rebuild();
+              delete $scope.jobBuildRequest.forceMergeEmptySegment;
+            }
+          });
+          return;
+        }
         var msg = !!(message) ? message : 'Failed to take action.';
         SweetAlert.swal('Oops...', msg, 'error');
       } else {


Mime
View raw message