mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-22 10:43:18 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8832d12a04 | ||
|
|
bbcd6af2fe | ||
|
|
0431939f18 | ||
|
|
bed95ea301 | ||
|
|
42034c3c77 | ||
|
|
705220fb5a |
@@ -1215,7 +1215,7 @@ should be a valid crontab(5) expression describing when to run.
|
||||
|
||||
: If set to the string "disable", no emails will be fetched automatically.
|
||||
|
||||
Defaults to `*/10 * * * *` or every ten minutes.
|
||||
Defaults to every ten minutes, with an installation-specific minute offset.
|
||||
|
||||
#### [`PAPERLESS_TRAIN_TASK_CRON=<cron expression>`](#PAPERLESS_TRAIN_TASK_CRON) {#PAPERLESS_TRAIN_TASK_CRON}
|
||||
|
||||
|
||||
+17
-17
@@ -2195,7 +2195,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">64,65</context>
|
||||
<context context-type="linenumber">67,68</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2134950584701094962" datatype="html">
|
||||
@@ -6180,7 +6180,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">35,36</context>
|
||||
<context context-type="linenumber">38,39</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5554528553553249088" datatype="html">
|
||||
@@ -8361,11 +8361,11 @@
|
||||
<source>An error occurred loading tiff: <x id="PH" equiv-text="err.toString()"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>
|
||||
<context context-type="linenumber">2023</context>
|
||||
<context context-type="linenumber">2025</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>
|
||||
<context context-type="linenumber">2029</context>
|
||||
<context context-type="linenumber">2031</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4958946940233632319" datatype="html">
|
||||
@@ -8407,88 +8407,88 @@
|
||||
<source>Label</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">10,11</context>
|
||||
<context context-type="linenumber">13,14</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3915966149686975421" datatype="html">
|
||||
<source>Optional</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">17,18</context>
|
||||
<context context-type="linenumber">20,21</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3009569956897708604" datatype="html">
|
||||
<source>Upload a new version</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">32,33</context>
|
||||
<context context-type="linenumber">35,36</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="278763911843514709" datatype="html">
|
||||
<source>Use an existing document</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">41,42</context>
|
||||
<context context-type="linenumber">44,45</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1906507263389090131" datatype="html">
|
||||
<source>Existing</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">44,45</context>
|
||||
<context context-type="linenumber">47,48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3119565892291077820" datatype="html">
|
||||
<source>Uploading version...</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">52,53</context>
|
||||
<context context-type="linenumber">55,56</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="8538204518127762311" datatype="html">
|
||||
<source>Processing version...</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">58,59</context>
|
||||
<context context-type="linenumber">61,62</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6587183611950398104" datatype="html">
|
||||
<source>Version upload failed.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">63,64</context>
|
||||
<context context-type="linenumber">66,67</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6328986243040954523" datatype="html">
|
||||
<source>Version label</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">88,89</context>
|
||||
<context context-type="linenumber">91,92</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">98,99</context>
|
||||
<context context-type="linenumber">101,102</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2724055831234181057" datatype="html">
|
||||
<source>Version</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">109</context>
|
||||
<context context-type="linenumber">112</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2491751767883178298" datatype="html">
|
||||
<source>Delete this version?</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">140,141</context>
|
||||
<context context-type="linenumber">143,144</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="894108684749537200" datatype="html">
|
||||
<source>Delete version</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-version-dropdown/document-version-dropdown.component.html</context>
|
||||
<context context-type="linenumber">146,147</context>
|
||||
<context context-type="linenumber">149,150</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="9111284310237278846" datatype="html">
|
||||
|
||||
@@ -2171,6 +2171,11 @@ describe('DocumentDetailComponent', () => {
|
||||
).toBe(10)
|
||||
component.openEmailDocument()
|
||||
expect(modalSpy).toHaveBeenCalled()
|
||||
expect(
|
||||
(
|
||||
modalSpy.mock.results[1].value as NgbModalRef
|
||||
).componentInstance.documentIds()
|
||||
).toEqual([10])
|
||||
})
|
||||
|
||||
it('should set previewText', () => {
|
||||
|
||||
@@ -1973,7 +1973,9 @@ export class DocumentDetailComponent
|
||||
const modal = this.modalService.open(EmailDocumentDialogComponent, {
|
||||
backdrop: 'static',
|
||||
})
|
||||
modal.componentInstance.documentIds.set([this.document().id])
|
||||
modal.componentInstance.documentIds.set([
|
||||
this.selectedVersionId() ?? this.document().id,
|
||||
])
|
||||
modal.componentInstance.hasArchiveVersion.set(
|
||||
this.metadata()?.has_archive_version ??
|
||||
!!this.document()?.archived_file_name
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" ngbDropdownToggle>
|
||||
<i-bs name="file-earmark-diff"></i-bs>
|
||||
<span class="d-none d-lg-inline ps-1" i18n>Versions</span>
|
||||
@if (versions.length > 1) {
|
||||
<span class="badge text-bg-secondary ms-1">{{ versions.length }}</span>
|
||||
}
|
||||
</button>
|
||||
<div class="dropdown-menu shadow" ngbDropdownMenu>
|
||||
<div class="px-3 py-2 mb-2">
|
||||
|
||||
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1563
-920
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1562
-919
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1589
-946
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1752
-1109
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+2809
-2167
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1597
-954
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1562
-919
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
+1560
-917
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1020
-800
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1340
-1120
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
from hashlib import sha256
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -172,6 +173,15 @@ def parse_beat_schedule() -> dict:
|
||||
# Don't add disabled tasks to the schedule
|
||||
if value == "disable":
|
||||
continue
|
||||
if (
|
||||
task["env_key"] == "PAPERLESS_EMAIL_TASK_CRON"
|
||||
and task["env_key"] not in os.environ
|
||||
):
|
||||
# Spread default polling across the ten-minute interval.
|
||||
secret = os.environ["PAPERLESS_SECRET_KEY"].encode()
|
||||
offset = int.from_bytes(sha256(secret).digest()) % 10
|
||||
minutes = ",".join(str(minute) for minute in range(offset, 60, 10))
|
||||
value = f"{minutes} * * * *"
|
||||
# I find https://crontab.guru/ super helpful
|
||||
# crontab(5) format
|
||||
# - five time-and-date fields
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user