priority analysis
This commit is contained in:
parent
e4fe1a558a
commit
630f103ce6
@ -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
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
|
||||
<!-- reanalyse file preview -->
|
||||
<redaction-circle-button
|
||||
(action)="reanalyseFile($event, fileStatus)"
|
||||
(action)="reanalyseFile($event, fileStatus, 100)"
|
||||
*ngIf="permissionsService.canReanalyseFile(fileStatus) && screen === 'file-preview'"
|
||||
[tooltipPosition]="'before'"
|
||||
icon="red:refresh"
|
||||
|
||||
@ -57,9 +57,9 @@ export class FileActionsComponent implements OnInit {
|
||||
await this._fileActionService.assignProjectReviewerFromOverview(file, () => 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');
|
||||
});
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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<any>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public reanalyzeFile(projectId: string, fileId: string, priority?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
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', <any>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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user