File Status Updates
This commit is contained in:
parent
26cd0dd78d
commit
64488d0663
@ -89,7 +89,7 @@ export class FileStatusWrapper {
|
||||
}
|
||||
|
||||
get status() {
|
||||
return this.fileStatus.status === 'REPROCESS' ? 'PROCESSING' : this.fileStatus.status;
|
||||
return this.fileStatus.status === 'REPROCESS' || this.fileStatus.status === 'FULLREPROCESS' ? 'PROCESSING' : this.fileStatus.status;
|
||||
}
|
||||
|
||||
get numberOfPages() {
|
||||
@ -105,7 +105,12 @@ export class FileStatusWrapper {
|
||||
}
|
||||
|
||||
get isProcessing() {
|
||||
return [FileStatus.StatusEnum.REPROCESS, FileStatus.StatusEnum.OCR_PROCESSING, FileStatus.StatusEnum.PROCESSING].includes(this.status);
|
||||
return [
|
||||
FileStatus.StatusEnum.REPROCESS,
|
||||
FileStatus.StatusEnum.FULLREPROCESS,
|
||||
FileStatus.StatusEnum.OCR_PROCESSING,
|
||||
FileStatus.StatusEnum.PROCESSING
|
||||
].includes(this.status);
|
||||
}
|
||||
|
||||
get statusSort() {
|
||||
|
||||
@ -140,7 +140,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
public isProcessing(fileStatusWrapper: FileStatusWrapper) {
|
||||
return [FileStatus.StatusEnum.REPROCESS, FileStatus.StatusEnum.PROCESSING].includes(fileStatusWrapper.status);
|
||||
return [FileStatus.StatusEnum.REPROCESS, FileStatus.StatusEnum.FULLREPROCESS, FileStatus.StatusEnum.PROCESSING].includes(fileStatusWrapper.status);
|
||||
}
|
||||
|
||||
public get noData() {
|
||||
|
||||
@ -451,6 +451,7 @@
|
||||
},
|
||||
"UNPROCESSED": "Unprocessed",
|
||||
"REPROCESS": "Processing",
|
||||
"FULLREPROCESS": "Processing",
|
||||
"PROCESSING": "Processing",
|
||||
"OCR_PROCESSING": "OCR Processing",
|
||||
"ERROR": "Re-processing required",
|
||||
|
||||
@ -136,6 +136,11 @@
|
||||
background-color: $grey-1;
|
||||
}
|
||||
|
||||
.FULLREPROCESS {
|
||||
stroke: $grey-1;
|
||||
background-color: $grey-1;
|
||||
}
|
||||
|
||||
.ERROR {
|
||||
stroke: lighten($red-1, 25%);
|
||||
background-color: lighten($red-1, 25%);
|
||||
|
||||
@ -374,4 +374,79 @@ export class ReanalysisControllerService {
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude or re-include a file to analysis
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @param analysisStatus analysisStatus
|
||||
* @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 toggleAnalysis(projectId: string, fileId: string, analysisStatus?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public toggleAnalysis(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
analysisStatus?: boolean,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public toggleAnalysis(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
analysisStatus?: boolean,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public toggleAnalysis(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
analysisStatus?: boolean,
|
||||
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 toggleAnalysis.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling toggleAnalysis.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
||||
if (analysisStatus !== undefined && analysisStatus !== null) {
|
||||
queryParameters = queryParameters.set('analysisStatus', <any>analysisStatus);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/toggle-analysis/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,6 +114,7 @@ export namespace FileStatus {
|
||||
export type StatusEnum =
|
||||
| 'UNPROCESSED'
|
||||
| 'REPROCESS'
|
||||
| 'FULLREPROCESS'
|
||||
| 'PROCESSING'
|
||||
| 'OCR_PROCESSING'
|
||||
| 'ERROR'
|
||||
@ -123,6 +124,7 @@ export namespace FileStatus {
|
||||
| 'APPROVED';
|
||||
export const StatusEnum = {
|
||||
UNPROCESSED: 'UNPROCESSED' as StatusEnum,
|
||||
FULLREPROCESS: 'FULLREPROCESS' as StatusEnum,
|
||||
REPROCESS: 'REPROCESS' as StatusEnum,
|
||||
PROCESSING: 'PROCESSING' as StatusEnum,
|
||||
OCR_PROCESSING: 'OCR_PROCESSING' as StatusEnum,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user