From 6eb847987112f145a096a380ee524690fccbe0d2 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sun, 2 Feb 2025 22:02:31 -0800
Subject: [PATCH] Use different channels, refactor because now its not just
consumer
---
src-ui/messages.xlf | 232 +++++------
src-ui/src/app/app.component.spec.ts | 22 +-
src-ui/src/app/app.component.ts | 14 +-
.../saved-view-widget.component.spec.ts | 14 +-
.../saved-view-widget.component.ts | 6 +-
.../statistics-widget.component.spec.ts | 10 +-
.../statistics-widget.component.ts | 6 +-
.../upload-file-widget.component.spec.ts | 26 +-
.../upload-file-widget.component.ts | 35 +-
.../document-list.component.spec.ts | 16 +-
.../document-list/document-list.component.ts | 8 +-
.../websocket-documents-deleted-message.ts | 3 +
...ssage.ts => websocket-progress-message.ts} | 2 +-
.../services/consumer-status.service.spec.ts | 343 ----------------
.../services/upload-documents.service.spec.ts | 26 +-
.../app/services/upload-documents.service.ts | 16 +-
.../services/websocket-status.service.spec.ts | 375 ++++++++++++++++++
...service.ts => websocket-status.service.ts} | 123 +++---
src/documents/bulk_edit.py | 12 +-
src/documents/plugins/helpers.py | 47 ++-
src/paperless/consumers.py | 8 +-
src/paperless/tests/test_websockets.py | 4 +-
22 files changed, 710 insertions(+), 638 deletions(-)
create mode 100644 src-ui/src/app/data/websocket-documents-deleted-message.ts
rename src-ui/src/app/data/{websocket-consumer-status-message.ts => websocket-progress-message.ts} (77%)
delete mode 100644 src-ui/src/app/services/consumer-status.service.spec.ts
create mode 100644 src-ui/src/app/services/websocket-status.service.spec.ts
rename src-ui/src/app/services/{consumer-status.service.ts => websocket-status.service.ts} (73%)
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index fdd32af00..9983e6b55 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -9233,122 +9233,6 @@
11
-
- Document already exists.
-
- src/app/services/consumer-status.service.ts
- 17
-
-
-
- Document already exists. Note: existing document is in the trash.
-
- src/app/services/consumer-status.service.ts
- 18
-
-
-
- Document with ASN already exists.
-
- src/app/services/consumer-status.service.ts
- 19
-
-
-
- Document with ASN already exists. Note: existing document is in the trash.
-
- src/app/services/consumer-status.service.ts
- 20
-
-
-
- File not found.
-
- src/app/services/consumer-status.service.ts
- 21
-
-
-
- Pre-consume script does not exist.
-
- src/app/services/consumer-status.service.ts
- 22
-
- Pre-Consume is a term that appears like that in the documentation as well and does not need a specific translation
-
-
- Error while executing pre-consume script.
-
- src/app/services/consumer-status.service.ts
- 23
-
- Pre-Consume is a term that appears like that in the documentation as well and does not need a specific translation
-
-
- Post-consume script does not exist.
-
- src/app/services/consumer-status.service.ts
- 24
-
- Post-Consume is a term that appears like that in the documentation as well and does not need a specific translation
-
-
- Error while executing post-consume script.
-
- src/app/services/consumer-status.service.ts
- 25
-
- Post-Consume is a term that appears like that in the documentation as well and does not need a specific translation
-
-
- Received new file.
-
- src/app/services/consumer-status.service.ts
- 26
-
-
-
- File type not supported.
-
- src/app/services/consumer-status.service.ts
- 27
-
-
-
- Processing document...
-
- src/app/services/consumer-status.service.ts
- 28
-
-
-
- Generating thumbnail...
-
- src/app/services/consumer-status.service.ts
- 29
-
-
-
- Retrieving date from document...
-
- src/app/services/consumer-status.service.ts
- 30
-
-
-
- Saving document...
-
- src/app/services/consumer-status.service.ts
- 31
-
-
-
- Finished.
-
- src/app/services/consumer-status.service.ts
- 32
-
- You have unsaved changes to the document
@@ -9664,6 +9548,122 @@
70
+
+ Document already exists.
+
+ src/app/services/websocket-status.service.ts
+ 23
+
+
+
+ Document already exists. Note: existing document is in the trash.
+
+ src/app/services/websocket-status.service.ts
+ 24
+
+
+
+ Document with ASN already exists.
+
+ src/app/services/websocket-status.service.ts
+ 25
+
+
+
+ Document with ASN already exists. Note: existing document is in the trash.
+
+ src/app/services/websocket-status.service.ts
+ 26
+
+
+
+ File not found.
+
+ src/app/services/websocket-status.service.ts
+ 27
+
+
+
+ Pre-consume script does not exist.
+
+ src/app/services/websocket-status.service.ts
+ 28
+
+ Pre-Consume is a term that appears like that in the documentation as well and does not need a specific translation
+
+
+ Error while executing pre-consume script.
+
+ src/app/services/websocket-status.service.ts
+ 29
+
+ Pre-Consume is a term that appears like that in the documentation as well and does not need a specific translation
+
+
+ Post-consume script does not exist.
+
+ src/app/services/websocket-status.service.ts
+ 30
+
+ Post-Consume is a term that appears like that in the documentation as well and does not need a specific translation
+
+
+ Error while executing post-consume script.
+
+ src/app/services/websocket-status.service.ts
+ 31
+
+ Post-Consume is a term that appears like that in the documentation as well and does not need a specific translation
+
+
+ Received new file.
+
+ src/app/services/websocket-status.service.ts
+ 32
+
+
+
+ File type not supported.
+
+ src/app/services/websocket-status.service.ts
+ 33
+
+
+
+ Processing document...
+
+ src/app/services/websocket-status.service.ts
+ 34
+
+
+
+ Generating thumbnail...
+
+ src/app/services/websocket-status.service.ts
+ 35
+
+
+
+ Retrieving date from document...
+
+ src/app/services/websocket-status.service.ts
+ 36
+
+
+
+ Saving document...
+
+ src/app/services/websocket-status.service.ts
+ 37
+
+
+
+ Finished.
+
+ src/app/services/websocket-status.service.ts
+ 38
+
+