kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3265) Add "jobSearchMode" as a condition to "/kylin/api/jobs" API
Date Thu, 01 Mar 2018 02:30:00 GMT

    [ https://issues.apache.org/jira/browse/KYLIN-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381410#comment-16381410
] 

ASF GitHub Bot commented on KYLIN-3265:
---------------------------------------

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:
users@infra.apache.org


> Add "jobSearchMode" as a condition to "/kylin/api/jobs" API
> -----------------------------------------------------------
>
>                 Key: KYLIN-3265
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3265
>             Project: Kylin
>          Issue Type: Improvement
>          Components: REST Service
>    Affects Versions: v2.3.0
>            Reporter: Shaofeng SHI
>            Priority: Major
>             Fix For: v2.3.0
>
>         Attachments: KYLIN-3265.master.002.patch, KYLIN-3265.master.003.patch, Screen
Shot 2018-02-26 at 1.55.21 PM.png
>
>
> In kylin 2.3, the "/kylin/jobs" API will return both cubing job and checkpoint job together,
this changed the API's behavior as there isn't checkpoint job before. We should keep the api
only return cubing jobs to be compitable as before, and extend the API to add another condition
'jobSearchMode' to determine which kind of job should be returned. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message