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 2017/03/06 10:15:18 UTC
kylin git commit: KYLIN-2483 solve bug for straming build
Repository: kylin
Updated Branches:
refs/heads/master 4d1f169cd -> 0e632fe75
KYLIN-2483 solve bug for straming build
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/0e632fe7
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0e632fe7
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0e632fe7
Branch: refs/heads/master
Commit: 0e632fe75519966ef96313a51636736b1cc22bc5
Parents: 4d1f169
Author: luguosheng <55...@qq.com>
Authored: Mon Mar 6 17:51:19 2017 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Mon Mar 6 18:14:45 2017 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/cubes.js | 53 +++++++++++++++++++++------------
1 file changed, 34 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/0e632fe7/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index cbdbb7d..6b59ef4 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -304,28 +304,43 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location,
if(table && table.source_type == 1){
cube.streaming = true;
}
-
// for streaming cube build tip
if(cube.streaming){
- $modal.open({
- templateUrl: 'streamingBuild.html',
- controller: streamingBuildCtrl,
- resolve: {
- cube: function () {
- return cube;
- },
- metaModel:function(){
- return $scope.metaModel;
- },
- buildType: function () {
- return 'BUILD';
- },
- scope:function(){
-
- return $scope;
- }
+ 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;
}