Repository: kylin Updated Branches: refs/heads/master bd62929c5 -> 51c275f3e
KYLIN-869 Enhance mail notification Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/51c275f3 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/51c275f3 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/51c275f3 Branch: refs/heads/master Commit: 51c275f3e3f43c4d3e470944306e32291eca817d Parents: bd62929 Author: Jason <jiat...@163.com> Authored: Thu May 5 16:49:03 2016 +0800 Committer: Jason <jiat...@163.com> Committed: Thu May 5 16:49:03 2016 +0800 ---------------------------------------------------------------------- .../org/apache/kylin/engine/mr/CubingJob.java | 2 +- webapp/app/js/model/cubeConfig.js | 3 ++- webapp/app/js/model/cubeDescModel.js | 1 + webapp/app/partials/cubeDesigner/info.html | 24 ++++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/51c275f3/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java ---------------------------------------------------------------------- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java index 7428a2f..70b6132 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java @@ -117,7 +117,7 @@ public class CubingJob extends DefaultChainedExecutable { final Output output = jobService.getOutput(getId()); String logMsg; state = output.getState(); - if (state != ExecutableState.ERROR && !cubeInstance.getDescriptor().getStatusNeedNotify().contains(state.toString().toLowerCase())) { + if (state != ExecutableState.ERROR && !cubeInstance.getDescriptor().getStatusNeedNotify().contains(state.toString())) { logger.info("state:" + state + " no need to notify users"); return null; } http://git-wip-us.apache.org/repos/asf/kylin/blob/51c275f3/webapp/app/js/model/cubeConfig.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/model/cubeConfig.js b/webapp/app/js/model/cubeConfig.js index 42bba48..3f97254 100644 --- a/webapp/app/js/model/cubeConfig.js +++ b/webapp/app/js/model/cubeConfig.js @@ -97,5 +97,6 @@ KylinApp.constant('cubeConfig', { ], rowKeyShardOptions:[ true,false - ] + ], + statusNeedNofity:['ERROR', 'DISCARDED', 'SUCCEED'] }); http://git-wip-us.apache.org/repos/asf/kylin/blob/51c275f3/webapp/app/js/model/cubeDescModel.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/model/cubeDescModel.js b/webapp/app/js/model/cubeDescModel.js index a73ccf3..30821d3 100644 --- a/webapp/app/js/model/cubeDescModel.js +++ b/webapp/app/js/model/cubeDescModel.js @@ -53,6 +53,7 @@ KylinApp.service('CubeDescModel', function () { "column_family": [] }, "retention_range": "0", + "status_need_notify":['ERROR', 'DISCARDED', 'SUCCEED'], "auto_merge_time_ranges": [604800000, 2419200000], "engine_type": 2, "storage_type":2, http://git-wip-us.apache.org/repos/asf/kylin/blob/51c275f3/webapp/app/partials/cubeDesigner/info.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubeDesigner/info.html b/webapp/app/partials/cubeDesigner/info.html index a1d876b..ec9fc49 100644 --- a/webapp/app/partials/cubeDesigner/info.html +++ b/webapp/app/partials/cubeDesigner/info.html @@ -81,6 +81,29 @@ </div> </div> + <div class="form-group"> + <div class="row"> + <label class="col-xs-12 col-sm-3 control-label no-padding-right font-color-default"> + <b>Notification Status</b> + </label> + <div class="col-xs-12 col-sm-6"> + + <ui-select + autofocus="true" + close-on-select="false" + ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="cubeMetaFrame.status_need_notify"> + <ui-select-match placeholder="Select Status...">{{$item}}</ui-select-match> + <ui-select-choices + repeat="status as status in cubeConfig.statusNeedNofity | filter:$select.search"> + {{status}} + </ui-select-choices> + </ui-select> + + <span ng-if="state.mode=='view'">{{cubeMetaFrame.status_need_notify}}</span> + </div> + </div> + </div> + <!--Description--> <div class="form-group"> <div class="row"> @@ -110,6 +133,7 @@ <li>Cube name is unique name of entire system</li> <li>Can not edit cube name after created</li> <li>Cube must belong to project which you have privilege to create</li> + <li>Error status will notify by default</li> </ol> </div> </div>