chenzhx closed pull request #109: KYLIN-3265 Add jobSearchMode as a filter condition for jobs UI part URL: https://github.com/apache/kylin/pull/109
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/webapp/app/js/controllers/job.js b/webapp/app/js/controllers/job.js index 51de7874e0..130f14dffc 100644 --- a/webapp/app/js/controllers/job.js +++ b/webapp/app/js/controllers/job.js @@ -28,6 +28,7 @@ KylinApp //$scope.projects = []; $scope.action = {}; $scope.timeFilter = jobConfig.timeFilter[JobList.jobFilter.timeFilterId]; + $scope.searchMode = jobConfig.searchMode[JobList.jobFilter.searchModeId]; if ($routeParams.jobTimeFilter) { $scope.timeFilter = jobConfig.timeFilter[$routeParams.jobTimeFilter]; } @@ -82,6 +83,7 @@ KylinApp $scope.cubeName=$scope.cubeName == ""?null:$scope.cubeName; JobList.jobFilter.cubeName = $scope.cubeName; JobList.jobFilter.timeFilterId = $scope.timeFilter.value; + JobList.jobFilter.searchModeId = _.indexOf(jobConfig.searchMode, $scope.searchMode); JobList.jobFilter.statusIds = statusIds; var jobRequest = { @@ -90,7 +92,8 @@ KylinApp status: statusIds, offset: offset, limit: limit, - timeFilter: $scope.timeFilter.value + timeFilter: $scope.timeFilter.value, + jobSearchMode: $scope.searchMode.value }; $scope.state.loading = true; diff --git a/webapp/app/js/model/jobConfig.js b/webapp/app/js/model/jobConfig.js index 4548366579..19ae882c98 100644 --- a/webapp/app/js/model/jobConfig.js +++ b/webapp/app/js/model/jobConfig.js @@ -40,6 +40,11 @@ KylinApp.constant('jobConfig', { {attr: 'last_modified', name: 'Last Modified Time'}, {attr: 'duration', name: 'Duration'} ], + searchMode: [ + {name: 'CUBING', value: 'CUBING_ONLY'}, + {name: 'CHECK POINT', value: 'CHECKPOINT_ONLY'}, + {name: 'ALL', value: 'ALL'} + ], queryitems: [ {attr: 'server', name: 'Server'}, {attr: 'user', name: 'User'}, diff --git a/webapp/app/js/model/jobListModel.js b/webapp/app/js/model/jobListModel.js index 45948d63e3..197532c076 100755 --- a/webapp/app/js/model/jobListModel.js +++ b/webapp/app/js/model/jobListModel.js @@ -26,6 +26,7 @@ KylinApp.service('JobList',function(JobService,$q){ this.jobFilter = { cubeName : null, timeFilterId : 1, + searchModeId: 2, statusIds: [] }; @@ -33,6 +34,7 @@ KylinApp.service('JobList',function(JobService,$q){ this.jobFilter = { cubeName : null, timeFilterId : 1, + searchModeId: 2, statusIds: [] }; }; diff --git a/webapp/app/partials/jobs/jobList.html b/webapp/app/partials/jobs/jobList.html index 1ff6ea4f2f..ae05590669 100644 --- a/webapp/app/partials/jobs/jobList.html +++ b/webapp/app/partials/jobs/jobList.html @@ -45,6 +45,9 @@ <select data-ng-model="timeFilter" data-ng-options="s.name for s in jobConfig.timeFilter"> </select> + <select data-ng-model="searchMode" + data-ng-options="s.name for s in jobConfig.searchMode"> + </select> </label> <label ng-repeat="s in jobConfig.allStatus" class="checkbox-inline" > <input type="checkbox" ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services