nvent 0.4.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 (192) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +389 -0
  3. package/dist/module.d.mts +193 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +974 -0
  6. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +33 -0
  7. package/dist/runtime/app/components/ConfirmDialog.vue +121 -0
  8. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +33 -0
  9. package/dist/runtime/app/components/FlowDiagram.d.vue.ts +64 -0
  10. package/dist/runtime/app/components/FlowDiagram.vue +338 -0
  11. package/dist/runtime/app/components/FlowDiagram.vue.d.ts +64 -0
  12. package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +29 -0
  13. package/dist/runtime/app/components/FlowNodeCard.vue +156 -0
  14. package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +29 -0
  15. package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +9 -0
  16. package/dist/runtime/app/components/FlowRunOverview.vue +291 -0
  17. package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +9 -0
  18. package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +14 -0
  19. package/dist/runtime/app/components/FlowRunStatusBadge.vue +60 -0
  20. package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +14 -0
  21. package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +12 -0
  22. package/dist/runtime/app/components/FlowRunTimeline.vue +127 -0
  23. package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +12 -0
  24. package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +16 -0
  25. package/dist/runtime/app/components/FlowScheduleDialog.vue +226 -0
  26. package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +16 -0
  27. package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +12 -0
  28. package/dist/runtime/app/components/FlowSchedulesList.vue +99 -0
  29. package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +12 -0
  30. package/dist/runtime/app/components/JobScheduling.d.vue.ts +6 -0
  31. package/dist/runtime/app/components/JobScheduling.vue +203 -0
  32. package/dist/runtime/app/components/JobScheduling.vue.d.ts +6 -0
  33. package/dist/runtime/app/components/ListItem.d.vue.ts +23 -0
  34. package/dist/runtime/app/components/ListItem.vue +70 -0
  35. package/dist/runtime/app/components/ListItem.vue.d.ts +23 -0
  36. package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +45 -0
  37. package/dist/runtime/app/components/QueueConfigDetails.vue +412 -0
  38. package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +45 -0
  39. package/dist/runtime/app/components/StatCounter.d.vue.ts +9 -0
  40. package/dist/runtime/app/components/StatCounter.vue +25 -0
  41. package/dist/runtime/app/components/StatCounter.vue.d.ts +9 -0
  42. package/dist/runtime/app/components/TimelineList.d.vue.ts +7 -0
  43. package/dist/runtime/app/components/TimelineList.vue +210 -0
  44. package/dist/runtime/app/components/TimelineList.vue.d.ts +7 -0
  45. package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +46 -0
  46. package/dist/runtime/app/components/nhealth/component-router.vue +26 -0
  47. package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +46 -0
  48. package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +24 -0
  49. package/dist/runtime/app/components/nhealth/component-shell.vue +89 -0
  50. package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +24 -0
  51. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +14 -0
  52. package/dist/runtime/app/composables/useAnalyzedFlows.js +7 -0
  53. package/dist/runtime/app/composables/useComponentRouter.d.ts +38 -0
  54. package/dist/runtime/app/composables/useComponentRouter.js +240 -0
  55. package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +15 -0
  56. package/dist/runtime/app/composables/useFlowRunTimeline.js +66 -0
  57. package/dist/runtime/app/composables/useFlowRuns.d.ts +11 -0
  58. package/dist/runtime/app/composables/useFlowRuns.js +31 -0
  59. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +24 -0
  60. package/dist/runtime/app/composables/useFlowRunsInfinite.js +123 -0
  61. package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +8 -0
  62. package/dist/runtime/app/composables/useFlowRunsPolling.js +26 -0
  63. package/dist/runtime/app/composables/useFlowState.d.ts +125 -0
  64. package/dist/runtime/app/composables/useFlowState.js +211 -0
  65. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +27 -0
  66. package/dist/runtime/app/composables/useFlowWebSocket.js +205 -0
  67. package/dist/runtime/app/composables/useFlowsNavigation.d.ts +10 -0
  68. package/dist/runtime/app/composables/useFlowsNavigation.js +57 -0
  69. package/dist/runtime/app/composables/useQueueJobs.d.ts +20 -0
  70. package/dist/runtime/app/composables/useQueueJobs.js +20 -0
  71. package/dist/runtime/app/composables/useQueueUpdates.d.ts +26 -0
  72. package/dist/runtime/app/composables/useQueueUpdates.js +122 -0
  73. package/dist/runtime/app/composables/useQueues.d.ts +43 -0
  74. package/dist/runtime/app/composables/useQueues.js +26 -0
  75. package/dist/runtime/app/composables/useQueuesLive.d.ts +19 -0
  76. package/dist/runtime/app/composables/useQueuesLive.js +143 -0
  77. package/dist/runtime/app/pages/flows/index.d.vue.ts +3 -0
  78. package/dist/runtime/app/pages/flows/index.vue +645 -0
  79. package/dist/runtime/app/pages/flows/index.vue.d.ts +3 -0
  80. package/dist/runtime/app/pages/index.d.vue.ts +3 -0
  81. package/dist/runtime/app/pages/index.vue +34 -0
  82. package/dist/runtime/app/pages/index.vue.d.ts +3 -0
  83. package/dist/runtime/app/pages/queues/index.d.vue.ts +3 -0
  84. package/dist/runtime/app/pages/queues/index.vue +229 -0
  85. package/dist/runtime/app/pages/queues/index.vue.d.ts +3 -0
  86. package/dist/runtime/app/pages/queues/job.d.vue.ts +3 -0
  87. package/dist/runtime/app/pages/queues/job.vue +262 -0
  88. package/dist/runtime/app/pages/queues/job.vue.d.ts +3 -0
  89. package/dist/runtime/app/pages/queues/jobs.d.vue.ts +3 -0
  90. package/dist/runtime/app/pages/queues/jobs.vue +291 -0
  91. package/dist/runtime/app/pages/queues/jobs.vue.d.ts +3 -0
  92. package/dist/runtime/app/plugins/vueflow.client.d.ts +6 -0
  93. package/dist/runtime/app/plugins/vueflow.client.js +15 -0
  94. package/dist/runtime/constants.d.ts +11 -0
  95. package/dist/runtime/constants.js +11 -0
  96. package/dist/runtime/python/get_config.py +64 -0
  97. package/dist/runtime/schema.d.ts +37 -0
  98. package/dist/runtime/schema.js +20 -0
  99. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +10 -0
  100. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +44 -0
  101. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +7 -0
  102. package/dist/runtime/server/api/_flows/[name]/runs.get.js +53 -0
  103. package/dist/runtime/server/api/_flows/[name]/schedule.post.d.ts +2 -0
  104. package/dist/runtime/server/api/_flows/[name]/schedule.post.js +57 -0
  105. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.d.ts +2 -0
  106. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +42 -0
  107. package/dist/runtime/server/api/_flows/[name]/schedules.get.d.ts +2 -0
  108. package/dist/runtime/server/api/_flows/[name]/schedules.get.js +48 -0
  109. package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +2 -0
  110. package/dist/runtime/server/api/_flows/[name]/start.post.js +9 -0
  111. package/dist/runtime/server/api/_flows/index.get.d.ts +6 -0
  112. package/dist/runtime/server/api/_flows/index.get.js +5 -0
  113. package/dist/runtime/server/api/_flows/ws.d.ts +60 -0
  114. package/dist/runtime/server/api/_flows/ws.js +183 -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 +9 -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 +18 -0
  119. package/dist/runtime/server/api/_queues/index.get.d.ts +2 -0
  120. package/dist/runtime/server/api/_queues/index.get.js +63 -0
  121. package/dist/runtime/server/api/_queues/ws.d.ts +48 -0
  122. package/dist/runtime/server/api/_queues/ws.js +200 -0
  123. package/dist/runtime/server/events/adapters/fileAdapter.d.ts +2 -0
  124. package/dist/runtime/server/events/adapters/fileAdapter.js +382 -0
  125. package/dist/runtime/server/events/adapters/memoryAdapter.d.ts +2 -0
  126. package/dist/runtime/server/events/adapters/memoryAdapter.js +171 -0
  127. package/dist/runtime/server/events/adapters/redis/redisAdapter.d.ts +2 -0
  128. package/dist/runtime/server/events/adapters/redis/redisAdapter.js +348 -0
  129. package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.d.ts +29 -0
  130. package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.js +82 -0
  131. package/dist/runtime/server/events/eventBus.d.ts +20 -0
  132. package/dist/runtime/server/events/eventBus.js +35 -0
  133. package/dist/runtime/server/events/eventStoreFactory.d.ts +19 -0
  134. package/dist/runtime/server/events/eventStoreFactory.js +44 -0
  135. package/dist/runtime/server/events/streamNames.d.ts +17 -0
  136. package/dist/runtime/server/events/streamNames.js +17 -0
  137. package/dist/runtime/server/events/types.d.ts +63 -0
  138. package/dist/runtime/server/events/types.js +0 -0
  139. package/dist/runtime/server/events/wiring/flowWiring.d.ts +33 -0
  140. package/dist/runtime/server/events/wiring/flowWiring.js +406 -0
  141. package/dist/runtime/server/events/wiring/registry.d.ts +10 -0
  142. package/dist/runtime/server/events/wiring/registry.js +24 -0
  143. package/dist/runtime/server/plugins/00.event-store.d.ts +13 -0
  144. package/dist/runtime/server/plugins/00.event-store.js +16 -0
  145. package/dist/runtime/server/plugins/00.ws-lifecycle.d.ts +5 -0
  146. package/dist/runtime/server/plugins/00.ws-lifecycle.js +66 -0
  147. package/dist/runtime/server/plugins/flow-management.d.ts +13 -0
  148. package/dist/runtime/server/plugins/flow-management.js +65 -0
  149. package/dist/runtime/server/plugins/queue-management.d.ts +2 -0
  150. package/dist/runtime/server/plugins/queue-management.js +27 -0
  151. package/dist/runtime/server/plugins/state-cleanup.d.ts +11 -0
  152. package/dist/runtime/server/plugins/state-cleanup.js +93 -0
  153. package/dist/runtime/server/plugins/worker-management.d.ts +2 -0
  154. package/dist/runtime/server/plugins/worker-management.js +33 -0
  155. package/dist/runtime/server/queue/adapters/bullmq.d.ts +17 -0
  156. package/dist/runtime/server/queue/adapters/bullmq.js +164 -0
  157. package/dist/runtime/server/queue/queueFactory.d.ts +3 -0
  158. package/dist/runtime/server/queue/queueFactory.js +10 -0
  159. package/dist/runtime/server/queue/types.d.ts +47 -0
  160. package/dist/runtime/server/queue/types.js +0 -0
  161. package/dist/runtime/server/state/adapters/redis.d.ts +2 -0
  162. package/dist/runtime/server/state/adapters/redis.js +42 -0
  163. package/dist/runtime/server/state/stateFactory.d.ts +3 -0
  164. package/dist/runtime/server/state/stateFactory.js +17 -0
  165. package/dist/runtime/server/state/types.d.ts +23 -0
  166. package/dist/runtime/server/state/types.js +0 -0
  167. package/dist/runtime/server/tsconfig.json +3 -0
  168. package/dist/runtime/server/utils/defineQueueConfig.d.ts +154 -0
  169. package/dist/runtime/server/utils/defineQueueConfig.js +2 -0
  170. package/dist/runtime/server/utils/defineQueueWorker.d.ts +10 -0
  171. package/dist/runtime/server/utils/defineQueueWorker.js +17 -0
  172. package/dist/runtime/server/utils/useEventManager.d.ts +15 -0
  173. package/dist/runtime/server/utils/useEventManager.js +26 -0
  174. package/dist/runtime/server/utils/useEventStore.d.ts +20 -0
  175. package/dist/runtime/server/utils/useEventStore.js +119 -0
  176. package/dist/runtime/server/utils/useFlowEngine.d.ts +9 -0
  177. package/dist/runtime/server/utils/useFlowEngine.js +44 -0
  178. package/dist/runtime/server/utils/useLogs.d.ts +41 -0
  179. package/dist/runtime/server/utils/useLogs.js +74 -0
  180. package/dist/runtime/server/utils/useQueue.d.ts +31 -0
  181. package/dist/runtime/server/utils/useQueue.js +24 -0
  182. package/dist/runtime/server/utils/useServerLogger.d.ts +42 -0
  183. package/dist/runtime/server/utils/useServerLogger.js +54 -0
  184. package/dist/runtime/server/utils/wsPeerManager.d.ts +34 -0
  185. package/dist/runtime/server/utils/wsPeerManager.js +23 -0
  186. package/dist/runtime/server/worker/adapter.d.ts +4 -0
  187. package/dist/runtime/server/worker/adapter.js +65 -0
  188. package/dist/runtime/server/worker/runner/node.d.ts +27 -0
  189. package/dist/runtime/server/worker/runner/node.js +196 -0
  190. package/dist/runtime/types.d.ts +132 -0
  191. package/dist/types.d.mts +3 -0
  192. package/package.json +75 -0
@@ -0,0 +1,412 @@
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>
@@ -0,0 +1,45 @@
1
+ interface QueueConfig {
2
+ name?: string;
3
+ prefix?: string;
4
+ limiter?: {
5
+ max?: number;
6
+ duration?: number;
7
+ groupKey?: string;
8
+ };
9
+ defaultJobOptions?: {
10
+ attempts?: number;
11
+ backoff?: {
12
+ type?: string;
13
+ delay?: number;
14
+ };
15
+ priority?: number;
16
+ timeout?: number;
17
+ removeOnComplete?: boolean | number;
18
+ removeOnFail?: boolean | number;
19
+ };
20
+ }
21
+ interface WorkerConfig {
22
+ concurrency?: number;
23
+ lockDurationMs?: number;
24
+ maxStalledCount?: number;
25
+ drainDelayMs?: number;
26
+ pollingIntervalMs?: number;
27
+ autorun?: boolean;
28
+ }
29
+ interface Props {
30
+ queueName: string;
31
+ queueConfig?: QueueConfig;
32
+ workerConfig?: WorkerConfig;
33
+ }
34
+ type __VLS_Props = Props;
35
+ type __VLS_ModelProps = {
36
+ 'open'?: boolean;
37
+ };
38
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
39
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
+ "update:open": (value: boolean) => any;
41
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
42
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
43
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { Color } from '../types.js';
2
+ type __VLS_Props = {
3
+ name: string;
4
+ count?: number;
5
+ color?: Color;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div
3
+ class="border rounded p-1 min-w-20"
4
+ :class="{
5
+ 'border-red-400': color === 'red',
6
+ 'border-green-400': color === 'green',
7
+ 'border-yellow-400': color === 'yellow',
8
+ 'border-neutral-400': color === 'neutral',
9
+ 'border-orange-400': color === 'orange'
10
+ }"
11
+ >
12
+ <div class="flex flex-col gap-1 text-center">
13
+ <span class="text-xs text-gray-500">{{ name }}</span>
14
+ <span class="text-sm font-semibold">{{ count || 0 }}</span>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script setup>
20
+ defineProps({
21
+ name: { type: String, required: true },
22
+ count: { type: Number, required: false },
23
+ color: { type: null, required: false }
24
+ });
25
+ </script>
@@ -0,0 +1,9 @@
1
+ import type { Color } from '../types.js';
2
+ type __VLS_Props = {
3
+ name: string;
4
+ count?: number;
5
+ color?: Color;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ items: any[];
3
+ heightClass?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;