]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Merge branch 'dev' into feature-ai
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 8 Sep 2025 18:33:39 +0000 (11:33 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Mon, 8 Sep 2025 18:33:39 +0000 (11:33 -0700)
1  2 
pyproject.toml
src-ui/src/app/components/admin/settings/settings.component.spec.ts
src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts
src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts
src-ui/src/app/components/document-detail/document-detail.component.ts
src-ui/src/app/data/system-status.ts
uv.lock

diff --cc pyproject.toml
Simple merge
index a1949ae031bf92f4b341585d02b921d6d0f87e4b,300067d1b95cd2bcc460fb6f4eafcdbffc0fa6a5..15dedc078985102bb4bd259628ab6b1ed2538dca
@@@ -61,6 -61,40 +61,43 @@@ const groups = 
    { id: 2, name: 'group2' },
  ]
  
+ const status: SystemStatus = {
+   pngx_version: '2.4.3',
+   server_os: 'macOS-14.1.1-arm64-arm-64bit',
+   install_type: InstallType.BareMetal,
+   storage: { total: 494384795648, available: 13573525504 },
+   database: {
+     type: 'sqlite',
+     url: '/paperless-ngx/data/db.sqlite3',
+     status: SystemStatusItemStatus.ERROR,
+     error: null,
+     migration_status: {
+       latest_migration: 'socialaccount.0006_alter_socialaccount_extra_data',
+       unapplied_migrations: [],
+     },
+   },
+   tasks: {
+     redis_url: 'redis://localhost:6379',
+     redis_status: SystemStatusItemStatus.ERROR,
+     redis_error: 'Error 61 connecting to localhost:6379. Connection refused.',
+     celery_status: SystemStatusItemStatus.ERROR,
+     celery_url: 'celery@localhost',
+     celery_error: 'Error connecting to celery@localhost',
+     index_status: SystemStatusItemStatus.OK,
+     index_last_modified: new Date().toISOString(),
+     index_error: null,
+     classifier_status: SystemStatusItemStatus.OK,
+     classifier_last_trained: new Date().toISOString(),
+     classifier_error: null,
+     sanity_check_status: SystemStatusItemStatus.ERROR,
+     sanity_check_last_run: new Date().toISOString(),
+     sanity_check_error: 'Error running sanity check.',
++    llmindex_status: SystemStatusItemStatus.DISABLED,
++    llmindex_last_modified: new Date().toISOString(),
++    llmindex_error: null,
+   },
+ }
  describe('SettingsComponent', () => {
    let component: SettingsComponent
    let fixture: ComponentFixture<SettingsComponent>
index d5df7959d033a4e0d2d50d519bb5441c67982535,99fddbf2c3e6cbc6a0c1c43caa644b561fd4677b..c34f984b2108117ef2aa269e694b12eade1844ef
                    <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.sanity_check_error}}</span>
                  }
                </ng-template>
+               <dt i18n>WebSocket Connection</dt>
+               <dd>
+                 <span class="btn btn-sm pe-none align-items-center btn-dark text-uppercase small">
+                   @if (status.websocket_connected === 'OK') {
+                     <ng-container i18n>OK</ng-container>
+                     <i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
+                   } @else {
+                     <ng-container i18n>Error</ng-container>
+                     <i-bs name="exclamation-triangle-fill" class="text-danger ms-2 lh-1"></i-bs>
+                   }
+                 </span>
+               </dd>
 +              @if (aiEnabled) {
 +                <dt i18n>AI Index</dt>
 +                <dd class="d-flex align-items-center">
 +                  <button class="btn btn-sm d-flex align-items-center btn-dark text-uppercase small" [ngbPopover]="llmIndexStatus" triggers="click mouseenter:mouseleave">
 +                    {{status.tasks.llmindex_status}}
 +                    @if (status.tasks.llmindex_status === 'OK') {
 +                      @if (isStale(status.tasks.llmindex_last_modified)) {
 +                        <i-bs name="exclamation-triangle-fill" class="text-warning ms-2 lh-1"></i-bs>
 +                      } @else {
 +                        <i-bs name="check-circle-fill" class="text-primary ms-2 lh-1"></i-bs>
 +                      }
 +                    } @else {
 +                      <i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
 +                      [class.text-danger]="status.tasks.llmindex_status === SystemStatusItemStatus.ERROR"
 +                      [class.text-warning]="status.tasks.llmindex_status === SystemStatusItemStatus.WARNING"
 +                      [class.text-muted]="status.tasks.llmindex_status === SystemStatusItemStatus.DISABLED"></i-bs>
 +                    }
 +                  </button>
 +                  @if (currentUserIsSuperUser) {
 +                    @if (isRunning(PaperlessTaskName.LLMIndexUpdate)) {
 +                      <div class="spinner-border spinner-border-sm ms-2" role="status"></div>
 +                    } @else {
 +                      <button class="btn btn-sm d-flex align-items-center btn-dark small ms-2" (click)="runTask(PaperlessTaskName.LLMIndexUpdate)">
 +                        <i-bs name="play-fill"></i-bs>&nbsp;
 +                        <ng-container i18n>Run Task</ng-container>
 +                      </button>
 +                    }
 +                  }
 +                </dd>
 +                <ng-template #llmIndexStatus>
 +                  @if (status.tasks.llmindex_status === 'OK') {
 +                    <h6><ng-container i18n>Last Run</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.llmindex_last_modified | customDate:'medium'}}</span>
 +                  } @else {
 +                    <h6><ng-container i18n>Error</ng-container>:</h6> <span class="font-monospace small">{{status.tasks.llmindex_error}}</span>
 +                  }
 +                </ng-template>
 +              }
              </dl>
            </div>
          </div>
index 19171941cf7ada7cdab3bdd408d344fab45718db,f88d56ff6e997082fb11233998f42397340a4acb..d53bb74bf905b7dadc99a73857d4d2a013646079
@@@ -43,7 -43,7 +45,8 @@@ export class SystemStatusDialogComponen
    private tasksService = inject(TasksService)
    private toastService = inject(ToastService)
    private permissionsService = inject(PermissionsService)
+   private websocketStatusService = inject(WebsocketStatusService)
 +  private settingsService = inject(SettingsService)
  
    public SystemStatusItemStatus = SystemStatusItemStatus
    public PaperlessTaskName = PaperlessTaskName
index dc18677a5eb0b421c2dcf60dc92cfe0cd999a2bb,334dc54f87c896a67dd0c34f35fbc6d2f059b822..7dcbffa2020ffd96ef33f7b974145d5200517262
@@@ -44,8 -43,6 +44,9 @@@ export interface SystemStatus 
      sanity_check_status: SystemStatusItemStatus
      sanity_check_last_run: string // ISO date string
      sanity_check_error: string
 +    llmindex_status: SystemStatusItemStatus
 +    llmindex_last_modified: string // ISO date string
 +    llmindex_error: string
    }
+   websocket_connected?: SystemStatusItemStatus // added client-side
  }
diff --cc uv.lock
Simple merge