diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index bd80f5f15..958c5d33b 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -4281,7 +4281,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 @@ -4652,7 +4652,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html index 5b60abe34..42ea1d008 100644 --- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html +++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html @@ -128,7 +128,11 @@ } } @else { - + } diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts index ae391c529..83468e711 100644 --- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts +++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts @@ -1,6 +1,9 @@ import { Component, Input } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' -import { SystemStatus } from 'src/app/data/system-status' +import { + SystemStatus, + SystemStatusItemStatus, +} from 'src/app/data/system-status' import { SystemStatusService } from 'src/app/services/system-status.service' import { Clipboard } from '@angular/cdk/clipboard' @@ -10,6 +13,7 @@ import { Clipboard } from '@angular/cdk/clipboard' styleUrl: './system-status-dialog.component.scss', }) export class SystemStatusDialogComponent { + public SystemStatusItemStatus = SystemStatusItemStatus public status: SystemStatus public copied: boolean = false diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.html b/src-ui/src/app/components/manage/management-list/management-list.component.html index 4995771d8..22c5361ed 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.html +++ b/src-ui/src/app/components/manage/management-list/management-list.component.html @@ -60,7 +60,7 @@ - + {{ getMatching(object) }} {{ object.document_count }} @for (column of extraColumns; track column) { diff --git a/src-ui/src/app/data/system-status.ts b/src-ui/src/app/data/system-status.ts index 247535602..a8f4ca621 100644 --- a/src-ui/src/app/data/system-status.ts +++ b/src-ui/src/app/data/system-status.ts @@ -6,6 +6,7 @@ export enum InstallType { export enum SystemStatusItemStatus { OK = 'OK', ERROR = 'ERROR', + WARNING = 'WARNING', } export interface SystemStatus { diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts index 59a2548fb..97820d110 100644 --- a/src-ui/src/environments/environment.prod.ts +++ b/src-ui/src/environments/environment.prod.ts @@ -5,7 +5,7 @@ export const environment = { apiBaseUrl: document.baseURI + 'api/', apiVersion: '5', appTitle: 'Paperless-ngx', - version: '2.6.0', + version: '2.6.0-dev', webSocketHost: window.location.host, webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:', webSocketBaseUrl: base_url.pathname + 'ws/', diff --git a/src-ui/src/locale/messages.af_ZA.xlf b/src-ui/src/locale/messages.af_ZA.xlf index 8fa8c5df6..6d18d858f 100644 --- a/src-ui/src/locale/messages.af_ZA.xlf +++ b/src-ui/src/locale/messages.af_ZA.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.ar_AR.xlf b/src-ui/src/locale/messages.ar_AR.xlf index 789dc3eec..4aa05c68b 100644 --- a/src-ui/src/locale/messages.ar_AR.xlf +++ b/src-ui/src/locale/messages.ar_AR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 نسخ @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.be_BY.xlf b/src-ui/src/locale/messages.be_BY.xlf index 238b4c40c..80c9947c1 100644 --- a/src-ui/src/locale/messages.be_BY.xlf +++ b/src-ui/src/locale/messages.be_BY.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.bg_BG.xlf b/src-ui/src/locale/messages.bg_BG.xlf index e9b765bb0..6f3049f01 100644 --- a/src-ui/src/locale/messages.bg_BG.xlf +++ b/src-ui/src/locale/messages.bg_BG.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Копиране @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.ca_ES.xlf b/src-ui/src/locale/messages.ca_ES.xlf index 9eb797bca..b0bb21e9f 100644 --- a/src-ui/src/locale/messages.ca_ES.xlf +++ b/src-ui/src/locale/messages.ca_ES.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copia @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.cs_CZ.xlf b/src-ui/src/locale/messages.cs_CZ.xlf index 31c773476..bfaab5983 100644 --- a/src-ui/src/locale/messages.cs_CZ.xlf +++ b/src-ui/src/locale/messages.cs_CZ.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.da_DK.xlf b/src-ui/src/locale/messages.da_DK.xlf index 7d2144ac8..6cdb3c515 100644 --- a/src-ui/src/locale/messages.da_DK.xlf +++ b/src-ui/src/locale/messages.da_DK.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.de_DE.xlf b/src-ui/src/locale/messages.de_DE.xlf index c997657a5..a74f9eadd 100644 --- a/src-ui/src/locale/messages.de_DE.xlf +++ b/src-ui/src/locale/messages.de_DE.xlf @@ -775,7 +775,7 @@ Tour beginnen - + System Status src/app/components/admin/settings/settings.component.html @@ -785,7 +785,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 2 - System Status + Systemstatus Open Django Admin @@ -1165,7 +1165,7 @@ src/app/components/admin/settings/settings.component.html 234 - Standard-Ansichtsberechtigungen + Standard-Anzeigeberechtigungen Users: @@ -4035,15 +4035,15 @@ Bearbeitungsberechtigungen zuweisen - + Remove tags src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 216 - Remove tags + Tags entfernen - + Remove all src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -4073,71 +4073,71 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 254 - Remove all + Alle entfernen - + Remove correspondents src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 222 - Remove correspondents + Korrenspondenten entfernen - + Remove document types src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 228 - Remove document types + Dokumenttypen entfernen - + Remove storage paths src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 234 - Remove storage paths + Speicherpfade entfernen - + Remove custom fields src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 240 - Remove custom fields + Benutzerdefinierte Felder entfernen - + Remove owners src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 247 - Remove owners + Eigentümer entfernen - + Remove permissions src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 253 - Remove permissions + Berechtigungen entfernen - + View permissions src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 256 - View permissions + Anzeigeberechtigungen - + Edit permissions src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 275 - Edit permissions + Bearbeitungsberechtigungen Consume Folder @@ -4195,13 +4195,13 @@ Zuordnung - + Removal src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts 73 - Removal + Entfernung Create new workflow @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopieren @@ -4973,69 +4973,69 @@ Fehler beim Erstellen des Links - + Environment src/app/components/common/system-status-dialog/system-status-dialog.component.html 18 - Environment + Umgebung - + Paperless-ngx Version src/app/components/common/system-status-dialog/system-status-dialog.component.html 22 - Paperless-ngx Version + Paperless-ngx-Version - + Install Type src/app/components/common/system-status-dialog/system-status-dialog.component.html 24 - Install Type + Installationstyp - + Server OS src/app/components/common/system-status-dialog/system-status-dialog.component.html 26 - Server OS + Serverbetriebssystem - + Media Storage src/app/components/common/system-status-dialog/system-status-dialog.component.html 28 - Media Storage + Medienspeicher - + available src/app/components/common/system-status-dialog/system-status-dialog.component.html 31 - available + verfügbar - + total src/app/components/common/system-status-dialog/system-status-dialog.component.html 31 - total + gesamt - + Database src/app/components/common/system-status-dialog/system-status-dialog.component.html 41 - Database + Datenbank Status @@ -5053,85 +5053,85 @@ Status - + Migration Status src/app/components/common/system-status-dialog/system-status-dialog.component.html 56 - Migration Status + Migrationsstatus - + Latest Migration src/app/components/common/system-status-dialog/system-status-dialog.component.html 64 - Latest Migration + Letzte Migration - + Pending Migrations src/app/components/common/system-status-dialog/system-status-dialog.component.html 66 - Pending Migrations + Ausstehende Migrationen - + Tasks src/app/components/common/system-status-dialog/system-status-dialog.component.html 83 - Tasks + Aufgaben - + Redis Status src/app/components/common/system-status-dialog/system-status-dialog.component.html 87 - Redis Status + Redis-Status - + Celery Status src/app/components/common/system-status-dialog/system-status-dialog.component.html 96 - Celery Status + Celery-Status - + Search Index src/app/components/common/system-status-dialog/system-status-dialog.component.html 105 - Search Index + Suchindex - + Last Updated src/app/components/common/system-status-dialog/system-status-dialog.component.html 119 - Last Updated + Zuletzt aktualisiert - + Classifier src/app/components/common/system-status-dialog/system-status-dialog.component.html 121 - Classifier + Klassifikator - + Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 - Last Trained + Zuletzt trainiert Copy Raw Error diff --git a/src-ui/src/locale/messages.el_GR.xlf b/src-ui/src/locale/messages.el_GR.xlf index 383d1dbf0..c63e92aeb 100644 --- a/src-ui/src/locale/messages.el_GR.xlf +++ b/src-ui/src/locale/messages.el_GR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Αντιγραφή @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.es_ES.xlf b/src-ui/src/locale/messages.es_ES.xlf index 4f2303c5e..b9b2d9da6 100644 --- a/src-ui/src/locale/messages.es_ES.xlf +++ b/src-ui/src/locale/messages.es_ES.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copiar @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.fi_FI.xlf b/src-ui/src/locale/messages.fi_FI.xlf index 4bec1e087..441345a86 100644 --- a/src-ui/src/locale/messages.fi_FI.xlf +++ b/src-ui/src/locale/messages.fi_FI.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopioi @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.fr_FR.xlf b/src-ui/src/locale/messages.fr_FR.xlf index 0dfac96bf..a54d7eaab 100644 --- a/src-ui/src/locale/messages.fr_FR.xlf +++ b/src-ui/src/locale/messages.fr_FR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copier @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.he_IL.xlf b/src-ui/src/locale/messages.he_IL.xlf index bf8e79a6a..555407c14 100644 --- a/src-ui/src/locale/messages.he_IL.xlf +++ b/src-ui/src/locale/messages.he_IL.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 העתקה @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.hr_HR.xlf b/src-ui/src/locale/messages.hr_HR.xlf index c309c3c14..810b75f56 100644 --- a/src-ui/src/locale/messages.hr_HR.xlf +++ b/src-ui/src/locale/messages.hr_HR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.hu_HU.xlf b/src-ui/src/locale/messages.hu_HU.xlf index adcca5867..4a843e5dc 100644 --- a/src-ui/src/locale/messages.hu_HU.xlf +++ b/src-ui/src/locale/messages.hu_HU.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Másolás @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.id_ID.xlf b/src-ui/src/locale/messages.id_ID.xlf index 18ce02091..08d2d3400 100644 --- a/src-ui/src/locale/messages.id_ID.xlf +++ b/src-ui/src/locale/messages.id_ID.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Salin @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.it_IT.xlf b/src-ui/src/locale/messages.it_IT.xlf index 711884c91..43d924697 100644 --- a/src-ui/src/locale/messages.it_IT.xlf +++ b/src-ui/src/locale/messages.it_IT.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copia @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.ja_JP.xlf b/src-ui/src/locale/messages.ja_JP.xlf index 95d77a95a..d2a083e07 100644 --- a/src-ui/src/locale/messages.ja_JP.xlf +++ b/src-ui/src/locale/messages.ja_JP.xlf @@ -785,7 +785,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 2 - System Status + システムの状態 Open Django Admin @@ -4041,7 +4041,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 216 - Remove tags + タグの削除 Remove all @@ -4073,7 +4073,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 254 - Remove all + すべて削除 Remove correspondents @@ -4081,7 +4081,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 222 - Remove correspondents + 担当の削除 Remove document types @@ -4089,7 +4089,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 228 - Remove document types + ドキュメントタイプの削除 Remove storage paths @@ -4097,7 +4097,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 234 - Remove storage paths + フォルダーの削除 Remove custom fields @@ -4105,7 +4105,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 240 - Remove custom fields + カスタム項目の削除 Remove owners @@ -4113,7 +4113,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 247 - Remove owners + 所有者の削除 Remove permissions @@ -4121,7 +4121,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 253 - Remove permissions + 権限の削除 View permissions @@ -4129,7 +4129,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 256 - View permissions + 権限の表示 Edit permissions @@ -4137,7 +4137,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 275 - Edit permissions + 権限の編集 Consume Folder @@ -4201,7 +4201,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts 73 - Removal + 削除 Create new workflow @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 コピー @@ -4979,7 +4979,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 18 - Environment + 環境 Paperless-ngx Version @@ -4987,7 +4987,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 22 - Paperless-ngx Version + Paperless-ngx のバージョン Install Type @@ -4995,7 +4995,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 24 - Install Type + インストールタイプ Server OS @@ -5003,7 +5003,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 26 - Server OS + サーバ OS Media Storage @@ -5011,7 +5011,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 28 - Media Storage + メディアストレージ available @@ -5019,7 +5019,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 31 - available + 利用可能 total @@ -5027,7 +5027,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 31 - total + 合計 Database @@ -5035,7 +5035,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 41 - Database + データベース Status @@ -5059,7 +5059,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 56 - Migration Status + 移行状況 Latest Migration @@ -5067,7 +5067,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 64 - Latest Migration + 最新の移行 Pending Migrations @@ -5075,7 +5075,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 66 - Pending Migrations + 保留中の移行 Tasks @@ -5083,7 +5083,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 83 - Tasks + タスク Redis Status @@ -5091,7 +5091,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 87 - Redis Status + Redis の状態 Celery Status @@ -5099,7 +5099,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 96 - Celery Status + Celery の状態 Search Index @@ -5107,7 +5107,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 105 - Search Index + 検索インデックス Last Updated @@ -5115,7 +5115,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 119 - Last Updated + 最終アップデート日 Classifier @@ -5123,15 +5123,15 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 121 - Classifier + 分類器 Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 - Last Trained + 最終トレーニング日 Copy Raw Error diff --git a/src-ui/src/locale/messages.ko_KR.xlf b/src-ui/src/locale/messages.ko_KR.xlf index 6515cbde1..c16e14446 100644 --- a/src-ui/src/locale/messages.ko_KR.xlf +++ b/src-ui/src/locale/messages.ko_KR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 복사 @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.lb_LU.xlf b/src-ui/src/locale/messages.lb_LU.xlf index 058e6b56f..36df4e513 100644 --- a/src-ui/src/locale/messages.lb_LU.xlf +++ b/src-ui/src/locale/messages.lb_LU.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.lv_LV.xlf b/src-ui/src/locale/messages.lv_LV.xlf index 08cfebae3..31b98eee9 100644 --- a/src-ui/src/locale/messages.lv_LV.xlf +++ b/src-ui/src/locale/messages.lv_LV.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.nl_NL.xlf b/src-ui/src/locale/messages.nl_NL.xlf index 66e4c9a83..001e8d082 100644 --- a/src-ui/src/locale/messages.nl_NL.xlf +++ b/src-ui/src/locale/messages.nl_NL.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopiëren @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.no_NO.xlf b/src-ui/src/locale/messages.no_NO.xlf index b83cff2bf..434ed992d 100644 --- a/src-ui/src/locale/messages.no_NO.xlf +++ b/src-ui/src/locale/messages.no_NO.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.pl_PL.xlf b/src-ui/src/locale/messages.pl_PL.xlf index 4c6f63ab6..b5f753fe5 100644 --- a/src-ui/src/locale/messages.pl_PL.xlf +++ b/src-ui/src/locale/messages.pl_PL.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopiuj @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.pt_BR.xlf b/src-ui/src/locale/messages.pt_BR.xlf index f0a6afcfa..de9abdfe5 100644 --- a/src-ui/src/locale/messages.pt_BR.xlf +++ b/src-ui/src/locale/messages.pt_BR.xlf @@ -4710,7 +4710,7 @@ Curingas como *.pdf ou *invoice* são permitidos. Sem diferenciação de maiúsc src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copiar @@ -5130,7 +5130,7 @@ Curingas como *.pdf ou *invoice* são permitidos. Sem diferenciação de maiúsc Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.pt_PT.xlf b/src-ui/src/locale/messages.pt_PT.xlf index 36e7f9eb1..3275cd08d 100644 --- a/src-ui/src/locale/messages.pt_PT.xlf +++ b/src-ui/src/locale/messages.pt_PT.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.ro_RO.xlf b/src-ui/src/locale/messages.ro_RO.xlf index d955d1a67..d5d397ff7 100644 --- a/src-ui/src/locale/messages.ro_RO.xlf +++ b/src-ui/src/locale/messages.ro_RO.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.ru_RU.xlf b/src-ui/src/locale/messages.ru_RU.xlf index 073c4fe5f..b401d0b78 100644 --- a/src-ui/src/locale/messages.ru_RU.xlf +++ b/src-ui/src/locale/messages.ru_RU.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Копировать @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.sk_SK.xlf b/src-ui/src/locale/messages.sk_SK.xlf index 34cf12cd8..5cfdfbcda 100644 --- a/src-ui/src/locale/messages.sk_SK.xlf +++ b/src-ui/src/locale/messages.sk_SK.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.sl_SI.xlf b/src-ui/src/locale/messages.sl_SI.xlf index 3a18edd28..46a2b1b6f 100644 --- a/src-ui/src/locale/messages.sl_SI.xlf +++ b/src-ui/src/locale/messages.sl_SI.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopiraj @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.sr_CS.xlf b/src-ui/src/locale/messages.sr_CS.xlf index af5ea42b1..aba6b3cf8 100644 --- a/src-ui/src/locale/messages.sr_CS.xlf +++ b/src-ui/src/locale/messages.sr_CS.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopiraj @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.sv_SE.xlf b/src-ui/src/locale/messages.sv_SE.xlf index 7c833b046..7b17bc808 100644 --- a/src-ui/src/locale/messages.sv_SE.xlf +++ b/src-ui/src/locale/messages.sv_SE.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.th_TH.xlf b/src-ui/src/locale/messages.th_TH.xlf index eb28086bc..3f59392da 100644 --- a/src-ui/src/locale/messages.th_TH.xlf +++ b/src-ui/src/locale/messages.th_TH.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 คัดลอก @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.tr_TR.xlf b/src-ui/src/locale/messages.tr_TR.xlf index 24994bf43..f0959cb5d 100644 --- a/src-ui/src/locale/messages.tr_TR.xlf +++ b/src-ui/src/locale/messages.tr_TR.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Kopyala @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.uk_UA.xlf b/src-ui/src/locale/messages.uk_UA.xlf index f8ea985ad..55d6f6978 100644 --- a/src-ui/src/locale/messages.uk_UA.xlf +++ b/src-ui/src/locale/messages.uk_UA.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Копіювати @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.vi_VN.xlf b/src-ui/src/locale/messages.vi_VN.xlf index 8d474effa..262a1ec58 100644 --- a/src-ui/src/locale/messages.vi_VN.xlf +++ b/src-ui/src/locale/messages.vi_VN.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Sao chép @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.zh_CN.xlf b/src-ui/src/locale/messages.zh_CN.xlf index 8fb4bda6b..5f3aebd37 100644 --- a/src-ui/src/locale/messages.zh_CN.xlf +++ b/src-ui/src/locale/messages.zh_CN.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src-ui/src/locale/messages.zh_TW.xlf b/src-ui/src/locale/messages.zh_TW.xlf index 9d0d5feda..3340e5a75 100644 --- a/src-ui/src/locale/messages.zh_TW.xlf +++ b/src-ui/src/locale/messages.zh_TW.xlf @@ -4709,7 +4709,7 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html - 152 + 156 Copy @@ -5129,7 +5129,7 @@ Last Trained src/app/components/common/system-status-dialog/system-status-dialog.component.html - 135 + 139 Last Trained diff --git a/src/documents/tests/test_api_status.py b/src/documents/tests/test_api_status.py index 964995bdc..1f8940ea9 100644 --- a/src/documents/tests/test_api_status.py +++ b/src/documents/tests/test_api_status.py @@ -1,4 +1,5 @@ import os +import tempfile from pathlib import Path from unittest import mock @@ -7,8 +8,11 @@ from django.test import override_settings from rest_framework import status from rest_framework.test import APITestCase +from documents.classifier import ClassifierModelCorruptError from documents.classifier import DocumentClassifier from documents.classifier import load_classifier +from documents.models import Document +from documents.models import Tag from paperless import version @@ -158,7 +162,7 @@ class TestSystemStatus(APITestCase): WHEN: - The user requests the system status THEN: - - The response contains the correct classifier status + - The response contains an OK classifier status """ load_classifier() test_classifier = DocumentClassifier() @@ -169,18 +173,66 @@ class TestSystemStatus(APITestCase): self.assertEqual(response.data["tasks"]["classifier_status"], "OK") self.assertIsNone(response.data["tasks"]["classifier_error"]) - def test_system_status_classifier_error(self): + def test_system_status_classifier_warning(self): """ GIVEN: - - The classifier is not found + - The classifier does not exist yet + - > 0 documents and tags with auto matching exist WHEN: - The user requests the system status THEN: - - The response contains an error classifier status + - The response contains an WARNING classifier status + """ + with override_settings(MODEL_FILE="does_not_exist"): + Document.objects.create( + title="Test Document", + ) + Tag.objects.create(name="Test Tag", matching_algorithm=Tag.MATCH_AUTO) + self.client.force_login(self.user) + response = self.client.get(self.ENDPOINT) + self.assertEqual(response.status_code, status.HTTP_200_OK) + self.assertEqual(response.data["tasks"]["classifier_status"], "WARNING") + self.assertIsNotNone(response.data["tasks"]["classifier_error"]) + + def test_system_status_classifier_error(self): + """ + GIVEN: + - The classifier does exist but is corrupt + - > 0 documents and tags with auto matching exist + WHEN: + - The user requests the system status + THEN: + - The response contains an ERROR classifier status + """ + does_exist = tempfile.NamedTemporaryFile( + dir="/tmp", + delete=False, + ) + with override_settings(MODEL_FILE=does_exist): + with mock.patch("documents.classifier.load_classifier") as mock_load: + mock_load.side_effect = ClassifierModelCorruptError() + Document.objects.create( + title="Test Document", + ) + Tag.objects.create(name="Test Tag", matching_algorithm=Tag.MATCH_AUTO) + self.client.force_login(self.user) + response = self.client.get(self.ENDPOINT) + self.assertEqual(response.status_code, status.HTTP_200_OK) + self.assertEqual(response.data["tasks"]["classifier_status"], "ERROR") + self.assertIsNotNone(response.data["tasks"]["classifier_error"]) + + def test_system_status_classifier_ok_no_objects(self): + """ + GIVEN: + - The classifier does not exist (and should not) + - No documents nor objects with auto matching exist + WHEN: + - The user requests the system status + THEN: + - The response contains an OK classifier status """ with override_settings(MODEL_FILE="does_not_exist"): self.client.force_login(self.user) response = self.client.get(self.ENDPOINT) self.assertEqual(response.status_code, status.HTTP_200_OK) - self.assertEqual(response.data["tasks"]["classifier_status"], "ERROR") - self.assertIsNotNone(response.data["tasks"]["classifier_error"]) + self.assertEqual(response.data["tasks"]["classifier_status"], "OK") diff --git a/src/documents/views.py b/src/documents/views.py index bd0b6fa0f..0d2826cf7 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -1581,7 +1581,9 @@ class SystemStatusView(GenericAPIView, PassUserMixin): except Exception as e: # pragma: no cover applied_migrations = [] db_status = "ERROR" - logger.exception(f"System status error connecting to database: {e}") + logger.exception( + f"System status detected a possible problem while connecting to the database: {e}", + ) db_error = "Error connecting to database, check logs for more detail." media_stats = os.statvfs(settings.MEDIA_ROOT) @@ -1594,7 +1596,9 @@ class SystemStatusView(GenericAPIView, PassUserMixin): redis_status = "OK" except Exception as e: redis_status = "ERROR" - logger.exception(f"System status error connecting to redis: {e}") + logger.exception( + f"System status detected a possible problem while connecting to redis: {e}", + ) redis_error = "Error connecting to redis, check logs for more detail." try: @@ -1615,14 +1619,40 @@ class SystemStatusView(GenericAPIView, PassUserMixin): except Exception as e: index_status = "ERROR" index_error = "Error opening index, check logs for more detail." - logger.exception(f"System status error opening index: {e}") + logger.exception( + f"System status detected a possible problem while opening the index: {e}", + ) index_last_modified = None classifier_error = None + classifier_status = None try: classifier = load_classifier() if classifier is None: - raise Exception("Classifier not loaded") + # Make sure classifier should exist + docs_queryset = Document.objects.exclude( + tags__is_inbox_tag=True, + ) + if ( + docs_queryset.count() > 0 + and ( + Tag.objects.filter(matching_algorithm=Tag.MATCH_AUTO).exists() + or DocumentType.objects.filter( + matching_algorithm=Tag.MATCH_AUTO, + ).exists() + or Correspondent.objects.filter( + matching_algorithm=Tag.MATCH_AUTO, + ).exists() + or StoragePath.objects.filter( + matching_algorithm=Tag.MATCH_AUTO, + ).exists() + ) + and not os.path.isfile(settings.MODEL_FILE) + ): + # if classifier file doesn't exist just classify as a warning + classifier_error = "Classifier file does not exist (yet). Re-training may be pending." + classifier_status = "WARNING" + raise FileNotFoundError(classifier_error) classifier_status = "OK" task_result_model = apps.get_model("django_celery_results", "taskresult") result = ( @@ -1637,10 +1667,16 @@ class SystemStatusView(GenericAPIView, PassUserMixin): ) classifier_last_trained = result.date_done if result else None except Exception as e: - classifier_status = "ERROR" + if classifier_status is None: + classifier_status = "ERROR" classifier_last_trained = None - classifier_error = "Error loading classifier, check logs for more detail." - logger.exception(f"System status error loading classifier: {e}") + if classifier_error is None: + classifier_error = ( + "Unable to load classifier, check logs for more detail." + ) + logger.exception( + f"System status detected a possible problem while loading the classifier: {e}", + ) return Response( { diff --git a/src/locale/de_DE/LC_MESSAGES/django.po b/src/locale/de_DE/LC_MESSAGES/django.po index 634339abb..9ae1b985e 100644 --- a/src/locale/de_DE/LC_MESSAGES/django.po +++ b/src/locale/de_DE/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-03-04 17:00-0800\n" -"PO-Revision-Date: 2024-03-05 01:01\n" +"PO-Revision-Date: 2024-03-05 15:50\n" "Last-Translator: \n" "Language-Team: German\n" "Language: de_DE\n" @@ -685,7 +685,7 @@ msgstr "Zuordnung" #: documents/models.py:1006 msgid "Removal" -msgstr "" +msgstr "Entfernung" #: documents/models.py:1010 msgid "Workflow Action Type" @@ -741,19 +741,19 @@ msgstr "Diese benutzerdefinierten Felder zuweisen" #: documents/models.py:1108 msgid "remove these tag(s)" -msgstr "" +msgstr "Diese(n) Tag(s) entfernen" #: documents/models.py:1113 msgid "remove all tags" -msgstr "" +msgstr "Alle Tags entfernen" #: documents/models.py:1120 msgid "remove these document type(s)" -msgstr "" +msgstr "Diese(n) Dokumenttyp(en) entfernen" #: documents/models.py:1125 msgid "remove all document types" -msgstr "" +msgstr "Alle Dokumenttypen entfernen" #: documents/models.py:1132 msgid "remove these correspondent(s)" diff --git a/src/locale/ja_JP/LC_MESSAGES/django.po b/src/locale/ja_JP/LC_MESSAGES/django.po index 9f8650be7..8c1febb4c 100644 --- a/src/locale/ja_JP/LC_MESSAGES/django.po +++ b/src/locale/ja_JP/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-03-04 17:00-0800\n" -"PO-Revision-Date: 2024-03-05 01:01\n" +"PO-Revision-Date: 2024-03-05 15:50\n" "Last-Translator: \n" "Language-Team: Japanese\n" "Language: ja_JP\n" @@ -685,7 +685,7 @@ msgstr "割り当て" #: documents/models.py:1006 msgid "Removal" -msgstr "" +msgstr "削除" #: documents/models.py:1010 msgid "Workflow Action Type" @@ -741,71 +741,71 @@ msgstr "カスタム項目の割り当て" #: documents/models.py:1108 msgid "remove these tag(s)" -msgstr "" +msgstr "タグの削除" #: documents/models.py:1113 msgid "remove all tags" -msgstr "" +msgstr "すべてのタグの削除" #: documents/models.py:1120 msgid "remove these document type(s)" -msgstr "" +msgstr "ドキュメントタイプの削除" #: documents/models.py:1125 msgid "remove all document types" -msgstr "" +msgstr "すべてのドキュメントタイプの削除" #: documents/models.py:1132 msgid "remove these correspondent(s)" -msgstr "" +msgstr "担当の削除" #: documents/models.py:1137 msgid "remove all correspondents" -msgstr "" +msgstr "すべての担当の削除" #: documents/models.py:1144 msgid "remove these storage path(s)" -msgstr "" +msgstr "フォルダーの削除" #: documents/models.py:1149 msgid "remove all storage paths" -msgstr "" +msgstr "すべてのフォルダーの削除" #: documents/models.py:1156 msgid "remove these owner(s)" -msgstr "" +msgstr "所有者の削除" #: documents/models.py:1161 msgid "remove all owners" -msgstr "" +msgstr "すべての所有者の削除" #: documents/models.py:1168 msgid "remove view permissions for these users" -msgstr "" +msgstr "ユーザの表示権限の削除" #: documents/models.py:1175 msgid "remove view permissions for these groups" -msgstr "" +msgstr "グループの表示権限の削除" #: documents/models.py:1182 msgid "remove change permissions for these users" -msgstr "" +msgstr "ユーザの編集権限の削除" #: documents/models.py:1189 msgid "remove change permissions for these groups" -msgstr "" +msgstr "グループの編集権限の削除" #: documents/models.py:1194 msgid "remove all permissions" -msgstr "" +msgstr "すべての権限の削除" #: documents/models.py:1201 msgid "remove these custom fields" -msgstr "" +msgstr "カスタム項目の削除" #: documents/models.py:1206 msgid "remove all custom fields" -msgstr "" +msgstr "すべてのカスタム項目の削除" #: documents/models.py:1210 msgid "workflow action"