From e98da2e72cc32a31a4db25a503504d2441d49bc9 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 7 Feb 2024 07:12:24 -0800 Subject: [PATCH 1/2] Fix whitespace in some frontend html files --- .../users-groups/users-groups.component.html | 112 +++++++-------- .../custom-fields.component.html | 24 ++-- .../manage/mail/mail.component.html | 130 +++++++++--------- .../manage/workflows/workflows.component.html | 24 ++-- 4 files changed, 145 insertions(+), 145 deletions(-) diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.html b/src-ui/src/app/components/admin/users-groups/users-groups.component.html index 3f91842d4..a485a97ef 100644 --- a/src-ui/src/app/components/admin/users-groups/users-groups.component.html +++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.html @@ -33,64 +33,64 @@
+ +
+ + + + } + +} + +@if (groups) { +

+ Groups + +

+ @if (groups.length > 0) { + - } - - @if (groups) { -

- Groups - -

- @if (groups.length > 0) { - - } - } - - @if (!users || !groups) { -
-
-
Loading...
- } + + } + @if (groups.length === 0) { +
  • No groups defined
  • + } + + } +} + +@if (!users || !groups) { +
    +
    +
    Loading...
    +
    +} diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html index a803aae9c..2d4c77f93 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html @@ -29,16 +29,16 @@
    - -
    - + + - - } - @if (fields.length === 0) { -
  • No fields defined.
  • - } - + + + + } + @if (fields.length === 0) { +
  • No fields defined.
  • + } + diff --git a/src-ui/src/app/components/manage/mail/mail.component.html b/src-ui/src/app/components/manage/mail/mail.component.html index 68187c6bd..ef294fe43 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.html +++ b/src-ui/src/app/components/manage/mail/mail.component.html @@ -32,72 +32,72 @@
    - - -
    - - - - } - @if (mailAccounts.length === 0) { -
  • No mail accounts defined.
  • - } - - - - - -

    - Mail rules - -

    - - @for (rule of mailRules; track rule) { -
  • -
    -
    -
    {{(mailAccountService.getCached(rule.account) | async)?.name}}
    -
    -
    - - - -
    -
    -
    -
  • - } - @if (mailRules.length === 0) { -
  • No mail rules defined.
  • - } - +
    - + +

    + Mail rules + +

    + + +
    + +@if (!mailAccounts || !mailRules) { +
    +
    +
    Loading...
    +
    +} diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.html b/src-ui/src/app/components/manage/workflows/workflows.component.html index 9dc214af4..9bc68fb49 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.html +++ b/src-ui/src/app/components/manage/workflows/workflows.component.html @@ -33,16 +33,16 @@
    - -
    - + + - - } - @if (workflows.length === 0) { -
  • No workflows defined.
  • - } - + + + + } + @if (workflows.length === 0) { +
  • No workflows defined.
  • + } + From b47f30183114a73ef744aef1012d70c2cd56971e Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:45:59 -0800 Subject: [PATCH 2/2] Adds the Python environment flags for no byte code saving, reducing the image size slightly (#5677) --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73bd0cf57..ea5bd6026 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,8 +39,6 @@ RUN set -eux \ # - Don't leave anything extra in here FROM docker.io/python:3.11-slim-bookworm as main-app -ENV PYTHONWARNINGS="ignore:::django.http.response:517" - LABEL org.opencontainers.image.authors="paperless-ngx team " LABEL org.opencontainers.image.documentation="https://docs.paperless-ngx.com/" LABEL org.opencontainers.image.source="https://github.com/paperless-ngx/paperless-ngx" @@ -57,6 +55,12 @@ ARG JBIG2ENC_VERSION=0.29 ARG QPDF_VERSION=11.6.4 ARG GS_VERSION=10.02.1 +# Set Python environment variables +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + # Ignore warning from Whitenoise + PYTHONWARNINGS="ignore:::django.http.response:517" + # # Begin installation and configuration # Order the steps below from least often changed to most