emailengine-app 2.83.2 → 2.84.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +27 -0
  3. package/README.md +1 -1
  4. package/SECURITY.md +126 -47
  5. package/data/google-crawlers.json +1 -1
  6. package/lib/api-routes/outbox-routes.js +132 -9
  7. package/lib/api-routes/permission-map.js +11 -1
  8. package/lib/consts.js +0 -4
  9. package/lib/email-client/imap/idle-settings.js +44 -0
  10. package/lib/email-client/imap/mailbox.js +19 -7
  11. package/lib/email-client/imap-client.js +3 -21
  12. package/lib/enum-descriptions.js +7 -0
  13. package/lib/export.js +2 -6
  14. package/lib/field-usage.js +4 -0
  15. package/lib/handlebars-helpers.js +4 -0
  16. package/lib/outbox.js +338 -10
  17. package/lib/queue-browser/definitions.js +132 -0
  18. package/lib/queue-browser/format.js +387 -0
  19. package/lib/queue-browser/index.js +568 -0
  20. package/lib/queue-job-actions.js +75 -0
  21. package/lib/queue-retention.js +53 -1
  22. package/lib/routes-ui.js +5 -0
  23. package/lib/schemas.js +42 -2
  24. package/lib/security-headers.js +2 -24
  25. package/lib/token-permission-view.js +1 -1
  26. package/lib/ui-routes/account-routes.js +6 -0
  27. package/lib/ui-routes/imap-idle-field.js +42 -0
  28. package/lib/ui-routes/queue-routes.js +371 -0
  29. package/lib/utils/status-error.js +21 -0
  30. package/package.json +15 -17
  31. package/prepare-bundle-deps.sh +1 -1
  32. package/sbom.json +1 -1
  33. package/server.js +59 -24
  34. package/static/css/flyonui.css +1 -1
  35. package/static/css/src/app.tailwind.css +2 -0
  36. package/static/js/queues.js +117 -0
  37. package/static/licenses.html +122 -246
  38. package/translations/messages.pot +57 -42
  39. package/views/accounts/account.hbs +31 -0
  40. package/views/accounts/edit.hbs +2 -0
  41. package/views/config/service.hbs +1 -2
  42. package/views/dashboard.hbs +2 -2
  43. package/views/partials/queue_cell_account.hbs +20 -0
  44. package/views/partials/queue_cell_failure.hbs +6 -0
  45. package/views/partials/queue_clean_items.hbs +9 -0
  46. package/views/partials/queue_clean_modal.hbs +9 -0
  47. package/views/partials/queue_entry_actions.hbs +41 -0
  48. package/views/partials/queue_job_actions.hbs +15 -0
  49. package/views/partials/queue_pause_controls.hbs +18 -0
  50. package/views/partials/queue_retention_note.hbs +49 -0
  51. package/views/partials/queue_rows_export.hbs +58 -0
  52. package/views/partials/queue_rows_notify.hbs +73 -0
  53. package/views/partials/queue_rows_submit.hbs +70 -0
  54. package/views/partials/side_menu.hbs +1 -1
  55. package/views/partials/ui/tooltip.hbs +5 -3
  56. package/views/queues/index.hbs +104 -0
  57. package/views/queues/job.hbs +224 -0
  58. package/views/queues/queue.hbs +93 -0
  59. package/views/webhooks/webhook.hbs +3 -0
  60. package/workers/api.js +0 -4
  61. package/workers/submit.js +19 -5
  62. package/workers/webhooks.js +13 -0
  63. package/lib/api-routes/bull-board-routes.js +0 -56
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Content-Type: text/plain; charset=ascii\n"
4
- "POT-Creation-Date: 2026-10-10 14:55+0000\n"
4
+ "POT-Creation-Date: 2026-10-15 06:31+0000\n"
5
5
 
6
6
  #: lib/autodetect-imap-settings.js:160
7
7
  msgid ""
@@ -24,88 +24,88 @@ msgstr ""
24
24
  #: lib/tools.js:2576
25
25
  #: lib/tools.js:2582
26
26
  #: lib/tools.js:2587
27
- #: lib/ui-routes/account-routes.js:1324
27
+ #: lib/ui-routes/account-routes.js:1326
28
28
  msgid "Invalid or expired account setup URL"
29
29
  msgstr ""
30
30
 
31
- #: lib/ui-routes/account-routes.js:483
32
- #: lib/ui-routes/account-routes.js:527
33
- #: lib/ui-routes/account-routes.js:847
34
- #: lib/ui-routes/account-routes.js:924
35
- #: lib/ui-routes/account-routes.js:937
36
- #: lib/ui-routes/account-routes.js:984
37
- #: lib/ui-routes/account-routes.js:1200
38
- #: lib/ui-routes/account-routes.js:1391
31
+ #: lib/ui-routes/account-routes.js:485
32
+ #: lib/ui-routes/account-routes.js:529
33
+ #: lib/ui-routes/account-routes.js:849
34
+ #: lib/ui-routes/account-routes.js:926
35
+ #: lib/ui-routes/account-routes.js:939
36
+ #: lib/ui-routes/account-routes.js:986
37
+ #: lib/ui-routes/account-routes.js:1202
38
+ #: lib/ui-routes/account-routes.js:1393
39
39
  #: lib/ui-routes/route-helpers.js:350
40
- #: workers/api.js:2307
41
- #: workers/api.js:2382
40
+ #: workers/api.js:2306
41
+ #: workers/api.js:2381
42
42
  msgid "Email Account Setup"
43
43
  msgstr ""
44
44
 
45
- #: lib/ui-routes/account-routes.js:552
46
- #: lib/ui-routes/account-routes.js:584
45
+ #: lib/ui-routes/account-routes.js:554
46
+ #: lib/ui-routes/account-routes.js:586
47
47
  #: lib/ui-routes/unsubscribe-routes.js:71
48
48
  msgid "Invalid request. Check your input and try again."
49
49
  msgstr ""
50
50
 
51
- #: lib/ui-routes/account-routes.js:728
51
+ #: lib/ui-routes/account-routes.js:730
52
52
  msgid "Too many attempts for this setup link. Request a new setup link to continue."
53
53
  msgstr ""
54
54
 
55
- #: lib/ui-routes/account-routes.js:971
56
- #: lib/ui-routes/account-routes.js:1374
55
+ #: lib/ui-routes/account-routes.js:973
56
+ #: lib/ui-routes/account-routes.js:1376
57
57
  msgid "Couldn't set up account. Try again."
58
58
  msgstr ""
59
59
 
60
- #: lib/ui-routes/account-routes.js:1059
61
- #: lib/ui-routes/account-routes.js:1099
60
+ #: lib/ui-routes/account-routes.js:1061
61
+ #: lib/ui-routes/account-routes.js:1101
62
62
  #: lib/ui-routes/admin-entities-routes.js:1941
63
63
  msgid "Server hostname was not found"
64
64
  msgstr ""
65
65
 
66
- #: lib/ui-routes/account-routes.js:1062
67
- #: lib/ui-routes/account-routes.js:1102
66
+ #: lib/ui-routes/account-routes.js:1064
67
+ #: lib/ui-routes/account-routes.js:1104
68
68
  #: lib/ui-routes/admin-entities-routes.js:1944
69
69
  msgid "Invalid username or password"
70
70
  msgstr ""
71
71
 
72
- #: lib/ui-routes/account-routes.js:1067
73
- #: lib/ui-routes/account-routes.js:1119
72
+ #: lib/ui-routes/account-routes.js:1069
73
+ #: lib/ui-routes/account-routes.js:1121
74
74
  #: lib/ui-routes/admin-entities-routes.js:1961
75
75
  msgid "Connection timed out"
76
76
  msgstr ""
77
77
 
78
- #: lib/ui-routes/account-routes.js:1073
79
- #: lib/ui-routes/account-routes.js:1122
78
+ #: lib/ui-routes/account-routes.js:1075
79
+ #: lib/ui-routes/account-routes.js:1124
80
80
  #: lib/ui-routes/admin-entities-routes.js:1964
81
81
  msgid "Could not connect to server"
82
82
  msgstr ""
83
83
 
84
- #: lib/ui-routes/account-routes.js:1086
85
- #: lib/ui-routes/account-routes.js:1090
86
- #: lib/ui-routes/account-routes.js:1111
87
- #: lib/ui-routes/account-routes.js:1115
84
+ #: lib/ui-routes/account-routes.js:1088
85
+ #: lib/ui-routes/account-routes.js:1092
86
+ #: lib/ui-routes/account-routes.js:1113
87
+ #: lib/ui-routes/account-routes.js:1117
88
88
  #: lib/ui-routes/admin-entities-routes.js:1953
89
89
  #: lib/ui-routes/admin-entities-routes.js:1957
90
90
  msgid "TLS protocol error"
91
91
  msgstr ""
92
92
 
93
- #: lib/ui-routes/account-routes.js:1105
93
+ #: lib/ui-routes/account-routes.js:1107
94
94
  #: lib/ui-routes/admin-entities-routes.js:1947
95
95
  msgid "Authentication credentials were not provided"
96
96
  msgstr ""
97
97
 
98
- #: lib/ui-routes/account-routes.js:1108
98
+ #: lib/ui-routes/account-routes.js:1110
99
99
  #: lib/ui-routes/admin-entities-routes.js:1950
100
100
  msgid "OAuth2 authentication failed"
101
101
  msgstr ""
102
102
 
103
- #: lib/ui-routes/account-routes.js:1125
103
+ #: lib/ui-routes/account-routes.js:1127
104
104
  #: lib/ui-routes/admin-entities-routes.js:1967
105
105
  msgid "Unexpected server response"
106
106
  msgstr ""
107
107
 
108
- #: lib/ui-routes/account-routes.js:1312
108
+ #: lib/ui-routes/account-routes.js:1314
109
109
  msgid "Temporary error, please try again"
110
110
  msgstr ""
111
111
 
@@ -119,6 +119,9 @@ msgstr ""
119
119
 
120
120
  #: lib/ui-routes/oauth-config-routes.js:274
121
121
  #: views/config/license.hbs:20
122
+ #: views/partials/queue_retention_note.hbs:11
123
+ #: views/queues/index.hbs:54
124
+ #: views/queues/index.hbs:78
122
125
  msgid "%d day"
123
126
  msgid_plural "%d days"
124
127
  msgstr[0] ""
@@ -411,7 +414,7 @@ msgstr[0] ""
411
414
  msgstr[1] ""
412
415
 
413
416
  #: views/error.hbs:6
414
- #: workers/api.js:3177
417
+ #: workers/api.js:3176
415
418
  msgid "Something went wrong"
416
419
  msgstr ""
417
420
 
@@ -471,6 +474,18 @@ msgstr ""
471
474
  msgid "Request failed."
472
475
  msgstr ""
473
476
 
477
+ #: views/queues/index.hbs:49
478
+ msgid "%d job at a time each"
479
+ msgid_plural "%d jobs at a time each"
480
+ msgstr[0] ""
481
+ msgstr[1] ""
482
+
483
+ #: views/queues/index.hbs:49
484
+ msgid "%d worker thread"
485
+ msgid_plural "%d worker threads"
486
+ msgstr[0] ""
487
+ msgstr[1] ""
488
+
474
489
  #: views/redirect.hbs:1
475
490
  msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
476
491
  msgstr ""
@@ -515,37 +530,37 @@ msgid ""
515
530
  "received."
516
531
  msgstr ""
517
532
 
518
- #: workers/api.js:2234
533
+ #: workers/api.js:2233
519
534
  msgid ""
520
535
  "The sign-in was cancelled or the requested access was not granted. Open the "
521
536
  "account setup link again to retry."
522
537
  msgstr ""
523
538
 
524
- #: workers/api.js:2243
539
+ #: workers/api.js:2242
525
540
  msgid "Sign-in with the email provider failed: %s"
526
541
  msgstr ""
527
542
 
528
- #: workers/api.js:2247
543
+ #: workers/api.js:2246
529
544
  msgid "Sign-in with the email provider failed: no authorization code was received"
530
545
  msgstr ""
531
546
 
532
- #: workers/api.js:2253
547
+ #: workers/api.js:2252
533
548
  msgid "Sign-in with the email provider failed: the request state is not valid"
534
549
  msgstr ""
535
550
 
536
- #: workers/api.js:2259
551
+ #: workers/api.js:2258
537
552
  msgid ""
538
553
  "The account setup session has expired or was already used. Open the account "
539
554
  "setup link again to retry."
540
555
  msgstr ""
541
556
 
542
- #: workers/api.js:2266
557
+ #: workers/api.js:2265
543
558
  msgid ""
544
559
  "Sign-in with the email provider failed: the stored setup session is not "
545
560
  "valid"
546
561
  msgstr ""
547
562
 
548
- #: workers/api.js:3176
549
- #: workers/api.js:3291
563
+ #: workers/api.js:3175
564
+ #: workers/api.js:3287
550
565
  msgid "Requested page not found"
551
566
  msgstr ""
@@ -701,6 +701,37 @@
701
701
 
702
702
  {{/unless}}
703
703
 
704
+ {{!-- The account's share of the queues: what it still has to send, and the failed messages
705
+ kept for a retry. Links go to the queue browser filtered to this account. --}}
706
+ <div class="card bg-base-100 shadow-md mb-6">
707
+ <div class="card-header flex flex-wrap items-center justify-between gap-3">
708
+ <h6 class="card-title text-primary mb-0">Queues</h6>
709
+ <a href="{{queuedMessages.url}}" class="link link-animated text-sm">Open in the queue browser</a>
710
+ </div>
711
+ <div class="card-body">
712
+ <dl class="ee-dl">
713
+ <dt>Messages to send</dt>
714
+ <dd>
715
+ {{#if queuedMessages.pending}}
716
+ <a href="{{queuedMessages.url}}" class="link link-animated">{{formatInteger queuedMessages.pending userLocale}} waiting or scheduled</a>
717
+ {{else}}
718
+ <span class="text-base-content/60">None waiting</span>
719
+ {{/if}}
720
+ </dd>
721
+ <dt>Failed messages</dt>
722
+ <dd>
723
+ {{#if queuedMessages.failed}}
724
+ <a href="{{queuedMessages.failedUrl}}" class="link link-animated">{{formatInteger queuedMessages.failed userLocale}} kept for a retry</a>
725
+ {{else}}
726
+ <span class="text-base-content/60">None kept</span>
727
+ {{/if}}
728
+ </dd>
729
+ <dt>Webhooks</dt>
730
+ <dd><a href="{{queuedMessages.webhooksUrl}}" class="link link-animated">Failed deliveries for this account</a></dd>
731
+ </dl>
732
+ </div>
733
+ </div>
734
+
704
735
  {{#if showAdvanced}}
705
736
  <div class="card bg-base-100 shadow-md mb-6">
706
737
  <div class="card-header"><h6 class="card-title text-primary">Advanced</h6>
@@ -64,6 +64,8 @@
64
64
 
65
65
  {{> ui/form-field id="imap_resyncDelay" type="number" label="Resync interval (seconds)" value=values.imap_resyncDelay error=errors.imap_resyncDelay lpignore=true hint="Time between full mailbox syncs. Leave blank to keep the current interval."}}
66
66
 
67
+ {{> ui/form-field id="imap_maxIdleTime" type="number" label="IDLE restart interval (seconds)" value=values.imap_maxIdleTime error=errors.imap_maxIdleTime lpignore=true hint="Restart IDLE this often to keep a connection alive that the server or a firewall drops when idle, without a BYE. Between 10 and 1800. Leave blank for the default."}}
68
+
67
69
  {{/unless}}
68
70
 
69
71
  {{> ui/checkbox id="imap_disabled" label="Disable IMAP" checked=values.imap_disabled error=errors.imap_disabled tooltip="Stop syncing this mailbox while keeping the account available for sending email."}}
@@ -110,8 +110,7 @@
110
110
  autocomplete="off" />
111
111
  <span class="helper-text">Maximum completed jobs to retain per queue for up to 24 hours. Set to 0 to remove completed jobs.
112
112
  Failed jobs are retained separately, even when this is 0; this value also raises their count limit
113
- if it exceeds the configured failed-job limit. Review retained jobs on the <a href="/admin/bull-board"
114
- target="_blank" rel="noopener noreferrer" class="link link-animated">Queues</a> page.</span>
113
+ if it exceeds the configured failed-job limit. Review retained jobs on the <a href="/admin/queues" class="link link-animated">Queues</a> page.</span>
115
114
  {{/ui/form-field}}
116
115
  </div>
117
116
 
@@ -159,9 +159,9 @@
159
159
  left a quarter-width hole at the end --}}
160
160
  <div class="grid grid-cols-2 gap-4 xl:grid-cols-[repeat(auto-fit,minmax(15rem,1fr))]">
161
161
 
162
- {{> queueCard queue=stats.queues.notify href="/admin/bull-board/queue/Webhooks%20Queue%20-%20notify" label="Webhooks queue" tooltip="This queue processes webhook notifications" delayedTooltip="Delayed queue entries"}}
162
+ {{> queueCard queue=stats.queues.notify href="/admin/queues/notify" label="Webhooks queue" tooltip="This queue processes webhook notifications" delayedTooltip="Delayed queue entries"}}
163
163
 
164
- {{> queueCard queue=stats.queues.submit href="/admin/bull-board/queue/Submission%20Queue%20-%20submit" label="Submission queue" tooltip="This queue processes outgoing emails" delayedTooltip="Delayed queue entries, including emails scheduled to be sent later"}}
164
+ {{> queueCard queue=stats.queues.submit href="/admin/queues/submit" label="Submission queue" tooltip="This queue processes outgoing emails" delayedTooltip="Delayed queue entries, including emails scheduled to be sent later"}}
165
165
 
166
166
  {{#> ui/stat-card variant=(eeColor redisPing.color) icon=redisPing.icon}}
167
167
  <div class="text-sm font-medium text-base-content/60 mb-1">
@@ -0,0 +1,20 @@
1
+ {{!-- The account a queue entry belongs to: a link while the account exists, the bare id with a
2
+ badge once it is gone (the workers skip the entries of a deleted account, which is worth
3
+ saying), and a muted word for an entry that has no account at all.
4
+ {{> queue_cell_account account=account accountKnown=accountKnown}}
5
+ {{> queue_cell_account account=account accountKnown=accountKnown instance="Instance"}}
6
+ Params:
7
+ account - account id (optional)
8
+ accountKnown - whether the account still exists
9
+ instance - what to show when there is no account (optional; nothing when omitted)
10
+ Inside a listing row the link is lifted above the ui/row-link overlay. --}}
11
+ {{#if account}}
12
+ {{#if accountKnown}}
13
+ <a href="/admin/accounts/{{urlpart account}}" class="link link-animated relative z-[1]">{{account}}</a>
14
+ {{else}}
15
+ <div>{{account}}</div>
16
+ {{> ui/badge label="Account deleted" variant="warning" soft=true class="mt-1" title="The entries of an account that no longer exists are skipped by the worker"}}
17
+ {{/if}}
18
+ {{else}}
19
+ {{#if instance}}<span class="text-base-content/60">{{instance}}</span>{{/if}}
20
+ {{/if}}
@@ -0,0 +1,6 @@
1
+ {{!-- The failure of a queue entry as a listing row shows it: the short label as a badge (the
2
+ full sentence in its tooltip), warning-coloured while the entry is waiting to retry, with
3
+ the worker's reason under it, clamped to two lines. Context: a formatted entry with
4
+ `failure` set. --}}
5
+ {{> ui/badge label=failure.shortLabel variant=(when isRetryWait "warning" "error") soft=true title=failure.label}}
6
+ <div class="text-base-content/60 text-xs md:max-w-xs whitespace-normal break-words line-clamp-2" title="{{failure.reason}}">{{failure.reason}}</div>
@@ -0,0 +1,9 @@
1
+ {{!-- The two "remove every ... entry" items of a queue's overflow menu. Each opens the page's
2
+ #cleanQueue dialog (queue_clean_modal), filled in by static/js/queues.js from the button.
3
+ {{> queue_clean_items name=name title=title nounPlural=nounPlural}}
4
+ Params:
5
+ name - queue name
6
+ title - queue title, for the dialog
7
+ nounPlural - what the queue's entries are called, for the dialog --}}
8
+ <li><button type="button" class="dropdown-item queue-clean-btn" data-queue="{{name}}" data-queue-label="{{title}}" data-state="completed" data-noun="{{nounPlural}}">Remove completed entries</button></li>
9
+ <li><button type="button" class="dropdown-item text-error queue-clean-btn" data-queue="{{name}}" data-queue-label="{{title}}" data-state="failed" data-noun="{{nounPlural}}">Remove failed entries</button></li>
@@ -0,0 +1,9 @@
1
+ {{!-- Confirmation for removing every completed or failed entry of a queue. One dialog per page,
2
+ filled in by static/js/queues.js from the .queue-clean-btn that opened it: the form action
3
+ names the queue, the hidden field the state, and the heading says which. Expects `crumb`
4
+ and (optionally) `currentUrl` in the view context. --}}
5
+ {{#> ui/confirm-modal id="cleanQueue" title="Remove entries" titleId="clean-queue-title" action="/admin/queues" fieldName="state" fieldId="clean-state" formId="cleanQueueForm" submitLabel="Remove entries"}}
6
+ <p class="mb-2">Remove every <strong class="clean-state-name"></strong> entry from the <strong class="clean-queue-name"></strong>?</p>
7
+ <p class="mb-0 text-base-content/70 text-sm clean-queue-note" data-note-completed="Completed entries are kept only as history; removing them frees Redis memory and loses nothing else." data-note-failed="A failed entry is the only record that a delivery was given up on, and for an outgoing message it is also what a retry needs. This cannot be undone."></p>
8
+ <input type="hidden" name="next" form="cleanQueueForm" value="{{#if currentUrl}}{{currentUrl}}{{else}}/admin/queues{{/if}}">
9
+ {{/ui/confirm-modal}}
@@ -0,0 +1,41 @@
1
+ {{!-- The kebab menu of one queue entry: open, and whichever of send now / retry / remove apply
2
+ to its state. Rendered inside an ee-stack-actions cell of a listing row, and nowhere else;
3
+ the detail page lays the same actions out as page-header buttons. Context: a formatted entry
4
+ (url, canPromote, canRetry, canRemove, title), with the page's crumb and currentUrl read
5
+ off the root context because a row's own context is the entry.
6
+
7
+ Send now and Retry are plain POST forms, so they work before the page script has run and
8
+ without it; the busy state comes from the shared form latch in ui.js. Remove goes through
9
+ the shared .list-delete-btn flow of ui/row-actions, which fills the page's #removeJob dialog
10
+ (queue_job_actions) with the entry's name and action. The Open item is rendered here rather
11
+ than through the partial's openHref on purpose: a partial block whose content is nothing
12
+ but {{#if}} wrappers loses it to the Handlebars program-association bug (see
13
+ .claude/rules/admin-ui.md), so the block's first token has to be a static element. --}}
14
+ {{#> ui/row-actions label="Entry actions" deleteModal=(when canRemove "#removeJob" "") deleteName=title deleteAction=(concat url "/remove") deleteLabel="Remove"}}
15
+ <li><a class="dropdown-item" href="{{url}}">Open</a></li>
16
+ {{#if canPromote}}
17
+ <li>
18
+ <form method="post" action="{{url}}/promote">
19
+ <input type="hidden" name="crumb" value="{{@root.crumb}}">
20
+ <input type="hidden" name="next" value="{{@root.currentUrl}}">
21
+ <button type="submit" class="dropdown-item w-full">Send now</button>
22
+ </form>
23
+ </li>
24
+ {{/if}}
25
+ {{#if canRetry}}
26
+ <li>
27
+ <form method="post" action="{{url}}/retry">
28
+ <input type="hidden" name="crumb" value="{{@root.crumb}}">
29
+ <input type="hidden" name="next" value="{{@root.currentUrl}}">
30
+ <button type="submit" class="dropdown-item w-full">Retry</button>
31
+ </form>
32
+ </li>
33
+ {{else if retryBlockedReason}}
34
+ {{!-- A disabled item has its pointer events off, so the tooltip wrapper is what takes the hover --}}
35
+ <li>
36
+ {{#> ui/tooltip text=retryBlockedReason placement="left" class="w-full"}}
37
+ <span class="dropdown-item dropdown-disabled w-full" aria-disabled="true">Retry</span>
38
+ {{/ui/tooltip}}
39
+ </li>
40
+ {{/if}}
41
+ {{/ui/row-actions}}
@@ -0,0 +1,15 @@
1
+ {{!-- The confirmation dialog a queue entry's removal goes through. On a listing page it is filled
2
+ in per row by the shared .list-delete-btn handler (static/js/ui.js); the detail page renders
3
+ it for its one entry through the params. The form returns to `currentUrl`; the route sends
4
+ a removal that came from the entry's own page to its list instead.
5
+ {{> queue_job_actions}}
6
+ {{> queue_job_actions removeAction="/admin/queues/submit/jobs/x/remove" removeName="Hello"}}
7
+ Params:
8
+ removeAction - the removal URL, when the page is about one entry (optional)
9
+ removeName - what to call that entry in the dialog (optional)
10
+ Expects `crumb` and `currentUrl` in the view context. --}}
11
+ {{#> ui/confirm-modal id="removeJob" title="Remove from the queue" action=(when removeAction removeAction "/admin/queues") formId="removeJobForm" submitLabel="Remove"}}
12
+ <p class="mb-2">Remove <strong class="delete-target-name">{{removeName}}</strong> from the queue?</p>
13
+ <p class="mb-0 text-base-content/70 text-sm">It will not run and cannot be brought back. A message removed here is gone for good; a webhook delivery removed here is never sent.</p>
14
+ <input type="hidden" name="next" form="removeJobForm" value="{{currentUrl}}">
15
+ {{/ui/confirm-modal}}
@@ -0,0 +1,18 @@
1
+ {{!-- The pause and resume buttons of a queue, one of which is hidden by the paused state; the
2
+ page script keeps them in step with the live counts through the data-queue-* attributes.
3
+ {{> queue_pause_controls name=name isPaused=isPaused next="/admin/queues"}}
4
+ Params:
5
+ name - queue name
6
+ isPaused - whether the queue is paused now
7
+ next - where the action returns to
8
+ The buttons pass id="" so they cannot inherit a row's id when rendered inside {{#each}}. --}}
9
+ <form method="post" action="/admin/queues/{{name}}/pause" data-queue-active-only="{{name}}" class="{{#if isPaused}}hidden{{/if}}">
10
+ <input type="hidden" name="crumb" value="{{crumb}}">
11
+ <input type="hidden" name="next" value="{{next}}">
12
+ {{> ui/btn label="Pause" type="submit" bare=true style="soft" size="sm" icon="icon-[tabler--player-pause]" id=""}}
13
+ </form>
14
+ <form method="post" action="/admin/queues/{{name}}/resume" data-queue-paused="{{name}}" class="{{#unless isPaused}}hidden{{/unless}}">
15
+ <input type="hidden" name="crumb" value="{{crumb}}">
16
+ <input type="hidden" name="next" value="{{next}}">
17
+ {{> ui/btn label="Resume" type="submit" variant="warning" size="sm" icon="icon-[tabler--player-play]" id=""}}
18
+ </form>
@@ -0,0 +1,49 @@
1
+ {{!-- What the Failed and Completed tabs keep, and where that is set: rendered under the state's
2
+ description in the queue page's card header, nothing for the other states. Context: the
3
+ page's `queue` (its `keepsFinished` picks the export wording), `state`, `retention`
4
+ (describeRetention) and `failedContent.limits`;
5
+ the route provides the last two for these states only. --}}
6
+ {{#equals state.name "failed"}}
7
+ <p class="text-base-content/60 text-sm mt-1 mb-0">
8
+ {{#if queue.keepsFinished}}
9
+ The most recent {{formatInteger retention.failedCount userLocale}} are kept for
10
+ {{ngettext '%d day' '%d days' retention.failedAgeDays}}.
11
+ {{#if retention.failedCountFromSetting}}
12
+ The count follows the completed job history limit in
13
+ <a href="/admin/config/service#queue_settings" class="link link-animated">General settings</a>, which is above the
14
+ floor of {{formatInteger retention.failedCountFloor userLocale}} set with <code>EENGINE_QUEUE_KEEP_FAILED</code>;
15
+ {{else}}
16
+ The count is set with <code>EENGINE_QUEUE_KEEP_FAILED</code>, or by the completed job history limit in
17
+ <a href="/admin/config/service#queue_settings" class="link link-animated">General settings</a> when that is higher;
18
+ {{/if}}
19
+ the age with <code>EENGINE_QUEUE_KEEP_FAILED_AGE</code>.
20
+ {{#equals queue.name "submit"}}
21
+ {{#if failedContent.limits.keepsContent}}
22
+ The content of the {{formatInteger failedContent.limits.maxCount userLocale}} most recent failed messages is kept
23
+ so they can be retried, up to {{failedContent.limits.maxBytesLabel}} in total, set with
24
+ <code>EENGINE_QUEUE_KEEP_FAILED_CONTENT</code> and <code>EENGINE_QUEUE_KEEP_FAILED_CONTENT_SIZE</code>.
25
+ {{else}}
26
+ The content of a failed message is not kept, so none can be retried from here; set
27
+ <code>EENGINE_QUEUE_KEEP_FAILED_CONTENT</code> to keep some.
28
+ {{/if}}
29
+ {{/equals}}
30
+ {{else}}
31
+ Exports are not kept here once they fail; an export's outcome is on its account's page.
32
+ {{/if}}
33
+ </p>
34
+ {{/equals}}
35
+ {{#equals state.name "completed"}}
36
+ <p class="text-base-content/60 text-sm mt-1 mb-0">
37
+ {{#if queue.keepsFinished}}
38
+ {{#if retention.completedCount}}
39
+ The most recent {{formatInteger retention.completedCount userLocale}} are kept for at most a day, as set by
40
+ {{else}}
41
+ Removed as soon as they finish. To keep the most recent ones for a day, raise
42
+ {{/if}}
43
+ the completed job history limit in
44
+ <a href="/admin/config/service#queue_settings" class="link link-animated">General settings</a>.
45
+ {{else}}
46
+ Exports are not kept here once they finish; an export's result is on its account's page.
47
+ {{/if}}
48
+ </p>
49
+ {{/equals}}
@@ -0,0 +1,58 @@
1
+ {{!-- Listing rows of the exports queue. Read-only: an export is managed from its account page,
2
+ which the row links to. Context: the queue page (listing.entries are formatted export
3
+ entries, see lib/queue-browser/format.js). --}}
4
+ <table class="table ee-table-stack">
5
+ <thead>
6
+ <tr>
7
+ <th>Export</th>
8
+ <th>Account</th>
9
+ <th>When</th>
10
+ <th>Attempts</th>
11
+ <th>Outcome</th>
12
+ <th class="w-12"><span class="sr-only">Actions</span></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ {{#each listing.entries}}
17
+ <tr class="hover:bg-base-200/60">
18
+ <td class="relative">
19
+ {{> ui/row-link href=url label="Open export entry"}}
20
+ <div class="font-medium">{{title}}</div>
21
+ {{> ui/entity-id id=exportId label="Export ID"}}
22
+ </td>
23
+
24
+ <td class="relative align-top" data-label="Account">
25
+ {{> ui/row-link href=url}}
26
+ {{> queue_cell_account account=account accountKnown=accountKnown}}
27
+ </td>
28
+
29
+ <td class="relative align-top whitespace-nowrap" data-label="When">
30
+ {{> ui/row-link href=url}}
31
+ <span class="text-base-content/60">{{when.label}}</span> <span class="relative-time" data-time="{{when.time}}"></span>
32
+ </td>
33
+
34
+ <td class="relative align-top whitespace-nowrap" data-label="Attempts">
35
+ {{> ui/row-link href=url}}
36
+ {{attemptsLabel}}
37
+ </td>
38
+
39
+ <td class="relative align-top" data-label="Outcome">
40
+ {{> ui/row-link href=url}}
41
+ {{#if failure}}
42
+ {{> queue_cell_failure}}
43
+ {{else}}
44
+ <span class="text-base-content/40">-</span>
45
+ {{/if}}
46
+ </td>
47
+
48
+ <td class="ee-stack-actions relative text-end">
49
+ {{#> ui/row-actions openHref=url label="Entry actions"}}
50
+ {{#if accountKnown}}
51
+ <li><a class="dropdown-item" href="/admin/accounts/{{urlpart account}}">Open account</a></li>
52
+ {{/if}}
53
+ {{/ui/row-actions}}
54
+ </td>
55
+ </tr>
56
+ {{/each}}
57
+ </tbody>
58
+ </table>
@@ -0,0 +1,73 @@
1
+ {{!-- Listing rows of the webhooks queue. Context: the queue page (listing.entries are formatted
2
+ notify entries, see lib/queue-browser/format.js). --}}
3
+ <table class="table ee-table-stack">
4
+ <thead>
5
+ <tr>
6
+ <th>Event</th>
7
+ <th>Account</th>
8
+ <th>When</th>
9
+ <th>Attempts</th>
10
+ <th>Outcome</th>
11
+ <th class="w-12"><span class="sr-only">Actions</span></th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ {{#each listing.entries}}
16
+ <tr class="hover:bg-base-200/60">
17
+ <td class="relative">
18
+ {{> ui/row-link href=url label="Open webhook delivery"}}
19
+ <div class="flex flex-wrap items-center gap-2">
20
+ <code class="font-medium">{{event}}</code>
21
+ {{#if routeId}}
22
+ {{#if routeKnown}}
23
+ <a href="/admin/webhooks/webhook/{{urlpart routeId}}" class="link link-animated relative z-[1] text-sm">{{routeName}}</a>
24
+ {{else}}
25
+ {{> ui/badge label="Route deleted" variant="warning" soft=true title="The webhook route this delivery was queued for no longer exists, so it is skipped"}}
26
+ {{/if}}
27
+ {{else}}
28
+ <span class="text-base-content/60 text-sm">default webhook</span>
29
+ {{/if}}
30
+ </div>
31
+ {{#if about}}<div class="text-base-content/60 text-xs truncate max-w-md">{{about}}</div>{{/if}}
32
+ {{> ui/entity-id id=id label="Job ID"}}
33
+ </td>
34
+
35
+ <td class="relative align-top" data-label="Account">
36
+ {{> ui/row-link href=url}}
37
+ {{> queue_cell_account account=account accountKnown=accountKnown instance="Instance"}}
38
+ </td>
39
+
40
+ <td class="relative align-top whitespace-nowrap" data-label="When">
41
+ {{> ui/row-link href=url}}
42
+ <span class="text-base-content/60">{{when.label}}</span> <span class="relative-time" data-time="{{when.time}}"></span>
43
+ </td>
44
+
45
+ <td class="relative align-top whitespace-nowrap" data-label="Attempts">
46
+ {{> ui/row-link href=url}}
47
+ {{attemptsLabel}}
48
+ </td>
49
+
50
+ <td class="relative align-top" data-label="Outcome">
51
+ {{> ui/row-link href=url}}
52
+ {{#if failure}}
53
+ {{> queue_cell_failure}}
54
+ {{else}}
55
+ {{#equals state "completed"}}
56
+ {{#equals outcome.status "delivered"}}
57
+ {{> ui/badge label=(concat "Delivered " outcome.statusCode) variant="success" soft=true}}
58
+ {{else}}
59
+ {{> ui/badge label="Finished" variant="success" soft=true title="Completed without a request: no webhook target applied to this event, or the event is not allowlisted"}}
60
+ {{/equals}}
61
+ {{else}}
62
+ <span class="text-base-content/40">-</span>
63
+ {{/equals}}
64
+ {{/if}}
65
+ </td>
66
+
67
+ <td class="ee-stack-actions relative text-end">
68
+ {{> queue_entry_actions}}
69
+ </td>
70
+ </tr>
71
+ {{/each}}
72
+ </tbody>
73
+ </table>