aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-02 12:19:40 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-10-02 12:19:40 +0200
commitfccefba5bd06d0b7d9635bb8d8b3523351822362 (patch)
tree8ee4382d08f07bd03b8167d6422b8a54eb8487a1 /server/sonar-web/src/main/js
parent042fb29537e9a561613d1f84d78294ff2d4fe496 (diff)
downloadsonarqube-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.js4
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/main.js15
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),