Skip to content

Commit

Permalink
Merge pull request apache#109 from chenzhx/master
Browse files Browse the repository at this point in the history
KYLIN-3265 Add jobSearchMode as a filter condition for jobs UI part
  • Loading branch information
chenzhx authored Mar 1, 2018
2 parents 76934db + 31cc006 commit 6afe713
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webapp/app/js/controllers/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down Expand Up @@ -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 = {
Expand All @@ -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;

Expand Down
5 changes: 5 additions & 0 deletions webapp/app/js/model/jobConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down
2 changes: 2 additions & 0 deletions webapp/app/js/model/jobListModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ KylinApp.service('JobList',function(JobService,$q){
this.jobFilter = {
cubeName : null,
timeFilterId : 1,
searchModeId: 2,
statusIds: []
};

this.clearJobFilter = function(){
this.jobFilter = {
cubeName : null,
timeFilterId : 1,
searchModeId: 2,
statusIds: []
};
};
Expand Down
3 changes: 3 additions & 0 deletions webapp/app/partials/jobs/jobList.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6afe713

Please sign in to comment.