diff --git a/ui/src/app/shared/api/task.service.spec.ts b/ui/src/app/shared/api/task.service.spec.ts index 65e556d6c..daf7c690a 100644 --- a/ui/src/app/shared/api/task.service.spec.ts +++ b/ui/src/app/shared/api/task.service.spec.ts @@ -75,7 +75,7 @@ describe('shared/api/task.service.ts', () => { const httpUri = mockHttp.post.calls.mostRecent().args[0]; const headerArgs = mockHttp.post.calls.mostRecent().args[2].headers; const httpParams = mockHttp.post.calls.mostRecent().args[2].params; - expect(httpUri).toEqual('/tasks/executions'); + expect(httpUri).toEqual('/tasks/executions/launch'); expect(headerArgs.get('Content-Type')).toEqual('application/json'); expect(headerArgs.get('Accept')).toEqual('application/json'); expect(httpParams.get('name')).toEqual('foo'); @@ -120,10 +120,10 @@ describe('shared/api/task.service.ts', () => { it('getExecution', () => { mockHttp.get.and.returnValue(of(jsonData)); - taskService.getExecution('foo', 'boot3'); + taskService.getExecution(0, 'boot3'); const httpUri = mockHttp.get.calls.mostRecent().args[0]; const headerArgs = mockHttp.get.calls.mostRecent().args[1].headers; - expect(httpUri).toEqual('/tasks/executions/foo'); + expect(httpUri).toEqual('/tasks/executions/0'); expect(headerArgs.get('Content-Type')).toEqual('application/json'); expect(headerArgs.get('Accept')).toEqual('application/json'); }); diff --git a/ui/src/app/shared/api/task.service.ts b/ui/src/app/shared/api/task.service.ts index fd319efc5..ca116728d 100644 --- a/ui/src/app/shared/api/task.service.ts +++ b/ui/src/app/shared/api/task.service.ts @@ -106,9 +106,8 @@ export class TaskService { executionClean(taskExecution: TaskExecution): Observable { const headers = HttpUtils.getDefaultHttpHeaders(); const params = new HttpParams({encoder: new DataflowEncoder()}) - .append('action', 'REMOVE_DATA') .append('schemaTarget', taskExecution.schemaTarget); - const url = UrlUtilities.calculateBaseApiUrl() + `tasks/executions/${taskExecution.executionId}`; + const url = UrlUtilities.calculateBaseApiUrl() + `tasks/executions/${taskExecution.executionId}?action=REMOVE_DATA`; return this.httpClient .delete(url, { headers, @@ -188,7 +187,7 @@ export class TaskService { const headers = HttpUtils.getDefaultHttpHeaders(); const params = new HttpParams({encoder: new DataflowEncoder()}).set('schemaTarget', schemaTarget); return this.httpClient - .get(UrlUtilities.calculateBaseApiUrl() + `tasks/executions/${executionId}`, { + .get(UrlUtilities.calculateBaseApiUrl() + `tasks/executions/${executionId ?? 0}`, { headers: headers, params: params }) @@ -210,9 +209,9 @@ export class TaskService { } }); } - const params = new HttpParams({encoder: new DataflowEncoder()}).append('platformName', platformName); + const params = new HttpParams({encoder: new DataflowEncoder()}); return this.httpClient - .get(UrlUtilities.calculateBaseApiUrl() + `tasks/logs/${taskExecution.externalExecutionId}`, { + .get(UrlUtilities.calculateBaseApiUrl() + `tasks/logs/${taskExecution.externalExecutionId}?platformName=${platformName}`, { headers, params })