From: Wouter Admiraal Date: Fri, 26 Feb 2021 08:56:41 +0000 (+0100) Subject: SONAR-13998 Access to background task fail when not an main branch X-Git-Tag: 8.8.0.42792~74 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=74dc15f399f6a6a31af839d189c3f99f925df2c3;p=sonarqube.git SONAR-13998 Access to background task fail when not an main branch --- 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({