You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ch...@apache.org on 2018/07/04 06:20:23 UTC
[kylin] branch master updated: KYLIN-3440 Couldn't merge if there
is an empty segment (#161)
This is an automated email from the ASF dual-hosted git repository.
chen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 40dd2be KYLIN-3440 Couldn't merge if there is an empty segment (#161)
40dd2be is described below
commit 40dd2be1d2456029a2308abe2c94353bbe75dca9
Author: luguosheng1314 <55...@qq.com>
AuthorDate: Wed Jul 4 14:20:21 2018 +0800
KYLIN-3440 Couldn't merge if there is an empty segment (#161)
---
webapp/app/js/controllers/cubes.js | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index 136d86e..d5541fb 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -640,19 +640,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');
@@ -660,8 +656,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;
@@ -677,14 +671,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:'',
@@ -695,9 +686,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;