You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bi...@apache.org on 2018/03/01 02:32:30 UTC

[kylin] branch 2.3.x updated: KYLIN-3265 Add jobSearchMode as a filter condition for jobs UI part

This is an automated email from the ASF dual-hosted git repository.

billyliu pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/2.3.x by this push:
     new 4b0d7bd  KYLIN-3265 Add jobSearchMode as a filter condition for jobs UI part
4b0d7bd is described below

commit 4b0d7bd38b42c5e580fa580d0318834654081dc9
Author: liapan <li...@ebay.com>
AuthorDate: Mon Feb 26 13:58:32 2018 +0800

    KYLIN-3265 Add jobSearchMode as a filter condition for jobs UI part
    
    Signed-off-by: chenzhx <ch...@apache.org>
---
 webapp/app/js/controllers/job.js      | 5 ++++-
 webapp/app/js/model/jobConfig.js      | 5 +++++
 webapp/app/js/model/jobListModel.js   | 2 ++
 webapp/app/partials/jobs/jobList.html | 3 +++
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/webapp/app/js/controllers/job.js b/webapp/app/js/controllers/job.js
index 51de787..130f14d 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 4548366..19ae882 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 45948d6..197532c 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 1ff6ea4..ae05590 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"

-- 
To stop receiving notification emails like this one, please contact
billyliu@apache.org.