diff --git a/README.md b/README.md index 8a6bf638e..05b015d3d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ To regnerate http rune swaagger ``` -BASE=https://timo-redaction-dev.iqser.cloud/ +BASE=https://redapi-staging.iqser.cloud/ URL="$BASE"v2/api-docs?group=redaction-gateway-v1 mkdir -p /tmp/swagger swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.html b/apps/red-ui/src/app/common/file-actions/file-actions.component.html index c79677b24..fba698805 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.html @@ -96,7 +96,7 @@ this.actionPerformed.emit('assign-reviewer')); } - reanalyseFile($event: MouseEvent, fileStatusWrapper: FileStatusWrapper) { + reanalyseFile($event: MouseEvent, fileStatusWrapper: FileStatusWrapper, priority = -1) { $event.stopPropagation(); - this._fileActionService.reanalyseFile(fileStatusWrapper).subscribe(() => { + this._fileActionService.reanalyseFile(fileStatusWrapper, priority).subscribe(() => { this.reloadProjects('reanalyse'); }); } diff --git a/apps/red-ui/src/app/screens/file/service/file-action.service.ts b/apps/red-ui/src/app/screens/file/service/file-action.service.ts index 45dde39a7..8b46665ca 100644 --- a/apps/red-ui/src/app/screens/file/service/file-action.service.ts +++ b/apps/red-ui/src/app/screens/file/service/file-action.service.ts @@ -20,11 +20,11 @@ export class FileActionService { private readonly _appStateService: AppStateService ) {} - public reanalyseFile(fileStatusWrapper?: FileStatusWrapper) { + public reanalyseFile(fileStatusWrapper?: FileStatusWrapper, priority = -1) { if (!fileStatusWrapper) { fileStatusWrapper = this._appStateService.activeFile; } - return this._reanalysisControllerService.reanalyzeFile(this._appStateService.activeProject.project.projectId, fileStatusWrapper.fileId); + return this._reanalysisControllerService.reanalyzeFile(this._appStateService.activeProject.project.projectId, fileStatusWrapper.fileId, priority); } public async assignProjectReviewerFromOverview(file?: FileStatusWrapper, callback?: Function) { diff --git a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts index 7ade1b6de..464d525fe 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -43,13 +43,13 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public reanalyzeFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; + public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'body', reportProgress?: boolean): Observable; - public reanalyzeFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable>; + public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public reanalyzeFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable>; + public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public reanalyzeFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { + public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe: any = 'body', reportProgress: boolean = false): Observable { if (projectId === null || projectId === undefined) { throw new Error('Required parameter projectId was null or undefined when calling reanalyzeFile.'); } @@ -58,6 +58,11 @@ export class ReanalysisControllerService { throw new Error('Required parameter fileId was null or undefined when calling reanalyzeFile.'); } + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); + if (priority !== undefined && priority !== null) { + queryParameters = queryParameters.set('priority', priority); + } + let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -80,6 +85,7 @@ export class ReanalysisControllerService { 'post', `${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe,