@kinetis/vector-ui 0.11.3 → 0.12.0

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 (179) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/app/components/Vx/CommandPalette.vue +5 -2
  3. package/app/components/Vx/Confirm.vue +19 -3
  4. package/app/components/Vx/Input/Markdown.vue +2 -1
  5. package/app/components/Vx/Input/RichText.vue +3 -1
  6. package/app/components/Vx/Queues/Failed.vue +243 -0
  7. package/app/components/Vx/Queues/FailedDetail.vue +106 -0
  8. package/app/components/Vx/Queues/Metrics.vue +118 -0
  9. package/app/components/Vx/Queues/Overview.vue +167 -0
  10. package/app/components/Vx/Widget/Card.vue +11 -3
  11. package/app/components/Vx/Widget/Queues.vue +51 -0
  12. package/app/composables/useConfirm.ts +34 -5
  13. package/app/composables/useVectorExtensions.ts +16 -2
  14. package/app/composables/useVectorQueues.ts +81 -0
  15. package/app/composables/useVectorSchema.ts +1 -1
  16. package/app/i18n/ar/dashboard.ts +1 -0
  17. package/app/i18n/ar/index.ts +2 -1
  18. package/app/i18n/ar/queues.ts +118 -0
  19. package/app/i18n/de/dashboard.ts +1 -0
  20. package/app/i18n/de/index.ts +2 -1
  21. package/app/i18n/de/queues.ts +118 -0
  22. package/app/i18n/en/dashboard.ts +1 -0
  23. package/app/i18n/en/index.ts +2 -1
  24. package/app/i18n/en/queues.ts +118 -0
  25. package/app/i18n/es/dashboard.ts +1 -0
  26. package/app/i18n/es/index.ts +2 -1
  27. package/app/i18n/es/queues.ts +118 -0
  28. package/app/i18n/fr/dashboard.ts +1 -0
  29. package/app/i18n/fr/index.ts +2 -1
  30. package/app/i18n/fr/queues.ts +118 -0
  31. package/app/i18n/he/dashboard.ts +1 -0
  32. package/app/i18n/he/index.ts +2 -1
  33. package/app/i18n/he/queues.ts +118 -0
  34. package/app/i18n/it/dashboard.ts +1 -0
  35. package/app/i18n/it/index.ts +2 -1
  36. package/app/i18n/it/queues.ts +118 -0
  37. package/app/i18n/ja/dashboard.ts +1 -0
  38. package/app/i18n/ja/index.ts +2 -1
  39. package/app/i18n/ja/queues.ts +118 -0
  40. package/app/i18n/ko/dashboard.ts +1 -0
  41. package/app/i18n/ko/index.ts +2 -1
  42. package/app/i18n/ko/queues.ts +118 -0
  43. package/app/i18n/nl/dashboard.ts +1 -0
  44. package/app/i18n/nl/index.ts +2 -1
  45. package/app/i18n/nl/queues.ts +118 -0
  46. package/app/i18n/pl/dashboard.ts +1 -0
  47. package/app/i18n/pl/index.ts +2 -1
  48. package/app/i18n/pl/queues.ts +118 -0
  49. package/app/i18n/pt/dashboard.ts +1 -0
  50. package/app/i18n/pt/index.ts +2 -1
  51. package/app/i18n/pt/queues.ts +118 -0
  52. package/app/i18n/pt-BR/dashboard.ts +1 -0
  53. package/app/i18n/pt-BR/index.ts +2 -1
  54. package/app/i18n/pt-BR/queues.ts +118 -0
  55. package/app/i18n/ru/dashboard.ts +1 -0
  56. package/app/i18n/ru/index.ts +2 -1
  57. package/app/i18n/ru/queues.ts +118 -0
  58. package/app/i18n/tr/dashboard.ts +1 -0
  59. package/app/i18n/tr/index.ts +2 -1
  60. package/app/i18n/tr/queues.ts +118 -0
  61. package/app/i18n/uk/dashboard.ts +1 -0
  62. package/app/i18n/uk/index.ts +2 -1
  63. package/app/i18n/uk/queues.ts +118 -0
  64. package/app/i18n/zh-Hans/dashboard.ts +1 -0
  65. package/app/i18n/zh-Hans/index.ts +2 -1
  66. package/app/i18n/zh-Hans/queues.ts +118 -0
  67. package/app/layouts/vector.vue +5 -3
  68. package/app/pages/p/[name].vue +4 -2
  69. package/app/pages/queues/index.vue +58 -0
  70. package/app/plugins/vector-extensions.client.ts +30 -14
  71. package/app/types/vector.ts +95 -3
  72. package/app/utils/extensionLoader.ts +36 -0
  73. package/app/utils/queues.ts +153 -0
  74. package/dist/static/200.html +1 -1
  75. package/dist/static/404.html +1 -1
  76. package/dist/static/_nuxt/-CLe6vUm.js +1 -0
  77. package/dist/static/_nuxt/{qpVO-NAo.js → A_YrkIh-.js} +1 -1
  78. package/dist/static/_nuxt/B0taRzJN.js +1 -0
  79. package/dist/static/_nuxt/BC4n0Ghf.js +1 -0
  80. package/dist/static/_nuxt/{DzOxWOFX.js → BDLoIbc4.js} +1 -1
  81. package/dist/static/_nuxt/{CHpNSaGi.js → BDwgkdzs.js} +1 -1
  82. package/dist/static/_nuxt/BFBN0MCm.js +1 -0
  83. package/dist/static/_nuxt/BMS510w1.js +1 -0
  84. package/dist/static/_nuxt/BQH4NHkG.js +1 -0
  85. package/dist/static/_nuxt/BSYV8YR9.js +1 -0
  86. package/dist/static/_nuxt/{BOc3bd5G.js → BWmtnGCr.js} +1 -1
  87. package/dist/static/_nuxt/BZKBoSZy.js +1 -0
  88. package/dist/static/_nuxt/BhY1yzIk.js +1 -0
  89. package/dist/static/_nuxt/Bi_p8utQ.js +1 -0
  90. package/dist/static/_nuxt/{BH3E4sUK.js → BnRGraEc.js} +1 -1
  91. package/dist/static/_nuxt/{5WvxG0mj.js → BqBjYl5i.js} +1 -1
  92. package/dist/static/_nuxt/Br-v6nfV.js +1 -0
  93. package/dist/static/_nuxt/{C5Ez1FXH.js → BsCAElgq.js} +1 -1
  94. package/dist/static/_nuxt/{BwHwQnM0.js → BtSHpy4S.js} +1 -1
  95. package/dist/static/_nuxt/BzY34lc1.js +1 -0
  96. package/dist/static/_nuxt/C64NUw_T.js +1 -0
  97. package/dist/static/_nuxt/C6P-usW8.js +1 -0
  98. package/dist/static/_nuxt/{BVRr96yG.js → CCev1aKa.js} +1 -1
  99. package/dist/static/_nuxt/{Dorn4eG1.js → CEAJldjl.js} +1 -1
  100. package/dist/static/_nuxt/{Bs6-HCEW.js → CNKBVevI.js} +1 -1
  101. package/dist/static/_nuxt/{DGOB4cMy.js → C_g8bZuk.js} +1 -1
  102. package/dist/static/_nuxt/CgxSerDc.js +1 -0
  103. package/dist/static/_nuxt/CuG-8Z4K.js +105 -0
  104. package/dist/static/_nuxt/{2oUN-NEf.js → CvqfGMjv.js} +1 -1
  105. package/dist/static/_nuxt/CxlUCc9r.js +1 -0
  106. package/dist/static/_nuxt/D1Z538bJ.js +1 -0
  107. package/dist/static/_nuxt/{CXIZ5vIr.js → D1nKViyT.js} +1 -1
  108. package/dist/static/_nuxt/{D8kTmNUH.js → D7as59Fa.js} +1 -1
  109. package/dist/static/_nuxt/{B1-Pqo_7.js → D8QRJNA1.js} +1 -1
  110. package/dist/static/_nuxt/DB9Px0Zg.js +1 -0
  111. package/dist/static/_nuxt/DJsVN_9p.js +1 -0
  112. package/dist/static/_nuxt/DSIjvNuw.js +2 -0
  113. package/dist/static/_nuxt/{C_Ouo24Z.js → DayrADeq.js} +1 -1
  114. package/dist/static/_nuxt/DhiDhXgK.js +2 -0
  115. package/dist/static/_nuxt/{Dialog.B6aT2GLZ.css → Dialog.al_QQir4.css} +1 -1
  116. package/dist/static/_nuxt/DjPCgCyJ.js +1 -0
  117. package/dist/static/_nuxt/{BSfpIrlx.js → Dm7hGi3P.js} +1 -1
  118. package/dist/static/_nuxt/DqjZ16aB.js +1 -0
  119. package/dist/static/_nuxt/DssSpQf8.js +1 -0
  120. package/dist/static/_nuxt/VBtn.DYtpaadd.css +1 -0
  121. package/dist/static/_nuxt/{CADHRY6v.js → ZVCqzuKT.js} +1 -1
  122. package/dist/static/_nuxt/builds/latest.json +1 -1
  123. package/dist/static/_nuxt/builds/meta/f5ce5132-6b99-4f7d-9c7c-6cef19f59d51.json +1 -0
  124. package/dist/static/_nuxt/{entry.BW8eGVIg.css → entry.Sg6-iCOx.css} +1 -1
  125. package/dist/static/_nuxt/error-404.B9sBsxLH.css +1 -0
  126. package/dist/static/_nuxt/error-500.Dy1PcAYT.css +1 -0
  127. package/dist/static/_nuxt/mbGIOAkp.js +1 -0
  128. package/dist/static/_nuxt/qzTYEKJ1.js +2 -0
  129. package/dist/static/_nuxt/{BKxQp7go.js → rVO8WoV9.js} +3 -3
  130. package/dist/static/_nuxt/rkb3Oe3x.js +1 -0
  131. package/dist/static/_nuxt/sIY_uPia.js +1 -0
  132. package/dist/static/_nuxt/tm30M8Ch.js +1 -0
  133. package/dist/static/_nuxt/vab0LrNP.js +67 -0
  134. package/dist/static/_nuxt/{DmrPXKlp.js → vmqqxV_Q.js} +1 -1
  135. package/dist/static/_nuxt/{UfoGua8K.js → xd2mj56f.js} +1 -1
  136. package/dist/static/index.html +1 -1
  137. package/dist/static/jobs/index.html +1 -1
  138. package/dist/static/login/index.html +1 -1
  139. package/dist/static/queues/index.html +1 -0
  140. package/dist/static/settings/index.html +1 -1
  141. package/dist/static/vector-bundle.json +70 -71
  142. package/package.json +17 -17
  143. package/dist/static/_nuxt/B1NXg37X.js +0 -1
  144. package/dist/static/_nuxt/BHPSB5VN.js +0 -1
  145. package/dist/static/_nuxt/BQKTPMnh.js +0 -1
  146. package/dist/static/_nuxt/BZweJiQx.js +0 -1
  147. package/dist/static/_nuxt/B_RjakRk.js +0 -1
  148. package/dist/static/_nuxt/BfsupGyC.js +0 -1
  149. package/dist/static/_nuxt/BgRi2kFj.js +0 -1
  150. package/dist/static/_nuxt/BpaVnQT3.js +0 -1
  151. package/dist/static/_nuxt/C32HLL_3.js +0 -1
  152. package/dist/static/_nuxt/C3XkRFds.js +0 -1
  153. package/dist/static/_nuxt/C4rsQhBq.js +0 -1
  154. package/dist/static/_nuxt/CEMM7MyS.js +0 -100
  155. package/dist/static/_nuxt/CJCvPySI.js +0 -1
  156. package/dist/static/_nuxt/CQnAjs6t.js +0 -1
  157. package/dist/static/_nuxt/CXxZ_oTv.js +0 -1
  158. package/dist/static/_nuxt/C_zyLiGr.js +0 -1
  159. package/dist/static/_nuxt/CsTzOWPJ.js +0 -1
  160. package/dist/static/_nuxt/CtrzPVjw.js +0 -1
  161. package/dist/static/_nuxt/Cuw0Qa9p.js +0 -1
  162. package/dist/static/_nuxt/CxFDmUjN.js +0 -67
  163. package/dist/static/_nuxt/Cya8cjkR.js +0 -2
  164. package/dist/static/_nuxt/DFQG9ZD0.js +0 -1
  165. package/dist/static/_nuxt/DS8Zc0uz.js +0 -1
  166. package/dist/static/_nuxt/DZwwQ4WY.js +0 -1
  167. package/dist/static/_nuxt/DcteQ4TC.js +0 -1
  168. package/dist/static/_nuxt/DdqPXmq8.js +0 -1
  169. package/dist/static/_nuxt/DjL4J8kw.js +0 -2
  170. package/dist/static/_nuxt/F676SWHd.js +0 -1
  171. package/dist/static/_nuxt/Form.BfskSJ5D.css +0 -1
  172. package/dist/static/_nuxt/K6puNuXp.js +0 -2
  173. package/dist/static/_nuxt/VDialog.CZWf1yfq.css +0 -1
  174. package/dist/static/_nuxt/VSkeletonLoader.BXLoM9sb.css +0 -1
  175. package/dist/static/_nuxt/VTabs.buBMAvtA.css +0 -1
  176. package/dist/static/_nuxt/builds/meta/ba4cc360-829e-4272-bb1c-7391e700bb32.json +0 -1
  177. package/dist/static/_nuxt/error-404.B1_4-op0.css +0 -1
  178. package/dist/static/_nuxt/error-500.ueligmdw.css +0 -1
  179. package/dist/static/_nuxt/xkua0wtW.js +0 -1
package/CHANGELOG.md CHANGED
@@ -5,7 +5,76 @@ All notable changes to `@kinetis/vector-ui` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.12.0] - 2026-11-03
9
+
10
+ ### Added
11
+
12
+ - The queue dashboard, as the layer's own page at `/queues`: an overview
13
+ of each watched queue polled every five seconds while shown, with
14
+ Clear, confirmed by typing the queue's name; the failed jobs with their filters, cursor paging, detail,
15
+ Retry (up to 50 at once), Forget and Prune; and the job metrics over a
16
+ window of 15 minutes to 7 days, with a sparkline of attempts per
17
+ minute, summed into at most 240 points on longer windows. The menu
18
+ entry sits beside Jobs and shows only with the descriptor's
19
+ `capabilities.queues`; the failed-jobs tab, column and figures only
20
+ with `capabilities.failedJobs`. Actions follow
21
+ `GET /vector/queues/permissions`, and server text is rendered as text.
22
+ The dashboard card is the built-in widget type `queues`
23
+ (`VxWidgetQueues`), and the calls go through `useVectorQueues()`. Its
24
+ strings are the `queues` messages, in every shipped locale. It replaces
25
+ the UI the separate queue-dashboard package shipped, which is gone.
26
+ - The Queues page's Metrics tab shows only with the descriptor's
27
+ `capabilities.queueMetrics`, and nothing calls
28
+ `GET /vector/queues/metrics` without it. When the metrics turn off
29
+ while the tab is open, the page goes back to the overview. The schema
30
+ type's `capabilities` carries `queueMetrics`, and absent means false.
31
+ A `kinetis/vector` that does not report it therefore shows no Metrics
32
+ tab. The two packages release together, so pair this layer with the
33
+ matching `kinetis/vector`.
34
+ - The schema type's `capabilities` carries `queues` and `failedJobs`.
35
+ - `window.Vector.definePage()` accepts a function for `title` and
36
+ `group`, `() => t('stock.title')`, which the menu, the command palette
37
+ and the page's heading and tab title call each time they show it, so a
38
+ translated label follows a change of language without a reload.
39
+ Strings work as before; `window.Vector.version` stays 1.
40
+ - `window.Vector.vuetify` also hands extensions `VDialog`, `VTabs`,
41
+ `VTab`, `VTabsWindow`, `VTabsWindowItem`, `VTooltip`, `VMenu`,
42
+ `VList`, `VListItem`, `VExpansionPanels`, `VExpansionPanel`,
43
+ `VExpansionPanelTitle`, `VExpansionPanelText`, `VPagination`,
44
+ `VDivider` and `VSkeletonLoader`. The API is still `version: 1`.
45
+ - An application's own dashboard card types. `VectorWidgetType` admits
46
+ any extension type beside the six built-in ones, which
47
+ `VectorBuiltInWidgetType` names (`queues` among them). The card for
48
+ such a type is the one the application registers through
49
+ `window.Vector.defineWidget()` or `app.config` `vector.widgets`; a
50
+ type with neither says that no renderer is registered for it
51
+ (`dashboard.noRenderer`, in every shipped language) instead of
52
+ drawing it as a `stat`.
53
+
54
+ ### Changed
55
+
56
+ - **Breaking:** the layer reads descriptor version 5
57
+ (`DESCRIPTOR_VERSION`), the one `kinetis/vector` 0.14.0 publishes, and
58
+ refuses version 4.
59
+ - **Breaking:** Node 22 and 24 are no longer supported. `engines.node`
60
+ is now `>=26.0.0`.
61
+ - `vue-i18n` is now required at `^11.4.17`.
62
+
63
+ ### Fixed
64
+
65
+ - In the rich-text and Markdown editors, text typed right after pressing
66
+ a toolbar button (Bold, for instance) no longer goes to the button: it
67
+ was lost, or a Space toggled the format off again. The editor keeps
68
+ the focus.
69
+
70
+ ## [0.11.4] - 2026-10-30
71
+
72
+ ### Changed
73
+
74
+ - The Tiptap dependencies (`@tiptap/core`, `@tiptap/pm`, `@tiptap/vue-3`,
75
+ `@tiptap/starter-kit`, `@tiptap/markdown`, `@tiptap/suggestion` and the
76
+ image, link, mention, placeholder and table extensions) now require
77
+ `^3.32.2`.
9
78
 
10
79
  ## [0.11.3] - 2026-10-30
11
80
 
@@ -66,7 +66,10 @@ watch(results, (list) => {
66
66
  })
67
67
 
68
68
  const pages = useVectorPages()
69
- const pageItems = computed(() => Object.entries(pages.value).filter(([, p]) => (query.value ?? '').trim() === '' || p.title.toLowerCase().includes((query.value ?? '').trim().toLowerCase())))
69
+ // titles resolved here (a function one in the current language), for the filter and the list alike
70
+ const pageItems = computed(() => Object.entries(pages.value)
71
+ .map(([name, p]) => ({ name, title: pageLabel(p.title), icon: p.icon }))
72
+ .filter(p => (query.value ?? '').trim() === '' || p.title.toLowerCase().includes((query.value ?? '').trim().toLowerCase())))
70
73
  const resources = computed(() => menu.value.flatMap(g => g.items).filter(r => (query.value ?? '').trim() === '' || r.label.toLowerCase().includes((query.value ?? '').trim().toLowerCase())))
71
74
 
72
75
  function go(path: string) {
@@ -108,7 +111,7 @@ defineExpose({ open })
108
111
  <v-list-item v-for="r in resources" :key="r.slug" :title="r.label" :prepend-icon="r.icon ?? 'mdi-table'" @click="go(`/r/${r.slug}`)" />
109
112
  <template v-if="pageItems.length">
110
113
  <v-list-subheader>{{ t('shell.nav.pages') }}</v-list-subheader>
111
- <v-list-item v-for="[name, p] in pageItems" :key="name" :title="p.title" :prepend-icon="p.icon ?? 'mdi-file-document-outline'" @click="go(`/p/${name}`)" />
114
+ <v-list-item v-for="p in pageItems" :key="p.name" :title="p.title" :prepend-icon="p.icon ?? 'mdi-file-document-outline'" @click="go(`/p/${p.name}`)" />
112
115
  </template>
113
116
  <v-list-item v-if="(query ?? '').trim() && !loading && results.length === 0" :title="t('shell.palette.noMatch')" disabled />
114
117
  </v-list>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  const { t } = useVectorT()
3
- const { pending, settle } = useConfirm()
3
+ const { pending, typed, canConfirm, settle } = useConfirm()
4
4
  const open = computed({ get: () => pending.value !== null, set: (value) => { if (!value) settle(false) } })
5
5
  </script>
6
6
 
@@ -8,11 +8,27 @@ const open = computed({ get: () => pending.value !== null, set: (value) => { if
8
8
  <v-dialog v-model="open" max-width="440" persistent>
9
9
  <v-card v-if="pending">
10
10
  <v-card-title>{{ pending.title }}</v-card-title>
11
- <v-card-text v-if="pending.text">{{ pending.text }}</v-card-text>
11
+ <v-card-text v-if="pending.text || pending.requireText !== undefined">
12
+ <p v-if="pending.text">{{ pending.text }}</p>
13
+ <!-- a typed guard: what the user types is what the caller sends; Enter confirms only once it matches -->
14
+ <v-text-field
15
+ v-if="pending.requireText !== undefined"
16
+ v-model="typed"
17
+ :label="pending.requireLabel"
18
+ autocomplete="off"
19
+ spellcheck="false"
20
+ autofocus
21
+ density="compact"
22
+ hide-details
23
+ :class="{ 'mt-3': pending.text }"
24
+ data-field="confirm-text"
25
+ @keydown.enter.prevent="settle(true)"
26
+ />
27
+ </v-card-text>
12
28
  <v-card-actions>
13
29
  <v-spacer />
14
30
  <v-btn variant="text" @click="settle(false)">{{ pending.cancelText ?? t('common.cancel') }}</v-btn>
15
- <v-btn :color="pending.destructive ? 'error' : 'primary'" @click="settle(true)">{{ pending.confirmText ?? t('common.confirm') }}</v-btn>
31
+ <v-btn :color="pending.destructive ? 'error' : 'primary'" :disabled="!canConfirm" data-action="confirm" @click="settle(true)">{{ pending.confirmText ?? t('common.confirm') }}</v-btn>
16
32
  </v-card-actions>
17
33
  </v-card>
18
34
  </v-dialog>
@@ -76,7 +76,8 @@ function applyLink() {
76
76
  <v-input :model-value="model" :rules="rules" :error-messages="errorMessages" :hint="field.help ?? undefined" :persistent-hint="!!field.help" class="vx-richtext">
77
77
  <div class="vx-richtext-frame" :class="{ 'vx-richtext-frame--error': errorMessages.length > 0 }">
78
78
  <div class="text-caption text-medium-emphasis px-3 pt-2">{{ field.label }}</div>
79
- <div class="vx-richtext-toolbar d-flex flex-wrap align-center ga-1 px-2 py-1" role="toolbar" :aria-label="t('fields.richtext.toolbar', { label: field.label })">
79
+ <!-- a mouse press on a toolbar button keeps the focus in the editor (see RichText.vue) -->
80
+ <div class="vx-richtext-toolbar d-flex flex-wrap align-center ga-1 px-2 py-1" role="toolbar" :aria-label="t('fields.richtext.toolbar', { label: field.label })" @mousedown.prevent>
80
81
  <template v-if="!source">
81
82
  <v-btn v-if="on('bold')" icon="mdi-format-bold" size="small" variant="text" :active="active('bold')" :aria-label="t('fields.richtext.bold')" @click="run(e => e.chain().focus().toggleBold().run())" />
82
83
  <v-btn v-if="on('italic')" icon="mdi-format-italic" size="small" variant="text" :active="active('italic')" :aria-label="t('fields.richtext.italic')" @click="run(e => e.chain().focus().toggleItalic().run())" />
@@ -108,7 +108,9 @@ const inTable = computed(() => active('table'))
108
108
  <v-input :model-value="model" :rules="rules" :error-messages="uploadError ? [uploadError, ...errorMessages] : errorMessages" :hint="field.help ?? undefined" :persistent-hint="!!field.help" class="vx-richtext">
109
109
  <div class="vx-richtext-frame" :class="{ 'vx-richtext-frame--error': errorMessages.length > 0 }">
110
110
  <div class="text-caption text-medium-emphasis px-3 pt-2">{{ field.label }}</div>
111
- <div class="vx-richtext-toolbar d-flex flex-wrap align-center ga-1 px-2 py-1" role="toolbar" :aria-label="t('fields.richtext.toolbar', { label: field.label })">
111
+ <!-- a mouse press on a toolbar button keeps the focus in the editor: Tiptap's focus() returns it
112
+ only on the next frame, and keys typed before then would land on the button (Space toggling it again) -->
113
+ <div class="vx-richtext-toolbar d-flex flex-wrap align-center ga-1 px-2 py-1" role="toolbar" :aria-label="t('fields.richtext.toolbar', { label: field.label })" @mousedown.prevent>
112
114
  <v-btn v-if="on('bold')" icon="mdi-format-bold" size="small" variant="text" :active="active('bold')" :aria-label="t('fields.richtext.bold')" @click="run(e => e.chain().focus().toggleBold().run())" />
113
115
  <v-btn v-if="on('italic')" icon="mdi-format-italic" size="small" variant="text" :active="active('italic')" :aria-label="t('fields.richtext.italic')" @click="run(e => e.chain().focus().toggleItalic().run())" />
114
116
  <v-btn v-if="on('underline')" icon="mdi-format-underline" size="small" variant="text" :active="active('underline')" :aria-label="t('fields.richtext.underline')" @click="run(e => e.chain().focus().toggleUnderline().run())" />
@@ -0,0 +1,243 @@
1
+ <script setup lang="ts">
2
+ import type { VectorFailedJob, VectorFailedJobFilters, VectorQueuePermissions } from '#vector/app/types/vector'
3
+
4
+ // The failed list: GET /failed with its filters, newest first, paged by the
5
+ // server's opaque `nextCursor` ("load more"), with Retry (one, or up to
6
+ // QUEUE_MAX_RETRY_BATCH selected), Forget and Prune where the permissions
7
+ // allow them. A job opens in place, and the list reloads after it changed.
8
+ const props = defineProps<{ permissions: VectorQueuePermissions, queues: string[] }>()
9
+
10
+ const { t } = useVectorT()
11
+ const api = useVectorQueues()
12
+ const notifications = useVectorNotifications()
13
+ const { confirm } = useConfirm()
14
+
15
+ const emptyFilters = (): VectorFailedJobFilters => ({ queue: '', class: '', failedFrom: '', failedTo: '' })
16
+ const filters = ref<VectorFailedJobFilters>(emptyFilters())
17
+ let applied = emptyFilters()
18
+ const rows = ref<VectorFailedJob[]>([])
19
+ const nextCursor = ref<string | null>(null)
20
+ const loaded = ref(false)
21
+ const loading = ref(false)
22
+ const refused = ref(false)
23
+ const error = ref<string | null>(null)
24
+ const selected = ref(new Set<string>())
25
+ const openId = ref<string | null>(null)
26
+ const pruneDays = ref('30')
27
+ // the action running: only its own button shows as loading, and no second one starts meanwhile
28
+ const acting = ref<'retry' | 'forget' | 'prune' | null>(null)
29
+ // a date field the browser could not read: a partly typed date keeps its value '' and fires no input event,
30
+ // so each input's own validity is read whenever it matters — on input, change and blur, and at Apply
31
+ const badInput = ref({ failedFrom: false, failedTo: false })
32
+ const filterRow = ref<HTMLElement | null>(null)
33
+ let request = 0
34
+
35
+ /** The first page for the applied filters, or (more) the page after the last one shown. */
36
+ async function load(more = false) {
37
+ const id = ++request
38
+ loading.value = true
39
+ try {
40
+ const page = await api.failed(applied, more ? nextCursor.value : null)
41
+ if (id !== request) return
42
+ rows.value = more ? [...rows.value, ...page.data] : page.data
43
+ nextCursor.value = page.hasMore ? page.nextCursor : null
44
+ error.value = null
45
+ loaded.value = true
46
+ if (!more) selected.value = new Set()
47
+ } catch (caught) {
48
+ if (id !== request) return
49
+ if (queueAccessRefused(caught)) refused.value = true
50
+ else error.value = describeQueueError(caught)
51
+ } finally {
52
+ if (id === request) loading.value = false
53
+ }
54
+ }
55
+
56
+ onMounted(() => load())
57
+
58
+ // an unreadable date is an error on its field, not a filter silently dropped
59
+ const dateError = (field: 'failedFrom' | 'failedTo') => badInput.value[field] || !queueLocalDateValid(filters.value[field])
60
+ ? t('queues.failed.filters.invalidDate')
61
+ : ''
62
+ const fromError = computed(() => dateError('failedFrom'))
63
+ const toError = computed(() => dateError('failedTo'))
64
+ const filtersValid = computed(() => fromError.value === '' && toError.value === '')
65
+
66
+ const dateInput = (field: 'failedFrom' | 'failedTo') => filterRow.value?.querySelector<HTMLInputElement>(`[data-filter="${field}"] input`) ?? null
67
+
68
+ /** Reads both date inputs' validity, as the browser holds it rather than as their values say. */
69
+ function recheckDates() {
70
+ badInput.value = {
71
+ failedFrom: dateInput('failedFrom')?.validity?.badInput === true,
72
+ failedTo: dateInput('failedTo')?.validity?.badInput === true,
73
+ }
74
+ }
75
+
76
+ function apply() {
77
+ recheckDates()
78
+ if (!filtersValid.value) return
79
+ applied = { ...filters.value }
80
+ void load()
81
+ }
82
+
83
+ function reset() {
84
+ filters.value = emptyFilters()
85
+ // a partly typed date's value is '' already, so the model change would not clear its text: clear the input itself
86
+ for (const field of ['failedFrom', 'failedTo'] as const) {
87
+ const input = dateInput(field)
88
+ if (input) input.value = ''
89
+ }
90
+ apply()
91
+ }
92
+
93
+ function toggle(id: string, on: boolean | null) {
94
+ const next = new Set(selected.value)
95
+ if (on && next.size < QUEUE_MAX_RETRY_BATCH) next.add(id)
96
+ else next.delete(id)
97
+ selected.value = next
98
+ }
99
+
100
+ /** Asks, then runs `action` once — a second click while one runs does nothing — and reloads the list either way. */
101
+ async function guarded(kind: 'retry' | 'forget' | 'prune', title: string, text: string, action: () => Promise<void>) {
102
+ if (acting.value !== null) return
103
+ if (!await confirm({ title, text, confirmText: t('queues.actions.confirm'), cancelText: t('queues.actions.cancel'), destructive: true })) return
104
+ if (acting.value !== null) return
105
+ acting.value = kind
106
+ try {
107
+ await action()
108
+ } catch (caught) {
109
+ notifications.error(describeQueueError(caught))
110
+ } finally {
111
+ acting.value = null
112
+ }
113
+ await load()
114
+ }
115
+
116
+ function retry(ids: string[]) {
117
+ void guarded('retry', t('queues.failed.retryTitle', { count: ids.length }), t('queues.failed.retryText'), async () => {
118
+ const summary = queueRetrySummary(await api.retry(ids))
119
+ if (summary.ok) notifications.success(summary.text)
120
+ else notifications.error(summary.text)
121
+ })
122
+ }
123
+
124
+ function forget(id: string) {
125
+ void guarded('forget', t('queues.failed.forgetTitle'), t('queues.failed.forgetText'), async () => {
126
+ await api.forget(id)
127
+ notifications.success(t('queues.failed.forgotten'))
128
+ })
129
+ }
130
+
131
+ const days = computed(() => queuePruneDays(pruneDays.value))
132
+
133
+ function prune() {
134
+ const value = days.value
135
+ if (value === null) return
136
+ void guarded('prune', t('queues.failed.pruneTitle', { days: value }), t('queues.failed.pruneText'), async () => {
137
+ notifications.success(t('queues.failed.pruned', { count: await api.prune(value) }))
138
+ })
139
+ }
140
+
141
+ const queueItems = computed(() => [{ title: t('queues.failed.filters.allQueues'), value: '' }, ...props.queues.map(name => ({ title: name, value: name }))])
142
+ const atLimit = computed(() => selected.value.size >= QUEUE_MAX_RETRY_BATCH)
143
+ </script>
144
+
145
+ <template>
146
+ <v-alert v-if="refused" type="warning" variant="tonal" :text="t('queues.noAccess')" data-state="no-access" />
147
+ <VxQueuesFailedDetail v-else-if="openId !== null" :id="openId" :key="openId" :permissions="permissions" @back="openId = null" @changed="load()" />
148
+ <div v-else>
149
+ <div ref="filterRow" class="d-flex flex-wrap align-center ga-2 mb-3">
150
+ <v-select v-model="filters.queue" :items="queueItems" :label="t('queues.failed.filters.queue')" density="compact" hide-details style="max-width: 14rem" />
151
+ <v-text-field v-model="filters.class" :label="t('queues.failed.filters.class')" density="compact" hide-details style="max-width: 22rem" @keydown.enter="apply" />
152
+ <v-text-field
153
+ v-model="filters.failedFrom"
154
+ type="datetime-local"
155
+ step="1"
156
+ :label="t('queues.failed.filters.from')"
157
+ :error-messages="fromError"
158
+ density="compact"
159
+ hide-details="auto"
160
+ style="max-width: 14rem"
161
+ data-filter="failedFrom"
162
+ @input="recheckDates"
163
+ @change="recheckDates"
164
+ @blur="recheckDates"
165
+ />
166
+ <v-text-field
167
+ v-model="filters.failedTo"
168
+ type="datetime-local"
169
+ step="1"
170
+ :label="t('queues.failed.filters.to')"
171
+ :error-messages="toError"
172
+ density="compact"
173
+ hide-details="auto"
174
+ style="max-width: 14rem"
175
+ data-filter="failedTo"
176
+ @input="recheckDates"
177
+ @change="recheckDates"
178
+ @blur="recheckDates"
179
+ />
180
+ <v-btn variant="tonal" color="primary" :disabled="!filtersValid" data-action="apply" @click="apply">{{ t('queues.failed.filters.apply') }}</v-btn>
181
+ <v-btn variant="text" @click="reset">{{ t('queues.failed.filters.reset') }}</v-btn>
182
+ </div>
183
+ <div v-if="permissions.retry || permissions.prune" class="d-flex flex-wrap align-center ga-2 mb-3">
184
+ <template v-if="permissions.retry">
185
+ <v-btn variant="tonal" color="primary" prepend-icon="mdi-replay" :disabled="selected.size === 0" :loading="acting === 'retry'" data-action="retry-selected" @click="retry([...selected])">
186
+ {{ t('queues.failed.retrySelected', { count: selected.size }) }}
187
+ </v-btn>
188
+ <span v-if="atLimit" class="text-caption text-medium-emphasis">{{ t('queues.failed.retryLimit', { max: QUEUE_MAX_RETRY_BATCH }) }}</span>
189
+ </template>
190
+ <template v-if="permissions.prune">
191
+ <v-spacer />
192
+ <v-text-field v-model="pruneDays" type="number" :min="1" :max="QUEUE_MAX_PRUNE_DAYS" :label="t('queues.failed.pruneDays')" density="compact" hide-details style="max-width: 11rem" />
193
+ <v-btn variant="tonal" color="error" prepend-icon="mdi-broom" :disabled="days === null" :loading="acting === 'prune'" data-action="prune" @click="prune">{{ t('queues.failed.prune') }}</v-btn>
194
+ </template>
195
+ </div>
196
+ <v-alert v-if="error" type="error" variant="tonal" density="compact" class="mb-3" :text="error" />
197
+ <v-progress-linear v-if="!loaded" indeterminate color="primary" :aria-label="t('queues.loading')" />
198
+ <p v-else-if="rows.length === 0" class="text-medium-emphasis">{{ t('queues.failed.empty') }}</p>
199
+ <v-table v-else hover density="compact">
200
+ <thead>
201
+ <tr>
202
+ <th v-if="permissions.retry" scope="col"><span class="d-sr-only">{{ t('queues.failed.selection') }}</span></th>
203
+ <th scope="col" class="text-start">{{ t('queues.failed.class') }}</th>
204
+ <th scope="col" class="text-start">{{ t('queues.failed.queue') }}</th>
205
+ <th scope="col" class="text-start">{{ t('queues.failed.exception') }}</th>
206
+ <th scope="col" class="text-end">{{ t('queues.failed.attempts') }}</th>
207
+ <th scope="col" class="text-start">{{ t('queues.failed.failedAt') }}</th>
208
+ <th scope="col" class="text-end"><span class="d-sr-only">{{ t('common.actions') }}</span></th>
209
+ </tr>
210
+ </thead>
211
+ <tbody>
212
+ <tr v-for="row in rows" :key="row.id" :data-failed-job="row.id">
213
+ <td v-if="permissions.retry">
214
+ <v-checkbox
215
+ :model-value="selected.has(row.id)"
216
+ :disabled="!selected.has(row.id) && atLimit"
217
+ density="compact"
218
+ hide-details
219
+ :aria-label="t('queues.failed.select', { id: row.id })"
220
+ @update:model-value="on => toggle(row.id, on)"
221
+ />
222
+ </td>
223
+ <td style="word-break: break-all">{{ row.class }}</td>
224
+ <td>{{ row.queue }}</td>
225
+ <td>
226
+ <div class="text-caption">{{ row.exception.class }}</div>
227
+ <div class="text-medium-emphasis" style="max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">{{ row.exception.message }}</div>
228
+ </td>
229
+ <td class="text-end" style="font-variant-numeric: tabular-nums">{{ queueAttempts(row) }}</td>
230
+ <td>{{ queueTime(row.failedAt) }}</td>
231
+ <td class="text-end text-no-wrap">
232
+ <v-btn size="small" variant="text" data-action="open" @click="openId = row.id">{{ t('queues.failed.open') }}</v-btn>
233
+ <v-btn v-if="permissions.retry" size="small" variant="text" color="primary" data-action="retry" @click="retry([row.id])">{{ t('queues.failed.retry') }}</v-btn>
234
+ <v-btn v-if="permissions.forget" size="small" variant="text" color="error" data-action="forget" @click="forget(row.id)">{{ t('queues.failed.forget') }}</v-btn>
235
+ </td>
236
+ </tr>
237
+ </tbody>
238
+ </v-table>
239
+ <div v-if="nextCursor !== null" class="d-flex justify-center mt-3">
240
+ <v-btn variant="tonal" :loading="loading" data-action="load-more" @click="load(true)">{{ t('queues.failed.loadMore') }}</v-btn>
241
+ </div>
242
+ </div>
243
+ </template>
@@ -0,0 +1,106 @@
1
+ <script setup lang="ts">
2
+ import type { VectorFailedJob, VectorQueuePermissions } from '#vector/app/types/vector'
3
+
4
+ // One failed job: GET /failed/{id}, its exception, message, trace (always
5
+ // null today) and redacted arguments, every one as text — interpolated,
6
+ // never v-html — and Retry and Forget where the permissions allow them.
7
+ const props = defineProps<{ id: string, permissions: VectorQueuePermissions }>()
8
+ const emit = defineEmits<{ back: [], changed: [] }>()
9
+
10
+ const { t } = useVectorT()
11
+ const queues = useVectorQueues()
12
+ const notifications = useVectorNotifications()
13
+ const { confirm } = useConfirm()
14
+
15
+ const job = ref<VectorFailedJob | null>(null)
16
+ const refused = ref(false)
17
+ const error = ref<string | null>(null)
18
+ // the action running: only its own button shows as loading, and no second one starts meanwhile
19
+ const acting = ref<'retry' | 'forget' | null>(null)
20
+
21
+ onMounted(async () => {
22
+ try {
23
+ job.value = await queues.failedJob(props.id)
24
+ } catch (caught) {
25
+ if (queueErrorStatus(caught) === 403) refused.value = true
26
+ else error.value = describeQueueError(caught)
27
+ }
28
+ })
29
+
30
+ async function ask(title: string, text: string): Promise<boolean> {
31
+ if (acting.value !== null) return false
32
+ const confirmed = await confirm({ title, text, confirmText: t('queues.actions.confirm'), cancelText: t('queues.actions.cancel'), destructive: true })
33
+ return confirmed && acting.value === null
34
+ }
35
+
36
+ async function retry() {
37
+ if (!await ask(t('queues.failed.retryTitle', { count: 1 }), t('queues.failed.retryText'))) return
38
+ acting.value = 'retry'
39
+ try {
40
+ const results = await queues.retry([props.id])
41
+ const summary = queueRetrySummary(results)
42
+ if (summary.ok) notifications.success(summary.text)
43
+ else notifications.error(summary.text)
44
+ emit('changed')
45
+ if (results.every(result => result.status !== 'failed')) emit('back')
46
+ } catch (caught) {
47
+ notifications.error(describeQueueError(caught))
48
+ } finally {
49
+ acting.value = null
50
+ }
51
+ }
52
+
53
+ async function forget() {
54
+ if (!await ask(t('queues.failed.forgetTitle'), t('queues.failed.forgetText'))) return
55
+ acting.value = 'forget'
56
+ try {
57
+ await queues.forget(props.id)
58
+ notifications.success(t('queues.failed.forgotten'))
59
+ emit('changed')
60
+ emit('back')
61
+ } catch (caught) {
62
+ notifications.error(describeQueueError(caught))
63
+ } finally {
64
+ acting.value = null
65
+ }
66
+ }
67
+
68
+ const preStyle = 'white-space: pre-wrap; word-break: break-word; max-height: 24rem; overflow: auto'
69
+ </script>
70
+
71
+ <template>
72
+ <div>
73
+ <div class="d-flex align-center ga-2 flex-wrap mb-3">
74
+ <v-btn variant="text" prepend-icon="mdi-arrow-left" @click="emit('back')">{{ t('queues.actions.back') }}</v-btn>
75
+ <v-spacer />
76
+ <template v-if="job">
77
+ <v-btn v-if="permissions.retry" variant="tonal" color="primary" prepend-icon="mdi-replay" :loading="acting === 'retry'" data-action="retry" @click="retry">{{ t('queues.failed.retry') }}</v-btn>
78
+ <v-btn v-if="permissions.forget" variant="tonal" color="error" prepend-icon="mdi-delete-outline" :loading="acting === 'forget'" data-action="forget" @click="forget">{{ t('queues.failed.forget') }}</v-btn>
79
+ </template>
80
+ </div>
81
+ <v-alert v-if="refused" type="warning" variant="tonal" :text="t('queues.noAccess')" data-state="no-access" />
82
+ <v-alert v-else-if="error" type="error" variant="tonal" :text="error" />
83
+ <v-progress-linear v-else-if="job === null" indeterminate color="primary" :aria-label="t('queues.loading')" />
84
+ <div v-else>
85
+ <h2 class="text-h6 mb-3">{{ t('queues.failed.detail.title', { id: job.id }) }}</h2>
86
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.class') }}</div><div>{{ job.class }}</div></div>
87
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.queue') }}</div><div>{{ job.queue }}</div></div>
88
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.detail.connection') }}</div><div>{{ job.connection ?? t('queues.none') }}</div></div>
89
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.attempts') }}</div><div>{{ queueAttempts(job) }}</div></div>
90
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.failedAt') }}</div><div>{{ queueTime(job.failedAt) }}</div></div>
91
+ <div class="mb-2"><div class="text-caption text-medium-emphasis">{{ t('queues.failed.exception') }}</div><div>{{ job.exception.class }}</div></div>
92
+ <div class="mb-3">
93
+ <div class="text-caption text-medium-emphasis mb-1">{{ t('queues.failed.detail.message') }}</div>
94
+ <pre class="pa-2 rounded bg-surface-variant" :style="preStyle" data-field="message">{{ job.exception.message }}</pre>
95
+ </div>
96
+ <div class="mb-3">
97
+ <div class="text-caption text-medium-emphasis mb-1">{{ t('queues.failed.detail.trace') }}</div>
98
+ <pre class="pa-2 rounded bg-surface-variant" :style="preStyle" data-field="trace">{{ job.exception.trace ?? t('queues.failed.detail.noTrace') }}</pre>
99
+ </div>
100
+ <div class="mb-3">
101
+ <div class="text-caption text-medium-emphasis mb-1">{{ t('queues.failed.detail.args') }}</div>
102
+ <pre class="pa-2 rounded bg-surface-variant" :style="preStyle" data-field="args">{{ JSON.stringify(job.args, null, 2) }}</pre>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </template>
@@ -0,0 +1,118 @@
1
+ <script setup lang="ts">
2
+ import type { VectorQueueMetrics } from '#vector/app/types/vector'
3
+
4
+ // The job metrics: GET /metrics for a watched queue (or all) over a window
5
+ // of at most 7 days, the last hour by default — the window's totals,
6
+ // attempts per minute as an inline SVG sparkline (no chart library), and
7
+ // the totals per queue and per job class.
8
+ const props = defineProps<{ queues: string[] }>()
9
+
10
+ const { t } = useVectorT()
11
+ const api = useVectorQueues()
12
+
13
+ const queue = ref('')
14
+ const minutes = ref<number>(QUEUE_DEFAULT_WINDOW)
15
+ const metrics = ref<VectorQueueMetrics | null>(null)
16
+ const refused = ref(false)
17
+ const error = ref<string | null>(null)
18
+ let request = 0
19
+
20
+ async function load() {
21
+ const id = ++request
22
+ try {
23
+ const data = await api.metrics(queue.value, minutes.value)
24
+ if (id !== request) return
25
+ metrics.value = data
26
+ error.value = null
27
+ } catch (caught) {
28
+ if (id !== request) return
29
+ if (queueAccessRefused(caught)) refused.value = true
30
+ else error.value = describeQueueError(caught)
31
+ }
32
+ }
33
+
34
+ onMounted(load)
35
+ watch([queue, minutes], () => void load())
36
+
37
+ const totals = computed(() => queueMetricsTotals(metrics.value))
38
+ const spark = computed(() => queueSparkline(metrics.value?.buckets ?? []))
39
+ // the chart's own words for a screen reader: which window, which queue, how many attempts in all
40
+ const sparkLabel = computed(() => t('queues.metrics.throughputLabel', {
41
+ window: t(`queues.metrics.windows.m${minutes.value}`),
42
+ queue: queue.value === '' ? t('queues.metrics.allQueues') : queue.value,
43
+ total: queueNumber(totals.value.succeeded + totals.value.released + totals.value.failed),
44
+ }))
45
+ const queueItems = computed(() => [{ title: t('queues.metrics.allQueues'), value: '' }, ...props.queues.map(name => ({ title: name, value: name }))])
46
+ const windowItems = computed(() => QUEUE_WINDOWS.map(value => ({ title: t(`queues.metrics.windows.m${value}`), value })))
47
+ const stats = computed(() => [
48
+ { label: t('queues.metrics.succeeded'), value: queueNumber(totals.value.succeeded) },
49
+ { label: t('queues.metrics.released'), value: queueNumber(totals.value.released) },
50
+ { label: t('queues.metrics.failed'), value: queueNumber(totals.value.failed) },
51
+ { label: t('queues.metrics.failureRate'), value: queueRate(totals.value.failureRate) },
52
+ { label: t('queues.metrics.averageDuration'), value: queueMs(totals.value.averageDurationMs) },
53
+ { label: t('queues.metrics.maxDuration'), value: queueMs(totals.value.maxDurationMs) },
54
+ ])
55
+ const tables = computed(() => metrics.value === null ? [] : [
56
+ { label: t('queues.metrics.byQueue'), heading: t('queues.metrics.queue'), rows: metrics.value.queues.map(row => ({ ...row, name: row.queue })) },
57
+ { label: t('queues.metrics.byClass'), heading: t('queues.metrics.class'), rows: metrics.value.classes.map(row => ({ ...row, name: row.class })) },
58
+ ])
59
+ </script>
60
+
61
+ <template>
62
+ <v-alert v-if="refused" type="warning" variant="tonal" :text="t('queues.noAccess')" data-state="no-access" />
63
+ <div v-else>
64
+ <div class="d-flex flex-wrap align-center ga-2 mb-3">
65
+ <v-select v-model="queue" :items="queueItems" :label="t('queues.metrics.queue')" density="compact" hide-details style="max-width: 14rem" />
66
+ <v-select v-model="minutes" :items="windowItems" :label="t('queues.metrics.window')" density="compact" hide-details style="max-width: 14rem" />
67
+ <v-btn variant="text" prepend-icon="mdi-refresh" @click="load">{{ t('queues.actions.refresh') }}</v-btn>
68
+ </div>
69
+ <v-alert v-if="error" type="error" variant="tonal" density="compact" class="mb-3" :text="error" />
70
+ <v-progress-linear v-if="metrics === null && !error" indeterminate color="primary" :aria-label="t('queues.loading')" />
71
+ <div v-else-if="metrics !== null">
72
+ <div class="d-flex flex-wrap ga-3 mb-4">
73
+ <v-card v-for="stat in stats" :key="stat.label" variant="tonal" class="pa-3" style="min-width: 9rem">
74
+ <div class="text-caption text-medium-emphasis">{{ stat.label }}</div>
75
+ <div class="text-h6" style="font-variant-numeric: tabular-nums">{{ stat.value }}</div>
76
+ </v-card>
77
+ </div>
78
+ <div class="mb-4 text-primary">
79
+ <div class="text-caption text-medium-emphasis">{{ t('queues.metrics.throughput') }}</div>
80
+ <svg :viewBox="`0 0 ${spark.width} 40`" preserveAspectRatio="none" width="100%" height="48" role="img" :aria-label="sparkLabel" data-chart="throughput">
81
+ <polyline :points="spark.points" fill="none" stroke="currentColor" stroke-width="1.5" vector-effect="non-scaling-stroke" />
82
+ </svg>
83
+ </div>
84
+ <p v-if="metrics.queues.length === 0" class="text-medium-emphasis">{{ t('queues.metrics.empty') }}</p>
85
+ <template v-else>
86
+ <div v-for="table in tables" :key="table.label" class="mb-4">
87
+ <h3 class="text-subtitle-1 mb-1">{{ table.label }}</h3>
88
+ <v-table density="compact" hover>
89
+ <thead>
90
+ <tr>
91
+ <th scope="col" class="text-start">{{ table.heading }}</th>
92
+ <th scope="col" class="text-end">{{ t('queues.metrics.succeeded') }}</th>
93
+ <th scope="col" class="text-end">{{ t('queues.metrics.released') }}</th>
94
+ <th scope="col" class="text-end">{{ t('queues.metrics.failed') }}</th>
95
+ <th scope="col" class="text-end">{{ t('queues.metrics.failureRate') }}</th>
96
+ <th scope="col" class="text-end">{{ t('queues.metrics.averageDuration') }}</th>
97
+ <th scope="col" class="text-end">{{ t('queues.metrics.maxDuration') }}</th>
98
+ <th scope="col" class="text-start">{{ t('queues.metrics.lastProcessed') }}</th>
99
+ </tr>
100
+ </thead>
101
+ <tbody style="font-variant-numeric: tabular-nums">
102
+ <tr v-for="row in table.rows" :key="row.name">
103
+ <td style="word-break: break-all">{{ row.name }}</td>
104
+ <td class="text-end">{{ queueNumber(row.succeeded) }}</td>
105
+ <td class="text-end">{{ queueNumber(row.released) }}</td>
106
+ <td class="text-end">{{ queueNumber(row.failed) }}</td>
107
+ <td class="text-end">{{ queueRate(row.failureRate) }}</td>
108
+ <td class="text-end">{{ queueMs(row.averageDurationMs) }}</td>
109
+ <td class="text-end">{{ queueMs(row.maxDurationMs) }}</td>
110
+ <td>{{ queueTime(row.lastProcessedAt) }}</td>
111
+ </tr>
112
+ </tbody>
113
+ </v-table>
114
+ </div>
115
+ </template>
116
+ </div>
117
+ </div>
118
+ </template>