You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/10/26 04:00:26 UTC
[2/3] kylin git commit: KYLIN-2070 UI changes for allowing concurrent
build/refresh/merge
KYLIN-2070 UI changes for allowing concurrent build/refresh/merge
Signed-off-by: shaofengshi <sh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e901cf28
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e901cf28
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e901cf28
Branch: refs/heads/v1.6.0-rc1
Commit: e901cf282f9ba7617628526eceac3e61938d5d08
Parents: 7830f83
Author: luguosheng <55...@qq.com>
Authored: Fri Oct 21 11:40:19 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Oct 26 12:00:13 2016 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/cubes.js | 40 ++++++++++++++++++++++++++++-----
webapp/app/js/services/cubes.js | 1 +
2 files changed, 36 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/e901cf28/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index 499e93c..f735fb8 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -334,12 +334,42 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location,
$scope.loadDetail(cube);
// for streaming cube build tip
if(cube.streaming){
- $modal.open({
- templateUrl: 'streamingBuild.html',
- controller: streamingBuildCtrl,
- resolve: {
+
+ SweetAlert.swal({
+ title: '',
+ text: "Are you sure to start the build?",
+ type: '',
+ showCancelButton: true,
+ confirmButtonColor: '#DD6B55',
+ confirmButtonText: "Yes",
+ closeOnConfirm: true
+ }, function(isConfirm) {
+ if(isConfirm){
+ loadingRequest.show();
+ CubeService.rebuildStreamingCube(
+ {
+ cubeId: cube.name
+ },
+ {
+ sourceOffsetStart:0,
+ sourceOffsetEnd:'9223372036854775807',
+ buildType:'BUILD'
+ }, function (job) {
+ loadingRequest.hide();
+ SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
+ },function(e){
+
+ loadingRequest.hide();
+ if(e.data&& e.data.exception){
+ var message =e.data.exception;
+ var msg = !!(message) ? message : 'Failed to take action.';
+ SweetAlert.swal('Oops...', msg, 'error');
+ }else{
+ SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+ }
+ });
}
- });
+ })
return;
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/e901cf28/webapp/app/js/services/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cubes.js b/webapp/app/js/services/cubes.js
index 953f157..de60f55 100644
--- a/webapp/app/js/services/cubes.js
+++ b/webapp/app/js/services/cubes.js
@@ -26,6 +26,7 @@ KylinApp.factory('CubeService', ['$resource', function ($resource, config) {
cost: {method: 'PUT', params: {action: 'cost'}, isArray: false},
rebuildLookUp: {method: 'PUT', params: {propName: 'segs', action: 'refresh_lookup'}, isArray: false},
rebuildCube: {method: 'PUT', params: {action: 'rebuild'}, isArray: false},
+ rebuildStreamingCube: {method: 'PUT', params: {action: 'build2'}, isArray: false},
disable: {method: 'PUT', params: {action: 'disable'}, isArray: false},
enable: {method: 'PUT', params: {action: 'enable'}, isArray: false},
purge: {method: 'PUT', params: {action: 'purge'}, isArray: false},