You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by GitBox <gi...@apache.org> on 2018/07/04 06:38:05 UTC

[GitHub] chenzhx closed pull request #162: KYLIN-3440 Couldn't merge if there is an empty segment

chenzhx closed pull request #162: KYLIN-3440 Couldn't merge if there is an empty segment
URL: https://github.com/apache/kylin/pull/162
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index cbd6fad1bb..2318ba5fed 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -619,19 +619,15 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
     startTime = cube.segments[cube.segments.length-1].date_range_end;
   }
   $scope.jobBuildRequest.startTime=startTime;
-  $scope.rebuild = function () {
-
+  $scope.rebuild = function (isForce) {
     $scope.message = null;
-
     if ($scope.jobBuildRequest.startTime >= $scope.jobBuildRequest.endTime) {
       $scope.message = "WARNING: End time should be later than the start time.";
-
       return;
     }
-
+    $scope.jobBuildRequest.forceMergeEmptySegment = !!isForce;
     loadingRequest.show();
     CubeService.rebuildCube({cubeId: cube.name}, $scope.jobBuildRequest, function (job) {
-
       loadingRequest.hide();
       $modalInstance.dismiss('cancel');
       SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
@@ -639,8 +635,6 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
           $scope.cubeList.cubes[$scope.cubeList.cubes.indexOf(cube)] = _cube;
         });
     }, function (e) {
-
-
       loadingRequest.hide();
       if (e.data && e.data.exception) {
         var message = e.data.exception;
@@ -656,14 +650,11 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
             closeOnConfirm: true
           }, function (isConfirm) {
             if (isConfirm) {
-              $scope.jobBuildRequest.forceMergeEmptySegment = true;
-              $scope.rebuild();
-              delete $scope.jobBuildRequest.forceMergeEmptySegment;
+              $scope.rebuild(true);
             }
           });
           return;
         }
-
         if(message.indexOf("Merging segments must not have gaps between")!=-1){
           SweetAlert.swal({
             title:'',
@@ -674,9 +665,7 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic
             closeOnConfirm: true
           }, function (isConfirm) {
             if (isConfirm) {
-              $scope.jobBuildRequest.forceMergeEmptySegment = true;
-              $scope.rebuild();
-              delete $scope.jobBuildRequest.forceMergeEmptySegment;
+              $scope.rebuild(true);
             }
           });
           return;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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