@nvent-addon/app 0.4.5 → 0.5.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 (153) hide show
  1. package/dist/module.d.mts +19 -1
  2. package/dist/module.mjs +20 -8
  3. package/dist/runtime/app/components/{nhealth/component-router.d.vue.ts → ComponentRouter.d.vue.ts} +1 -5
  4. package/dist/runtime/app/components/{nhealth/component-router.vue.d.ts → ComponentRouter.vue.d.ts} +1 -5
  5. package/dist/runtime/app/components/{nhealth/component-shell.d.vue.ts → ComponentShell.d.vue.ts} +4 -9
  6. package/dist/runtime/app/components/ComponentShell.vue +87 -0
  7. package/dist/runtime/app/components/{nhealth/component-shell.vue.d.ts → ComponentShell.vue.d.ts} +4 -9
  8. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +1 -6
  9. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +1 -6
  10. package/dist/runtime/app/components/ListItem.d.vue.ts +3 -6
  11. package/dist/runtime/app/components/ListItem.vue.d.ts +3 -6
  12. package/dist/runtime/app/components/LiveIndicator.d.vue.ts +7 -0
  13. package/dist/runtime/app/components/LiveIndicator.vue +30 -0
  14. package/dist/runtime/app/components/LiveIndicator.vue.d.ts +7 -0
  15. package/dist/runtime/app/components/{QueueConfigDetails.d.vue.ts → QueueConfiguration.d.vue.ts} +1 -10
  16. package/dist/runtime/app/components/QueueConfiguration.vue +387 -0
  17. package/dist/runtime/app/components/{QueueConfigDetails.vue.d.ts → QueueConfiguration.vue.d.ts} +1 -10
  18. package/dist/runtime/app/components/StatCard.d.vue.ts +9 -0
  19. package/dist/runtime/app/components/StatCard.vue +57 -0
  20. package/dist/runtime/app/components/StatCard.vue.d.ts +9 -0
  21. package/dist/runtime/app/components/TimelineList.vue +67 -0
  22. package/dist/runtime/app/components/flow/AwaitNode.d.vue.ts +18 -0
  23. package/dist/runtime/app/components/flow/AwaitNode.vue +91 -0
  24. package/dist/runtime/app/components/flow/AwaitNode.vue.d.ts +18 -0
  25. package/dist/runtime/app/components/{FlowDiagram.d.vue.ts → flow/Diagram.d.vue.ts} +12 -1
  26. package/dist/runtime/app/components/{FlowDiagram.vue → flow/Diagram.vue} +92 -11
  27. package/dist/runtime/app/components/{FlowDiagram.vue.d.ts → flow/Diagram.vue.d.ts} +12 -1
  28. package/dist/runtime/app/components/{FlowRunOverview.d.vue.ts → flow/RunOverview.d.vue.ts} +3 -0
  29. package/dist/runtime/app/components/{FlowRunOverview.vue → flow/RunOverview.vue} +94 -8
  30. package/dist/runtime/app/components/{FlowRunOverview.vue.d.ts → flow/RunOverview.vue.d.ts} +3 -0
  31. package/dist/runtime/app/components/{FlowRunStatusBadge.d.vue.ts → flow/RunStatusBadge.d.vue.ts} +2 -8
  32. package/dist/runtime/app/components/{FlowRunStatusBadge.vue → flow/RunStatusBadge.vue} +8 -1
  33. package/dist/runtime/app/components/{FlowRunStatusBadge.vue.d.ts → flow/RunStatusBadge.vue.d.ts} +2 -8
  34. package/dist/runtime/app/components/{FlowRunTimeline.vue → flow/RunTimeline.vue} +1 -1
  35. package/dist/runtime/app/components/{FlowStepSelector.d.vue.ts → flow/StepSelector.d.vue.ts} +1 -0
  36. package/dist/runtime/app/components/flow/StepSelector.vue +553 -0
  37. package/dist/runtime/app/components/{FlowStepSelector.vue.d.ts → flow/StepSelector.vue.d.ts} +1 -0
  38. package/dist/runtime/app/components/trigger/BasicInfoCard.d.vue.ts +33 -0
  39. package/dist/runtime/app/components/trigger/BasicInfoCard.vue +168 -0
  40. package/dist/runtime/app/components/trigger/BasicInfoCard.vue.d.ts +33 -0
  41. package/dist/runtime/app/components/{FlowSchedulesList.d.vue.ts → trigger/DangerZone.d.vue.ts} +4 -6
  42. package/dist/runtime/app/components/trigger/DangerZone.vue +46 -0
  43. package/dist/runtime/app/components/{FlowSchedulesList.vue.d.ts → trigger/DangerZone.vue.d.ts} +4 -6
  44. package/dist/runtime/app/components/trigger/EditHeader.d.vue.ts +15 -0
  45. package/dist/runtime/app/components/trigger/EditHeader.vue +55 -0
  46. package/dist/runtime/app/components/trigger/EditHeader.vue.d.ts +15 -0
  47. package/dist/runtime/app/components/trigger/EventConfig.d.vue.ts +24 -0
  48. package/dist/runtime/app/components/trigger/EventConfig.vue +68 -0
  49. package/dist/runtime/app/components/trigger/EventConfig.vue.d.ts +24 -0
  50. package/dist/runtime/app/components/trigger/FlowSubscriptions.d.vue.ts +14 -0
  51. package/dist/runtime/app/components/trigger/FlowSubscriptions.vue +128 -0
  52. package/dist/runtime/app/components/trigger/FlowSubscriptions.vue.d.ts +14 -0
  53. package/dist/runtime/app/components/trigger/ScheduleConfig.d.vue.ts +27 -0
  54. package/dist/runtime/app/components/trigger/ScheduleConfig.vue +375 -0
  55. package/dist/runtime/app/components/trigger/ScheduleConfig.vue.d.ts +27 -0
  56. package/dist/runtime/app/components/{FlowScheduleDialog.d.vue.ts → trigger/StatusConfig.d.vue.ts} +6 -6
  57. package/dist/runtime/app/components/trigger/StatusConfig.vue +78 -0
  58. package/dist/runtime/app/components/{FlowScheduleDialog.vue.d.ts → trigger/StatusConfig.vue.d.ts} +6 -6
  59. package/dist/runtime/app/components/trigger/WebhookConfig.d.vue.ts +30 -0
  60. package/dist/runtime/app/components/trigger/WebhookConfig.vue +97 -0
  61. package/dist/runtime/app/components/trigger/WebhookConfig.vue.d.ts +30 -0
  62. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +5 -0
  63. package/dist/runtime/app/composables/useAnalyzedFlows.js +15 -1
  64. package/dist/runtime/app/composables/useComponentRouter.d.ts +8 -0
  65. package/dist/runtime/app/composables/useComponentRouter.js +10 -2
  66. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +1 -1
  67. package/dist/runtime/app/composables/useFlowState.js +65 -0
  68. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +11 -2
  69. package/dist/runtime/app/composables/useFlowWebSocket.js +181 -65
  70. package/dist/runtime/app/composables/useQueueJobs.d.ts +12 -1
  71. package/dist/runtime/app/composables/useQueueJobs.js +13 -7
  72. package/dist/runtime/app/composables/useTrigger.d.ts +137 -0
  73. package/dist/runtime/app/composables/useTrigger.js +116 -0
  74. package/dist/runtime/app/composables/useTriggerWebSocket.d.ts +35 -0
  75. package/dist/runtime/app/composables/useTriggerWebSocket.js +333 -0
  76. package/dist/runtime/app/pages/dashboard.d.vue.ts +3 -0
  77. package/dist/runtime/app/pages/dashboard.vue +738 -0
  78. package/dist/runtime/app/pages/dashboard.vue.d.ts +3 -0
  79. package/dist/runtime/app/pages/flows/[name].d.vue.ts +3 -0
  80. package/dist/runtime/app/pages/flows/[name].vue +680 -0
  81. package/dist/runtime/app/pages/flows/[name].vue.d.ts +3 -0
  82. package/dist/runtime/app/pages/flows/index.vue +321 -620
  83. package/dist/runtime/app/pages/index.vue +39 -9
  84. package/dist/runtime/app/pages/queues/index.vue +202 -194
  85. package/dist/runtime/app/pages/queues/jobs.vue +534 -207
  86. package/dist/runtime/app/pages/settings/scheduler.d.vue.ts +3 -0
  87. package/dist/runtime/app/pages/settings/scheduler.vue +310 -0
  88. package/dist/runtime/app/pages/settings/scheduler.vue.d.ts +3 -0
  89. package/dist/runtime/app/pages/triggers/[name]/edit.d.vue.ts +3 -0
  90. package/dist/runtime/app/pages/triggers/[name]/edit.vue +429 -0
  91. package/dist/runtime/app/pages/triggers/[name]/edit.vue.d.ts +3 -0
  92. package/dist/runtime/app/pages/triggers/[name].d.vue.ts +3 -0
  93. package/dist/runtime/app/pages/triggers/[name].vue +898 -0
  94. package/dist/runtime/app/pages/triggers/[name].vue.d.ts +3 -0
  95. package/dist/runtime/app/pages/triggers/index.d.vue.ts +3 -0
  96. package/dist/runtime/app/pages/triggers/index.vue +528 -0
  97. package/dist/runtime/app/pages/triggers/index.vue.d.ts +3 -0
  98. package/dist/runtime/app/pages/triggers/new.d.vue.ts +3 -0
  99. package/dist/runtime/app/pages/triggers/new.vue +610 -0
  100. package/dist/runtime/app/pages/triggers/new.vue.d.ts +3 -0
  101. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +10 -0
  102. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +49 -0
  103. package/dist/runtime/server/api/_flows/[name]/runs/[runId]/cancel.post.d.ts +2 -0
  104. package/dist/runtime/server/api/_flows/[name]/runs/[runId]/cancel.post.js +21 -0
  105. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +17 -0
  106. package/dist/runtime/server/api/_flows/[name]/runs.get.js +64 -0
  107. package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +2 -0
  108. package/dist/runtime/server/api/_flows/[name]/start.post.js +9 -0
  109. package/dist/runtime/server/api/_flows/index.get.d.ts +7 -0
  110. package/dist/runtime/server/api/_flows/index.get.js +5 -0
  111. package/dist/runtime/server/api/_flows/recent-runs.get.d.ts +15 -0
  112. package/dist/runtime/server/api/_flows/recent-runs.get.js +67 -0
  113. package/dist/runtime/server/api/_flows/ws.d.ts +80 -0
  114. package/dist/runtime/server/api/_flows/ws.js +309 -0
  115. package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +2 -0
  116. package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +14 -0
  117. package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +2 -0
  118. package/dist/runtime/server/api/_queues/[name]/job/index.get.js +39 -0
  119. package/dist/runtime/server/api/_queues/index.get.d.ts +2 -0
  120. package/dist/runtime/server/api/_queues/index.get.js +106 -0
  121. package/dist/runtime/server/api/_queues/ws.d.ts +48 -0
  122. package/dist/runtime/server/api/_queues/ws.js +215 -0
  123. package/dist/runtime/server/api/_scheduler/jobs.get.d.ts +19 -0
  124. package/dist/runtime/server/api/_scheduler/jobs.get.js +36 -0
  125. package/dist/runtime/server/api/_triggers/[name]/events.get.d.ts +6 -0
  126. package/dist/runtime/server/api/_triggers/[name]/events.get.js +43 -0
  127. package/dist/runtime/server/api/_triggers/[name]/index.get.d.ts +6 -0
  128. package/dist/runtime/server/api/_triggers/[name]/index.get.js +76 -0
  129. package/dist/runtime/server/api/_triggers/[name].delete.d.ts +7 -0
  130. package/dist/runtime/server/api/_triggers/[name].delete.js +37 -0
  131. package/dist/runtime/server/api/_triggers/[name].patch.d.ts +7 -0
  132. package/dist/runtime/server/api/_triggers/[name].patch.js +117 -0
  133. package/dist/runtime/server/api/_triggers/index.get.d.ts +6 -0
  134. package/dist/runtime/server/api/_triggers/index.get.js +44 -0
  135. package/dist/runtime/server/api/_triggers/index.post.d.ts +7 -0
  136. package/dist/runtime/server/api/_triggers/index.post.js +124 -0
  137. package/dist/runtime/server/api/_triggers/stats.get.d.ts +6 -0
  138. package/dist/runtime/server/api/_triggers/stats.get.js +41 -0
  139. package/dist/runtime/server/api/_triggers/ws.d.ts +74 -0
  140. package/dist/runtime/server/api/_triggers/ws.js +315 -0
  141. package/dist/runtime/server/tsconfig.json +7 -0
  142. package/package.json +8 -8
  143. package/dist/runtime/app/components/FlowScheduleDialog.vue +0 -226
  144. package/dist/runtime/app/components/FlowSchedulesList.vue +0 -99
  145. package/dist/runtime/app/components/FlowStepSelector.vue +0 -238
  146. package/dist/runtime/app/components/QueueConfigDetails.vue +0 -412
  147. package/dist/runtime/app/components/nhealth/component-shell.vue +0 -89
  148. /package/dist/runtime/app/components/{nhealth/component-router.vue → ComponentRouter.vue} +0 -0
  149. /package/dist/runtime/app/components/{FlowNodeCard.d.vue.ts → flow/NodeCard.d.vue.ts} +0 -0
  150. /package/dist/runtime/app/components/{FlowNodeCard.vue → flow/NodeCard.vue} +0 -0
  151. /package/dist/runtime/app/components/{FlowNodeCard.vue.d.ts → flow/NodeCard.vue.d.ts} +0 -0
  152. /package/dist/runtime/app/components/{FlowRunTimeline.d.vue.ts → flow/RunTimeline.d.vue.ts} +0 -0
  153. /package/dist/runtime/app/components/{FlowRunTimeline.vue.d.ts → flow/RunTimeline.vue.d.ts} +0 -0
@@ -1,238 +0,0 @@
1
- <template>
2
- <div :class="ui.root">
3
- <button
4
- v-for="item in items"
5
- :key="item.value"
6
- type="button"
7
- :class="itemClasses(item)"
8
- @click="$emit('update:modelValue', item.value)"
9
- >
10
- <!-- Status Icon or All Icon -->
11
- <div
12
- class="flex-shrink-0"
13
- :class="item.step.showAllIndicator ? '' : 'mt-0.5'"
14
- >
15
- <div
16
- v-if="item.step.showAllIndicator"
17
- class="w-6 h-6 rounded-full flex items-center justify-center bg-gray-100 dark:bg-gray-800"
18
- >
19
- <UIcon
20
- name="i-lucide-layers"
21
- class="w-3 h-3 text-gray-600 dark:text-gray-400"
22
- />
23
- </div>
24
- <div
25
- v-else
26
- class="w-8 h-8 rounded-full flex items-center justify-center"
27
- :class="getStepStatusBg(item.step.status)"
28
- >
29
- <UIcon
30
- :name="getStepStatusIcon(item.step.status)"
31
- class="w-4 h-4"
32
- :class="getStepStatusIconColor(item.step.status)"
33
- />
34
- </div>
35
- </div>
36
-
37
- <!-- Step Details -->
38
- <div class="flex-1 min-w-0 ml-3">
39
- <h4 class="text-sm font-medium text-gray-900 dark:text-gray-100">
40
- {{ item.step.key }}
41
- </h4>
42
- <div
43
- v-if="!item.step.showAllIndicator"
44
- class="flex items-center gap-3 mt-1 text-xs text-gray-500"
45
- >
46
- <span
47
- class="capitalize"
48
- :class="getStepStatusTextColor(item.step.status)"
49
- >
50
- {{ item.step.status || "pending" }}
51
- </span>
52
- <span v-if="item.step.attempt && item.step.attempt > 1">
53
- Attempt {{ item.step.attempt }}
54
- </span>
55
- </div>
56
- <div
57
- v-else
58
- class="mt-1 text-xs text-gray-500"
59
- >
60
- Show all events from all steps
61
- </div>
62
-
63
- <!-- Additional Details (from description slot) -->
64
- <div
65
- v-if="!item.step.showAllIndicator && (item.step.startedAt || item.step.completedAt || item.step.error || item.step.awaitType)"
66
- class="mt-3"
67
- >
68
- <!-- Timing Info -->
69
- <div
70
- v-if="item.step.startedAt || item.step.completedAt"
71
- class="flex items-center gap-4 text-xs text-gray-500"
72
- >
73
- <div
74
- v-if="item.step.startedAt"
75
- class="flex items-center gap-1"
76
- >
77
- <UIcon
78
- name="i-lucide-clock"
79
- class="w-3 h-3"
80
- />
81
- <span>{{ formatTime(item.step.startedAt) }}</span>
82
- </div>
83
- <div
84
- v-if="item.step.completedAt"
85
- class="flex items-center gap-1"
86
- >
87
- <UIcon
88
- name="i-lucide-check-circle"
89
- class="w-3 h-3"
90
- />
91
- <span>{{ formatTime(item.step.completedAt) }}</span>
92
- </div>
93
- </div>
94
-
95
- <!-- Error Message -->
96
- <div
97
- v-if="item.step.error"
98
- class="mt-2"
99
- >
100
- <div
101
- class="p-2 bg-red-50 dark:bg-red-900/10 border border-red-200 dark:border-red-900/30 rounded text-xs text-red-600 dark:text-red-400"
102
- :title="String(item.step.error || '')"
103
- >
104
- <div class="flex items-start gap-1">
105
- <UIcon
106
- name="i-lucide-alert-circle"
107
- class="w-3 h-3 flex-shrink-0 mt-0.5"
108
- />
109
- <p class="line-clamp-2 break-all">
110
- {{ item.step.error }}
111
- </p>
112
- </div>
113
- </div>
114
- </div>
115
-
116
- <!-- Await Info -->
117
- <div
118
- v-if="item.step.awaitType"
119
- class="mt-2 p-2 bg-blue-50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-900/30 rounded text-xs text-blue-600 dark:text-blue-400"
120
- >
121
- <div class="flex items-center gap-1">
122
- <UIcon
123
- name="i-lucide-timer"
124
- class="w-3 h-3"
125
- />
126
- <span>Waiting: {{ item.step.awaitType }}</span>
127
- </div>
128
- </div>
129
- </div>
130
- </div>
131
- </button>
132
- </div>
133
- </template>
134
-
135
- <script setup>
136
- import { computed } from "vue";
137
- import { tv } from "tailwind-variants";
138
- import { twMerge } from "tailwind-merge";
139
- import { UIcon } from "#components";
140
- const props = defineProps({
141
- modelValue: { type: String, required: true },
142
- items: { type: Array, required: true },
143
- ui: { type: Object, required: false }
144
- });
145
- defineEmits(["update:modelValue"]);
146
- const defaultUi = {
147
- root: "space-y-3",
148
- itemBase: "w-full flex items-start border rounded-lg text-sm p-3.5 transition-colors text-left hover:bg-gray-50 dark:hover:bg-gray-900/50",
149
- item: "border-gray-200 dark:border-gray-800",
150
- itemSelected: "border-primary bg-primary/5 dark:bg-primary/10"
151
- };
152
- const ui = computed(() => ({
153
- root: twMerge(defaultUi.root, props.ui?.root),
154
- itemBase: twMerge(defaultUi.itemBase, props.ui?.itemBase),
155
- item: props.ui?.item || defaultUi.item,
156
- itemSelected: props.ui?.itemSelected || defaultUi.itemSelected
157
- }));
158
- const itemVariants = computed(() => tv({
159
- base: ui.value.itemBase,
160
- variants: {
161
- selected: {
162
- true: ui.value.itemSelected,
163
- false: ui.value.item
164
- }
165
- }
166
- }));
167
- const itemClasses = (item) => {
168
- return itemVariants.value({
169
- selected: props.modelValue === item.value
170
- });
171
- };
172
- const formatTime = (timestamp) => {
173
- const date = new Date(timestamp);
174
- const now = /* @__PURE__ */ new Date();
175
- const diff = now.getTime() - date.getTime();
176
- const seconds = Math.floor(diff / 1e3);
177
- const minutes = Math.floor(seconds / 60);
178
- const hours = Math.floor(minutes / 60);
179
- const days = Math.floor(hours / 24);
180
- if (days > 0)
181
- return `${days}d ago`;
182
- if (hours > 0)
183
- return `${hours}h ago`;
184
- if (minutes > 0)
185
- return `${minutes}m ago`;
186
- if (seconds > 10)
187
- return `${seconds}s ago`;
188
- return "just now";
189
- };
190
- const getStepStatusBg = (status) => {
191
- switch (status) {
192
- case "completed":
193
- return "bg-emerald-50 dark:bg-emerald-900/20";
194
- case "failed":
195
- return "bg-red-50 dark:bg-red-900/20";
196
- case "running":
197
- return "bg-blue-50 dark:bg-blue-900/20";
198
- default:
199
- return "bg-gray-50 dark:bg-gray-900/20";
200
- }
201
- };
202
- const getStepStatusIcon = (status) => {
203
- switch (status) {
204
- case "completed":
205
- return "i-lucide-check-circle";
206
- case "failed":
207
- return "i-lucide-x-circle";
208
- case "running":
209
- return "i-lucide-loader-circle";
210
- default:
211
- return "i-lucide-circle";
212
- }
213
- };
214
- const getStepStatusIconColor = (status) => {
215
- switch (status) {
216
- case "completed":
217
- return "text-emerald-600 dark:text-emerald-400";
218
- case "failed":
219
- return "text-red-600 dark:text-red-400";
220
- case "running":
221
- return "text-blue-600 dark:text-blue-400 animate-spin";
222
- default:
223
- return "text-gray-400";
224
- }
225
- };
226
- const getStepStatusTextColor = (status) => {
227
- switch (status) {
228
- case "completed":
229
- return "text-emerald-600 dark:text-emerald-400";
230
- case "failed":
231
- return "text-red-600 dark:text-red-400";
232
- case "running":
233
- return "text-blue-600 dark:text-blue-400";
234
- default:
235
- return "text-gray-500";
236
- }
237
- };
238
- </script>
@@ -1,412 +0,0 @@
1
- <template>
2
- <USlideover
3
- v-model:open="isOpen"
4
- :ui="{
5
- body: 'p-0 sm:p-0'
6
- }"
7
- >
8
- <template #title>
9
- <div class="flex items-center justify-between w-full pr-4">
10
- <div>
11
- <div class="text-sm font-semibold">
12
- Queue Configuration
13
- </div>
14
- <div class="text-xs font-mono text-gray-500 mt-0.5">
15
- {{ queueName }}
16
- </div>
17
- </div>
18
- </div>
19
- </template>
20
- <template #body>
21
- <!-- Fixed Tabs Header -->
22
- <div class="sticky top-0 z-10 bg-white dark:bg-gray-950 border-b border-gray-200 dark:border-gray-800 px-6 pt-2">
23
- <UTabs
24
- v-model="selectedTab"
25
- :items="tabs"
26
- />
27
- </div>
28
-
29
- <!-- Scrollable Content Area -->
30
- <div class="flex-1 overflow-y-auto overflow-x-hidden">
31
- <!-- Queue Config Tab -->
32
- <div
33
- v-if="selectedTab === 'queue'"
34
- class="p-6 space-y-6"
35
- >
36
- <div
37
- v-if="!queueConfig || !hasQueueConfig"
38
- class="text-sm text-gray-400 text-center py-8"
39
- >
40
- <UIcon
41
- name="i-lucide-info"
42
- class="w-8 h-8 mx-auto mb-2 opacity-50"
43
- />
44
- <p>No queue configuration defined</p>
45
- <p class="text-xs mt-1">
46
- Using default values
47
- </p>
48
- </div>
49
- <template v-else>
50
- <!-- Queue Name -->
51
- <div class="space-y-2">
52
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
53
- <UIcon
54
- name="i-lucide-tag"
55
- class="w-4 h-4"
56
- />
57
- <span>Queue Name</span>
58
- </div>
59
- <div class="pl-6">
60
- <div class="text-sm font-mono text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
61
- {{ queueConfig.name || queueName }}
62
- </div>
63
- </div>
64
- </div>
65
-
66
- <!-- Prefix -->
67
- <div
68
- v-if="queueConfig.prefix"
69
- class="space-y-2"
70
- >
71
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
72
- <UIcon
73
- name="i-lucide-folder"
74
- class="w-4 h-4"
75
- />
76
- <span>Prefix</span>
77
- </div>
78
- <div class="pl-6">
79
- <div class="text-sm font-mono text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
80
- {{ queueConfig.prefix }}
81
- </div>
82
- <p class="text-xs text-gray-500 mt-1">
83
- Redis key prefix for this queue
84
- </p>
85
- </div>
86
- </div>
87
-
88
- <!-- Rate Limiter -->
89
- <div
90
- v-if="queueConfig.limiter"
91
- class="space-y-2"
92
- >
93
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
94
- <UIcon
95
- name="i-lucide-gauge"
96
- class="w-4 h-4"
97
- />
98
- <span>Rate Limiter</span>
99
- </div>
100
- <div class="pl-6 space-y-3">
101
- <div class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
102
- <div class="flex items-center justify-between text-sm">
103
- <span class="text-gray-600 dark:text-gray-400">Max Jobs</span>
104
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.limiter.max }}</span>
105
- </div>
106
- </div>
107
- <div class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
108
- <div class="flex items-center justify-between text-sm">
109
- <span class="text-gray-600 dark:text-gray-400">Duration</span>
110
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.limiter.duration }}ms</span>
111
- </div>
112
- </div>
113
- <div
114
- v-if="queueConfig.limiter.groupKey"
115
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
116
- >
117
- <div class="flex items-center justify-between text-sm">
118
- <span class="text-gray-600 dark:text-gray-400">Group Key</span>
119
- <span class="font-medium font-mono text-gray-900 dark:text-gray-100">{{ queueConfig.limiter.groupKey }}</span>
120
- </div>
121
- </div>
122
- <p class="text-xs text-gray-500">
123
- Limits processing to {{ queueConfig.limiter.max }} jobs per {{ queueConfig.limiter.duration }}ms
124
- </p>
125
- </div>
126
- </div>
127
-
128
- <!-- Default Job Options -->
129
- <div
130
- v-if="queueConfig.defaultJobOptions && hasJobOptions"
131
- class="space-y-2"
132
- >
133
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
134
- <UIcon
135
- name="i-lucide-settings"
136
- class="w-4 h-4"
137
- />
138
- <span>Default Job Options</span>
139
- </div>
140
- <div class="pl-6 space-y-3">
141
- <div
142
- v-if="typeof queueConfig.defaultJobOptions.attempts === 'number'"
143
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
144
- >
145
- <div class="flex items-center justify-between text-sm">
146
- <span class="text-gray-600 dark:text-gray-400">Max Attempts</span>
147
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.attempts }}</span>
148
- </div>
149
- </div>
150
- <div
151
- v-if="queueConfig.defaultJobOptions.backoff"
152
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
153
- >
154
- <div class="text-sm space-y-1">
155
- <div class="flex items-center justify-between">
156
- <span class="text-gray-600 dark:text-gray-400">Backoff Type</span>
157
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.backoff.type || "exponential" }}</span>
158
- </div>
159
- <div
160
- v-if="queueConfig.defaultJobOptions.backoff.delay"
161
- class="flex items-center justify-between"
162
- >
163
- <span class="text-gray-600 dark:text-gray-400">Delay</span>
164
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.backoff.delay }}ms</span>
165
- </div>
166
- </div>
167
- </div>
168
- <div
169
- v-if="typeof queueConfig.defaultJobOptions.priority === 'number'"
170
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
171
- >
172
- <div class="flex items-center justify-between text-sm">
173
- <span class="text-gray-600 dark:text-gray-400">Priority</span>
174
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.priority }}</span>
175
- </div>
176
- </div>
177
- <div
178
- v-if="typeof queueConfig.defaultJobOptions.timeout === 'number'"
179
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
180
- >
181
- <div class="flex items-center justify-between text-sm">
182
- <span class="text-gray-600 dark:text-gray-400">Timeout</span>
183
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.timeout }}ms</span>
184
- </div>
185
- </div>
186
- <div
187
- v-if="typeof queueConfig.defaultJobOptions.removeOnComplete === 'boolean' || typeof queueConfig.defaultJobOptions.removeOnComplete === 'number'"
188
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
189
- >
190
- <div class="flex items-center justify-between text-sm">
191
- <span class="text-gray-600 dark:text-gray-400">Remove on Complete</span>
192
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.removeOnComplete }}</span>
193
- </div>
194
- </div>
195
- <div
196
- v-if="typeof queueConfig.defaultJobOptions.removeOnFail === 'boolean' || typeof queueConfig.defaultJobOptions.removeOnFail === 'number'"
197
- class="bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800"
198
- >
199
- <div class="flex items-center justify-between text-sm">
200
- <span class="text-gray-600 dark:text-gray-400">Remove on Fail</span>
201
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ queueConfig.defaultJobOptions.removeOnFail }}</span>
202
- </div>
203
- </div>
204
- </div>
205
- </div>
206
- </template>
207
- </div>
208
-
209
- <!-- Worker Config Tab -->
210
- <div
211
- v-if="selectedTab === 'worker'"
212
- class="p-6 space-y-6"
213
- >
214
- <div
215
- v-if="!workerConfig || !hasWorkerConfig"
216
- class="text-sm text-gray-400 text-center py-8"
217
- >
218
- <UIcon
219
- name="i-lucide-info"
220
- class="w-8 h-8 mx-auto mb-2 opacity-50"
221
- />
222
- <p>No worker configuration defined</p>
223
- <p class="text-xs mt-1">
224
- Using default values
225
- </p>
226
- </div>
227
- <template v-else>
228
- <!-- Concurrency -->
229
- <div
230
- v-if="typeof workerConfig.concurrency === 'number'"
231
- class="space-y-2"
232
- >
233
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
234
- <UIcon
235
- name="i-lucide-layers"
236
- class="w-4 h-4"
237
- />
238
- <span>Concurrency</span>
239
- </div>
240
- <div class="pl-6">
241
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
242
- <div class="flex items-center justify-between">
243
- <span class="text-gray-600 dark:text-gray-400">Parallel Jobs</span>
244
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.concurrency }}</span>
245
- </div>
246
- </div>
247
- <p class="text-xs text-gray-500 mt-1">
248
- Maximum number of jobs processed simultaneously
249
- </p>
250
- </div>
251
- </div>
252
-
253
- <!-- Lock Duration -->
254
- <div
255
- v-if="typeof workerConfig.lockDurationMs === 'number'"
256
- class="space-y-2"
257
- >
258
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
259
- <UIcon
260
- name="i-lucide-lock"
261
- class="w-4 h-4"
262
- />
263
- <span>Lock Duration</span>
264
- </div>
265
- <div class="pl-6">
266
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
267
- <div class="flex items-center justify-between">
268
- <span class="text-gray-600 dark:text-gray-400">Duration</span>
269
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.lockDurationMs }}ms</span>
270
- </div>
271
- </div>
272
- <p class="text-xs text-gray-500 mt-1">
273
- Time before job lock expires and becomes available for retry
274
- </p>
275
- </div>
276
- </div>
277
-
278
- <!-- Max Stalled Count -->
279
- <div
280
- v-if="typeof workerConfig.maxStalledCount === 'number'"
281
- class="space-y-2"
282
- >
283
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
284
- <UIcon
285
- name="i-lucide-alert-triangle"
286
- class="w-4 h-4"
287
- />
288
- <span>Max Stalled Count</span>
289
- </div>
290
- <div class="pl-6">
291
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
292
- <div class="flex items-center justify-between">
293
- <span class="text-gray-600 dark:text-gray-400">Max Retries</span>
294
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.maxStalledCount }}</span>
295
- </div>
296
- </div>
297
- <p class="text-xs text-gray-500 mt-1">
298
- Maximum times a job can stall before being marked as failed
299
- </p>
300
- </div>
301
- </div>
302
-
303
- <!-- Drain Delay -->
304
- <div
305
- v-if="typeof workerConfig.drainDelayMs === 'number'"
306
- class="space-y-2"
307
- >
308
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
309
- <UIcon
310
- name="i-lucide-timer"
311
- class="w-4 h-4"
312
- />
313
- <span>Drain Delay</span>
314
- </div>
315
- <div class="pl-6">
316
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
317
- <div class="flex items-center justify-between">
318
- <span class="text-gray-600 dark:text-gray-400">Delay</span>
319
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.drainDelayMs }}ms</span>
320
- </div>
321
- </div>
322
- <p class="text-xs text-gray-500 mt-1">
323
- Time to wait for jobs to complete during graceful shutdown
324
- </p>
325
- </div>
326
- </div>
327
-
328
- <!-- Polling Interval -->
329
- <div
330
- v-if="typeof workerConfig.pollingIntervalMs === 'number'"
331
- class="space-y-2"
332
- >
333
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
334
- <UIcon
335
- name="i-lucide-refresh-cw"
336
- class="w-4 h-4"
337
- />
338
- <span>Polling Interval</span>
339
- </div>
340
- <div class="pl-6">
341
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
342
- <div class="flex items-center justify-between">
343
- <span class="text-gray-600 dark:text-gray-400">Interval</span>
344
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.pollingIntervalMs }}ms</span>
345
- </div>
346
- </div>
347
- <p class="text-xs text-gray-500 mt-1">
348
- Frequency to check for new jobs (PGBoss compatibility)
349
- </p>
350
- </div>
351
- </div>
352
-
353
- <!-- Autorun -->
354
- <div
355
- v-if="typeof workerConfig.autorun === 'boolean'"
356
- class="space-y-2"
357
- >
358
- <div class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-gray-300">
359
- <UIcon
360
- name="i-lucide-play-circle"
361
- class="w-4 h-4"
362
- />
363
- <span>Autorun</span>
364
- </div>
365
- <div class="pl-6">
366
- <div class="text-sm bg-gray-50 dark:bg-gray-900 px-3 py-2 rounded border border-gray-200 dark:border-gray-800">
367
- <div class="flex items-center justify-between">
368
- <span class="text-gray-600 dark:text-gray-400">Enabled</span>
369
- <span class="font-medium text-gray-900 dark:text-gray-100">{{ workerConfig.autorun ? "Yes" : "No" }}</span>
370
- </div>
371
- </div>
372
- <p class="text-xs text-gray-500 mt-1">
373
- Whether worker starts automatically on initialization
374
- </p>
375
- </div>
376
- </div>
377
- </template>
378
- </div>
379
- </div>
380
- </template>
381
- </USlideover>
382
- </template>
383
-
384
- <script setup>
385
- import { ref, computed } from "#imports";
386
- import { USlideover, UTabs, UIcon } from "#components";
387
- const props = defineProps({
388
- queueName: { type: String, required: true },
389
- queueConfig: { type: Object, required: false },
390
- workerConfig: { type: Object, required: false }
391
- });
392
- const isOpen = defineModel("open", { type: Boolean, ...{ default: false } });
393
- const selectedTab = ref("queue");
394
- const tabs = [
395
- { label: "Queue Config", value: "queue", icon: "i-lucide-list" },
396
- { label: "Worker Config", value: "worker", icon: "i-lucide-cpu" }
397
- ];
398
- const hasQueueConfig = computed(() => {
399
- if (!props.queueConfig) return false;
400
- const { name, ...rest } = props.queueConfig;
401
- return Object.values(rest).some((v) => v !== void 0 && v !== null);
402
- });
403
- const hasJobOptions = computed(() => {
404
- const opts = props.queueConfig?.defaultJobOptions;
405
- if (!opts) return false;
406
- return Object.values(opts).some((v) => v !== void 0 && v !== null);
407
- });
408
- const hasWorkerConfig = computed(() => {
409
- if (!props.workerConfig) return false;
410
- return Object.values(props.workerConfig).some((v) => v !== void 0 && v !== null);
411
- });
412
- </script>