Repository: kylin Updated Branches: refs/heads/2.x-staging f6469367a -> 9d4c421f5
KYLIN-1287 UI update for streaming build action Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9d4c421f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9d4c421f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9d4c421f Branch: refs/heads/2.x-staging Commit: 9d4c421f5098d75e39529735f74fa6ae2f059159 Parents: f646936 Author: jian <jiazh...@apache.org> Authored: Tue Jan 5 15:15:49 2016 +0800 Committer: jian <jiazh...@apache.org> Committed: Tue Jan 5 15:16:14 2016 +0800 ---------------------------------------------------------------------- build/conf/kylin.properties | 4 ++++ .../test_case_data/sandbox/kylin.properties | 4 ++++ webapp/app/js/controllers/cubes.js | 24 ++++++++++++++++++- webapp/app/partials/cubes/cubes.html | 1 + .../app/partials/cubes/streaming_build_tip.html | 25 ++++++++++++++++++++ 5 files changed, 57 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/9d4c421f/build/conf/kylin.properties ---------------------------------------------------------------------- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index 836f00d..44a282e 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -126,6 +126,10 @@ kylin.web.help.0=start|Getting Started| kylin.web.help.1=odbc|ODBC Driver| kylin.web.help.2=tableau|Tableau Guide| kylin.web.help.3=onboard|Cube Design Tutorial| + +#guide user how to build streaming cube +kylin.web.streaming.guide=http://kylin.apache.org/ + #hadoop url link ,optional kylin.web.hadoop= #job diagnostic url link ,optional http://git-wip-us.apache.org/repos/asf/kylin/blob/9d4c421f/examples/test_case_data/sandbox/kylin.properties ---------------------------------------------------------------------- diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties index 1525881..96669af 100644 --- a/examples/test_case_data/sandbox/kylin.properties +++ b/examples/test_case_data/sandbox/kylin.properties @@ -94,6 +94,10 @@ kylin.web.help.0=start|Getting Started| kylin.web.help.1=odbc|ODBC Driver| kylin.web.help.2=tableau|Tableau Guide| kylin.web.help.3=onboard|Cube Design Tutorial| + +#guide user how to build streaming cube +kylin.web.streaming.guide=http://kylin.apache.org/ + #hadoop url link ,optional kylin.web.hadoop= #job diagnostic url link ,optional http://git-wip-us.apache.org/repos/asf/kylin/blob/9d4c421f/webapp/app/js/controllers/cubes.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js index 528adb2..69243e4 100644 --- a/webapp/app/js/controllers/cubes.js +++ b/webapp/app/js/controllers/cubes.js @@ -19,7 +19,7 @@ 'use strict'; KylinApp - .controller('CubesCtrl', function ($scope, $q, $routeParams, $location, $modal, MessageService, CubeDescService, CubeService, JobService, UserService, ProjectService, SweetAlert, loadingRequest, $log, cubeConfig, ProjectModel, ModelService, MetaModel, CubeList,modelsManager,cubesManager,StreamingList) { + .controller('CubesCtrl', function ($scope, $q, $routeParams, $location, $modal, MessageService, CubeDescService, CubeService, JobService, UserService, ProjectService, SweetAlert, loadingRequest, $log, cubeConfig, ProjectModel, ModelService, MetaModel, CubeList,modelsManager,cubesManager,StreamingList,kylinConfig) { $scope.cubeConfig = cubeConfig; $scope.cubeList = CubeList; @@ -278,6 +278,18 @@ KylinApp }; $scope.startJobSubmit = function (cube) { + + // for streaming cube build tip + if(cube.streaming){ + $modal.open({ + templateUrl: 'streamingBuild.html', + controller: streamingBuildCtrl, + resolve: { + } + }); + return; + } + $scope.metaModel={ model:modelsManager.getModelByCube(cube.name) } @@ -509,3 +521,13 @@ var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageServic }; }; + +var streamingBuildCtrl = function ($scope, $modalInstance,kylinConfig) { + $scope.kylinConfig = kylinConfig; + var streamingGuildeUrl = kylinConfig.getProperty("kylin.web.streaming.guide"); + $scope.streamingBuildUrl = streamingGuildeUrl?streamingGuildeUrl:"http://kylin.apache.org/"; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; +} http://git-wip-us.apache.org/repos/asf/kylin/blob/9d4c421f/webapp/app/partials/cubes/cubes.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubes/cubes.html b/webapp/app/partials/cubes/cubes.html index fdf3277..2b456f4 100644 --- a/webapp/app/partials/cubes/cubes.html +++ b/webapp/app/partials/cubes/cubes.html @@ -133,6 +133,7 @@ </div> <div ng-include="'partials/jobs/job_submit.html'"></div> +<div ng-include="'partials/cubes/streaming_build_tip.html'"></div> <div ng-include="'partials/jobs/job_refresh.html'"></div> <div ng-include="'partials/jobs/job_merge.html'"></div> <div ng-include="'partials/projects/project_create.html'"></div> http://git-wip-us.apache.org/repos/asf/kylin/blob/9d4c421f/webapp/app/partials/cubes/streaming_build_tip.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubes/streaming_build_tip.html b/webapp/app/partials/cubes/streaming_build_tip.html new file mode 100644 index 0000000..80c5875 --- /dev/null +++ b/webapp/app/partials/cubes/streaming_build_tip.html @@ -0,0 +1,25 @@ +<!-- +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +--> + +<script type="text/ng-template" id="streamingBuild.html"> + <div class="callout callout-info"> + <button type="button" class="close" data-dismiss="alert" ng-click="cancel()">Ã</button> + <h4><i class="fa fa-bullhorn"></i> Tips</h4> + Streaming cube build is not supported on UI, click <a href="{{streamingBuildUrl}}" style="color:blue;" target="_blank">here</a> to see how to schedule streaming cube. + </div> +</script>