mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
functions for combined upload progress bars
This commit is contained in:
parent
ede3bd1391
commit
b581e42216
3 changed files with 36 additions and 5 deletions
|
|
@ -63,7 +63,9 @@ export class ConsumerStatusService {
|
|||
|
||||
private statusWebSocked: WebSocket
|
||||
|
||||
consumerStatus: FileStatus[] = []
|
||||
private consumerStatus: FileStatus[] = []
|
||||
|
||||
|
||||
private documentConsumptionFinishedSubject = new Subject<FileStatus>()
|
||||
private documentConsumptionFailedSubject = new Subject<FileStatus>()
|
||||
|
||||
|
|
@ -78,12 +80,21 @@ export class ConsumerStatusService {
|
|||
return status
|
||||
}
|
||||
|
||||
newFileUpload(): FileStatus {
|
||||
newFileUpload(filename: string): FileStatus {
|
||||
let status = new FileStatus()
|
||||
status.filename = filename
|
||||
this.consumerStatus.push(status)
|
||||
return status
|
||||
}
|
||||
|
||||
getConsumerStatus(phase?: FileStatusPhase) {
|
||||
if (phase) {
|
||||
return this.consumerStatus.filter(s => s.phase == phase)
|
||||
} else {
|
||||
return this.consumerStatus
|
||||
}
|
||||
}
|
||||
|
||||
connect() {
|
||||
this.disconnect()
|
||||
this.statusWebSocked = new WebSocket("ws://localhost:8000/ws/status/");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue