From 74dc15f399f6a6a31af839d189c3f99f925df2c3 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 26 Feb 2021 09:56:41 +0100 Subject: [PATCH] SONAR-13998 Access to background task fail when not an main branch --- server/sonar-web/src/main/js/api/ce.ts | 8 ++------ .../background-tasks/components/BackgroundTasksApp.tsx | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts index 878aac630ea..ae1b198a420 100644 --- a/server/sonar-web/src/main/js/api/ce.ts +++ b/server/sonar-web/src/main/js/api/ce.ts @@ -43,13 +43,9 @@ export function getActivity(data: RequestData): Promise<{ tasks: Task[] }> { } export function getStatus( - componentId?: string + component?: string ): Promise<{ failing: number; inProgress: number; pending: number; pendingTime?: number }> { - const data = {}; - if (componentId) { - Object.assign(data, { componentId }); - } - return getJSON('/api/ce/activity_status', data); + return getJSON('/api/ce/activity_status', { component }); } export function getTask(id: string, additionalFields?: string[]): Promise { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx index 4feb2ce54ef..1f4fb93aea8 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx @@ -113,10 +113,10 @@ export default class BackgroundTasksApp extends React.PureComponent { if (this.mounted) { this.setState({ -- 2.39.5