diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-02 12:19:40 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-02 12:19:40 +0200 |
commit | fccefba5bd06d0b7d9635bb8d8b3523351822362 (patch) | |
tree | 8ee4382d08f07bd03b8167d6422b8a54eb8487a1 /server/sonar-web/src/main/js | |
parent | 042fb29537e9a561613d1f84d78294ff2d4fe496 (diff) | |
download | sonarqube-fccefba5bd06d0b7d9635bb8d8b3523351822362.tar.gz sonarqube-fccefba5bd06d0b7d9635bb8d8b3523351822362.zip |
SONAR-6833 provide "componentId" parameter to api/ce/queue
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/api/ce.js | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/background-tasks/main.js | 15 |
2 files changed, 5 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/api/ce.js b/server/sonar-web/src/main/js/api/ce.js index f14185b7882..4fcf075acea 100644 --- a/server/sonar-web/src/main/js/api/ce.js +++ b/server/sonar-web/src/main/js/api/ce.js @@ -1,8 +1,8 @@ import $ from 'jquery'; -export function getQueue () { +export function getQueue (data) { let url = baseUrl + '/api/ce/queue'; - return $.get(url); + return $.get(url, data); } export function getActivity (data) { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/main.js b/server/sonar-web/src/main/js/apps/background-tasks/main.js index b9b7ced5138..026f2d7e264 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/main.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/main.js @@ -24,16 +24,6 @@ export default React.createClass({ }; }, - filterQueueForComponent(queue) { - if (this.props.options.componentId) { - return queue.filter(task => { - return task.componentId === this.props.options.componentId; - }); - } else { - return queue; - } - }, - componentDidMount() { this.requestData(); }, @@ -91,9 +81,10 @@ export default React.createClass({ }, requestQueue() { + let filters = this.getComponentFilter(); if (!Object.keys(this.getCurrentFilters()).length) { - getQueue().done(queue => { - let tasks = this.filterQueueForComponent(queue.tasks); + getQueue(filters).done(queue => { + let tasks = queue.tasks; this.setState({ queue: this.orderTasks(tasks), pendingCount: this.countPending(tasks), |