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:38:06 UTC
[kylin] branch 2.3.x updated: KYLIN-3440 Couldn't merge if there is
an empty segment (#162)
This is an automated email from the ASF dual-hosted git repository.
chen pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.3.x by this push:
new 57cffa6 KYLIN-3440 Couldn't merge if there is an empty segment (#162)
57cffa6 is described below
commit 57cffa6e2264377a8c900a140823c34f91379be7
Author: luguosheng1314 <55...@qq.com>
AuthorDate: Wed Jul 4 14:38:03 2018 +0800
KYLIN-3440 Couldn't merge if there is an empty segment (#162)
---
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 cbd6fad..2318ba5 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;