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.
- package/LICENSE +21 -0
- package/README.md +389 -0
- package/dist/module.d.mts +193 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +974 -0
- package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +33 -0
- package/dist/runtime/app/components/ConfirmDialog.vue +121 -0
- package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +33 -0
- package/dist/runtime/app/components/FlowDiagram.d.vue.ts +64 -0
- package/dist/runtime/app/components/FlowDiagram.vue +338 -0
- package/dist/runtime/app/components/FlowDiagram.vue.d.ts +64 -0
- package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +29 -0
- package/dist/runtime/app/components/FlowNodeCard.vue +156 -0
- package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +29 -0
- package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +9 -0
- package/dist/runtime/app/components/FlowRunOverview.vue +291 -0
- package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +9 -0
- package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +14 -0
- package/dist/runtime/app/components/FlowRunStatusBadge.vue +60 -0
- package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +14 -0
- package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +12 -0
- package/dist/runtime/app/components/FlowRunTimeline.vue +127 -0
- package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +12 -0
- package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +16 -0
- package/dist/runtime/app/components/FlowScheduleDialog.vue +226 -0
- package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +16 -0
- package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +12 -0
- package/dist/runtime/app/components/FlowSchedulesList.vue +99 -0
- package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +12 -0
- package/dist/runtime/app/components/JobScheduling.d.vue.ts +6 -0
- package/dist/runtime/app/components/JobScheduling.vue +203 -0
- package/dist/runtime/app/components/JobScheduling.vue.d.ts +6 -0
- package/dist/runtime/app/components/ListItem.d.vue.ts +23 -0
- package/dist/runtime/app/components/ListItem.vue +70 -0
- package/dist/runtime/app/components/ListItem.vue.d.ts +23 -0
- package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +45 -0
- package/dist/runtime/app/components/QueueConfigDetails.vue +412 -0
- package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +45 -0
- package/dist/runtime/app/components/StatCounter.d.vue.ts +9 -0
- package/dist/runtime/app/components/StatCounter.vue +25 -0
- package/dist/runtime/app/components/StatCounter.vue.d.ts +9 -0
- package/dist/runtime/app/components/TimelineList.d.vue.ts +7 -0
- package/dist/runtime/app/components/TimelineList.vue +210 -0
- package/dist/runtime/app/components/TimelineList.vue.d.ts +7 -0
- package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +46 -0
- package/dist/runtime/app/components/nhealth/component-router.vue +26 -0
- package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +46 -0
- package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +24 -0
- package/dist/runtime/app/components/nhealth/component-shell.vue +89 -0
- package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +24 -0
- package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +14 -0
- package/dist/runtime/app/composables/useAnalyzedFlows.js +7 -0
- package/dist/runtime/app/composables/useComponentRouter.d.ts +38 -0
- package/dist/runtime/app/composables/useComponentRouter.js +240 -0
- package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +15 -0
- package/dist/runtime/app/composables/useFlowRunTimeline.js +66 -0
- package/dist/runtime/app/composables/useFlowRuns.d.ts +11 -0
- package/dist/runtime/app/composables/useFlowRuns.js +31 -0
- package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +24 -0
- package/dist/runtime/app/composables/useFlowRunsInfinite.js +123 -0
- package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +8 -0
- package/dist/runtime/app/composables/useFlowRunsPolling.js +26 -0
- package/dist/runtime/app/composables/useFlowState.d.ts +125 -0
- package/dist/runtime/app/composables/useFlowState.js +211 -0
- package/dist/runtime/app/composables/useFlowWebSocket.d.ts +27 -0
- package/dist/runtime/app/composables/useFlowWebSocket.js +205 -0
- package/dist/runtime/app/composables/useFlowsNavigation.d.ts +10 -0
- package/dist/runtime/app/composables/useFlowsNavigation.js +57 -0
- package/dist/runtime/app/composables/useQueueJobs.d.ts +20 -0
- package/dist/runtime/app/composables/useQueueJobs.js +20 -0
- package/dist/runtime/app/composables/useQueueUpdates.d.ts +26 -0
- package/dist/runtime/app/composables/useQueueUpdates.js +122 -0
- package/dist/runtime/app/composables/useQueues.d.ts +43 -0
- package/dist/runtime/app/composables/useQueues.js +26 -0
- package/dist/runtime/app/composables/useQueuesLive.d.ts +19 -0
- package/dist/runtime/app/composables/useQueuesLive.js +143 -0
- package/dist/runtime/app/pages/flows/index.d.vue.ts +3 -0
- package/dist/runtime/app/pages/flows/index.vue +645 -0
- package/dist/runtime/app/pages/flows/index.vue.d.ts +3 -0
- package/dist/runtime/app/pages/index.d.vue.ts +3 -0
- package/dist/runtime/app/pages/index.vue +34 -0
- package/dist/runtime/app/pages/index.vue.d.ts +3 -0
- package/dist/runtime/app/pages/queues/index.d.vue.ts +3 -0
- package/dist/runtime/app/pages/queues/index.vue +229 -0
- package/dist/runtime/app/pages/queues/index.vue.d.ts +3 -0
- package/dist/runtime/app/pages/queues/job.d.vue.ts +3 -0
- package/dist/runtime/app/pages/queues/job.vue +262 -0
- package/dist/runtime/app/pages/queues/job.vue.d.ts +3 -0
- package/dist/runtime/app/pages/queues/jobs.d.vue.ts +3 -0
- package/dist/runtime/app/pages/queues/jobs.vue +291 -0
- package/dist/runtime/app/pages/queues/jobs.vue.d.ts +3 -0
- package/dist/runtime/app/plugins/vueflow.client.d.ts +6 -0
- package/dist/runtime/app/plugins/vueflow.client.js +15 -0
- package/dist/runtime/constants.d.ts +11 -0
- package/dist/runtime/constants.js +11 -0
- package/dist/runtime/python/get_config.py +64 -0
- package/dist/runtime/schema.d.ts +37 -0
- package/dist/runtime/schema.js +20 -0
- package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +10 -0
- package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +44 -0
- package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +7 -0
- package/dist/runtime/server/api/_flows/[name]/runs.get.js +53 -0
- package/dist/runtime/server/api/_flows/[name]/schedule.post.d.ts +2 -0
- package/dist/runtime/server/api/_flows/[name]/schedule.post.js +57 -0
- package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.d.ts +2 -0
- package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +42 -0
- package/dist/runtime/server/api/_flows/[name]/schedules.get.d.ts +2 -0
- package/dist/runtime/server/api/_flows/[name]/schedules.get.js +48 -0
- package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +2 -0
- package/dist/runtime/server/api/_flows/[name]/start.post.js +9 -0
- package/dist/runtime/server/api/_flows/index.get.d.ts +6 -0
- package/dist/runtime/server/api/_flows/index.get.js +5 -0
- package/dist/runtime/server/api/_flows/ws.d.ts +60 -0
- package/dist/runtime/server/api/_flows/ws.js +183 -0
- package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +2 -0
- package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +9 -0
- package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +2 -0
- package/dist/runtime/server/api/_queues/[name]/job/index.get.js +18 -0
- package/dist/runtime/server/api/_queues/index.get.d.ts +2 -0
- package/dist/runtime/server/api/_queues/index.get.js +63 -0
- package/dist/runtime/server/api/_queues/ws.d.ts +48 -0
- package/dist/runtime/server/api/_queues/ws.js +200 -0
- package/dist/runtime/server/events/adapters/fileAdapter.d.ts +2 -0
- package/dist/runtime/server/events/adapters/fileAdapter.js +382 -0
- package/dist/runtime/server/events/adapters/memoryAdapter.d.ts +2 -0
- package/dist/runtime/server/events/adapters/memoryAdapter.js +171 -0
- package/dist/runtime/server/events/adapters/redis/redisAdapter.d.ts +2 -0
- package/dist/runtime/server/events/adapters/redis/redisAdapter.js +348 -0
- package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.d.ts +29 -0
- package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.js +82 -0
- package/dist/runtime/server/events/eventBus.d.ts +20 -0
- package/dist/runtime/server/events/eventBus.js +35 -0
- package/dist/runtime/server/events/eventStoreFactory.d.ts +19 -0
- package/dist/runtime/server/events/eventStoreFactory.js +44 -0
- package/dist/runtime/server/events/streamNames.d.ts +17 -0
- package/dist/runtime/server/events/streamNames.js +17 -0
- package/dist/runtime/server/events/types.d.ts +63 -0
- package/dist/runtime/server/events/types.js +0 -0
- package/dist/runtime/server/events/wiring/flowWiring.d.ts +33 -0
- package/dist/runtime/server/events/wiring/flowWiring.js +406 -0
- package/dist/runtime/server/events/wiring/registry.d.ts +10 -0
- package/dist/runtime/server/events/wiring/registry.js +24 -0
- package/dist/runtime/server/plugins/00.event-store.d.ts +13 -0
- package/dist/runtime/server/plugins/00.event-store.js +16 -0
- package/dist/runtime/server/plugins/00.ws-lifecycle.d.ts +5 -0
- package/dist/runtime/server/plugins/00.ws-lifecycle.js +66 -0
- package/dist/runtime/server/plugins/flow-management.d.ts +13 -0
- package/dist/runtime/server/plugins/flow-management.js +65 -0
- package/dist/runtime/server/plugins/queue-management.d.ts +2 -0
- package/dist/runtime/server/plugins/queue-management.js +27 -0
- package/dist/runtime/server/plugins/state-cleanup.d.ts +11 -0
- package/dist/runtime/server/plugins/state-cleanup.js +93 -0
- package/dist/runtime/server/plugins/worker-management.d.ts +2 -0
- package/dist/runtime/server/plugins/worker-management.js +33 -0
- package/dist/runtime/server/queue/adapters/bullmq.d.ts +17 -0
- package/dist/runtime/server/queue/adapters/bullmq.js +164 -0
- package/dist/runtime/server/queue/queueFactory.d.ts +3 -0
- package/dist/runtime/server/queue/queueFactory.js +10 -0
- package/dist/runtime/server/queue/types.d.ts +47 -0
- package/dist/runtime/server/queue/types.js +0 -0
- package/dist/runtime/server/state/adapters/redis.d.ts +2 -0
- package/dist/runtime/server/state/adapters/redis.js +42 -0
- package/dist/runtime/server/state/stateFactory.d.ts +3 -0
- package/dist/runtime/server/state/stateFactory.js +17 -0
- package/dist/runtime/server/state/types.d.ts +23 -0
- package/dist/runtime/server/state/types.js +0 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/defineQueueConfig.d.ts +154 -0
- package/dist/runtime/server/utils/defineQueueConfig.js +2 -0
- package/dist/runtime/server/utils/defineQueueWorker.d.ts +10 -0
- package/dist/runtime/server/utils/defineQueueWorker.js +17 -0
- package/dist/runtime/server/utils/useEventManager.d.ts +15 -0
- package/dist/runtime/server/utils/useEventManager.js +26 -0
- package/dist/runtime/server/utils/useEventStore.d.ts +20 -0
- package/dist/runtime/server/utils/useEventStore.js +119 -0
- package/dist/runtime/server/utils/useFlowEngine.d.ts +9 -0
- package/dist/runtime/server/utils/useFlowEngine.js +44 -0
- package/dist/runtime/server/utils/useLogs.d.ts +41 -0
- package/dist/runtime/server/utils/useLogs.js +74 -0
- package/dist/runtime/server/utils/useQueue.d.ts +31 -0
- package/dist/runtime/server/utils/useQueue.js +24 -0
- package/dist/runtime/server/utils/useServerLogger.d.ts +42 -0
- package/dist/runtime/server/utils/useServerLogger.js +54 -0
- package/dist/runtime/server/utils/wsPeerManager.d.ts +34 -0
- package/dist/runtime/server/utils/wsPeerManager.js +23 -0
- package/dist/runtime/server/worker/adapter.d.ts +4 -0
- package/dist/runtime/server/worker/adapter.js +65 -0
- package/dist/runtime/server/worker/runner/node.d.ts +27 -0
- package/dist/runtime/server/worker/runner/node.js +196 -0
- package/dist/runtime/types.d.ts +132 -0
- package/dist/types.d.mts +3 -0
- package/package.json +75 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UCard
|
|
3
|
+
class="min-w-[220px] max-w-[300px]"
|
|
4
|
+
:ui="{
|
|
5
|
+
body: 'p-0',
|
|
6
|
+
header: headerClass,
|
|
7
|
+
footer: footerClass
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<template #header>
|
|
11
|
+
<div class="flex items-center justify-between gap-2">
|
|
12
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
13
|
+
<UIcon
|
|
14
|
+
v-if="runnerIcon"
|
|
15
|
+
:name="runnerIcon"
|
|
16
|
+
class="size-4 flex-shrink-0"
|
|
17
|
+
:title="data?.workerId"
|
|
18
|
+
/>
|
|
19
|
+
<p
|
|
20
|
+
class="truncate font-medium"
|
|
21
|
+
:title="data?.label"
|
|
22
|
+
>
|
|
23
|
+
{{ data?.label }}
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
<UBadge
|
|
27
|
+
:label="(data?.status || 'idle').toUpperCase()"
|
|
28
|
+
size="xs"
|
|
29
|
+
:color="statusColor(data?.status)"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<div class="px-3 py-2 text-xs space-y-1">
|
|
35
|
+
<div class="flex items-center justify-between">
|
|
36
|
+
<span class="text-gray-500 dark:text-gray-400">Queue</span>
|
|
37
|
+
<span
|
|
38
|
+
class="truncate ml-2 font-mono"
|
|
39
|
+
:title="data?.queue"
|
|
40
|
+
>{{ data?.queue || "-" }}</span>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="flex items-center justify-between">
|
|
43
|
+
<span class="text-gray-500 dark:text-gray-400">Worker</span>
|
|
44
|
+
<span
|
|
45
|
+
class="truncate ml-2 font-mono"
|
|
46
|
+
:title="data?.workerId"
|
|
47
|
+
>{{ data?.workerId || "-" }}</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
v-if="data?.runtype"
|
|
51
|
+
class="flex items-center justify-between"
|
|
52
|
+
>
|
|
53
|
+
<span class="text-gray-500 dark:text-gray-400">Mode</span>
|
|
54
|
+
<UBadge
|
|
55
|
+
:label="data.runtype"
|
|
56
|
+
size="xs"
|
|
57
|
+
color="neutral"
|
|
58
|
+
variant="soft"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
<div
|
|
62
|
+
v-if="data?.emits && data.emits.length > 0"
|
|
63
|
+
class="flex items-start justify-between gap-2"
|
|
64
|
+
>
|
|
65
|
+
<span class="text-gray-500 dark:text-gray-400">Emits</span>
|
|
66
|
+
<div class="flex flex-wrap gap-1 justify-end">
|
|
67
|
+
<UBadge
|
|
68
|
+
v-for="event in data.emits"
|
|
69
|
+
:key="event"
|
|
70
|
+
:label="event"
|
|
71
|
+
size="xs"
|
|
72
|
+
color="primary"
|
|
73
|
+
variant="soft"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div
|
|
78
|
+
v-if="data?.attempt && data.attempt > 1"
|
|
79
|
+
class="flex items-center justify-between"
|
|
80
|
+
>
|
|
81
|
+
<span class="text-gray-500 dark:text-gray-400">Attempts</span>
|
|
82
|
+
<span class="ml-2 font-medium text-amber-600 dark:text-amber-400">
|
|
83
|
+
{{ data.attempt }}
|
|
84
|
+
</span>
|
|
85
|
+
</div>
|
|
86
|
+
<div
|
|
87
|
+
v-if="data?.error"
|
|
88
|
+
class="pt-1 border-t border-gray-200 dark:border-gray-700"
|
|
89
|
+
>
|
|
90
|
+
<span
|
|
91
|
+
class="text-red-500 dark:text-red-400 block truncate"
|
|
92
|
+
:title="data.error"
|
|
93
|
+
>
|
|
94
|
+
⚠️ {{ data.error }}
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<template #footer>
|
|
100
|
+
<div class="flex items-center justify-center gap-2 w-full">
|
|
101
|
+
<UButton
|
|
102
|
+
size="xs"
|
|
103
|
+
color="neutral"
|
|
104
|
+
label="Logs"
|
|
105
|
+
icon="i-heroicons-document-text-20-solid"
|
|
106
|
+
@click="handleAction('logs')"
|
|
107
|
+
/>
|
|
108
|
+
<UButton
|
|
109
|
+
size="xs"
|
|
110
|
+
color="neutral"
|
|
111
|
+
label="Details"
|
|
112
|
+
icon="i-heroicons-information-circle-20-solid"
|
|
113
|
+
@click="handleAction('details')"
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
</UCard>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script setup>
|
|
121
|
+
import { computed } from "#imports";
|
|
122
|
+
import { UCard, UButton, UBadge, UIcon } from "#components";
|
|
123
|
+
const props = defineProps({
|
|
124
|
+
id: { type: String, required: true },
|
|
125
|
+
data: { type: Object, required: true },
|
|
126
|
+
kind: { type: String, required: false }
|
|
127
|
+
});
|
|
128
|
+
const emit = defineEmits(["action"]);
|
|
129
|
+
function handleAction(action) {
|
|
130
|
+
emit("action", { id: props.id, action });
|
|
131
|
+
}
|
|
132
|
+
const headerClass = computed(() => props.kind === "entry" ? "px-3 py-2 bg-gradient-to-br from-emerald-800 to-emerald-700 text-emerald-50 rounded-t" : "px-3 py-2 bg-gradient-to-br from-gray-800 to-gray-700 text-gray-100 rounded-t");
|
|
133
|
+
const footerClass = computed(() => props.kind === "entry" ? "px-3 pb-2 pt-1" : "px-3 pb-2 pt-1");
|
|
134
|
+
const runnerIcon = computed(() => {
|
|
135
|
+
const runtime = props.data?.runtime;
|
|
136
|
+
if (runtime === "python") {
|
|
137
|
+
return "i-devicon-python";
|
|
138
|
+
}
|
|
139
|
+
if (runtime === "nodejs") {
|
|
140
|
+
return "i-devicon-nodejs";
|
|
141
|
+
}
|
|
142
|
+
return runtime ? "i-lucide-code" : void 0;
|
|
143
|
+
});
|
|
144
|
+
function statusColor(status) {
|
|
145
|
+
switch (status) {
|
|
146
|
+
case "running":
|
|
147
|
+
return "warning";
|
|
148
|
+
case "done":
|
|
149
|
+
return "success";
|
|
150
|
+
case "error":
|
|
151
|
+
return "error";
|
|
152
|
+
default:
|
|
153
|
+
return "neutral";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type Status = 'idle' | 'running' | 'error' | 'done' | string | undefined;
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
data: {
|
|
5
|
+
label?: string;
|
|
6
|
+
queue?: string;
|
|
7
|
+
workerId?: string;
|
|
8
|
+
status?: Status;
|
|
9
|
+
attempt?: number;
|
|
10
|
+
error?: string;
|
|
11
|
+
runtime?: 'nodejs' | 'python';
|
|
12
|
+
runtype?: 'inprocess' | 'task';
|
|
13
|
+
emits?: string[];
|
|
14
|
+
};
|
|
15
|
+
kind?: 'entry' | 'step';
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
+
action: (payload: {
|
|
19
|
+
id: string;
|
|
20
|
+
action: "run" | "logs" | "details";
|
|
21
|
+
}) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onAction?: ((payload: {
|
|
24
|
+
id: string;
|
|
25
|
+
action: "run" | "logs" | "details";
|
|
26
|
+
}) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
runStatus?: string;
|
|
3
|
+
startedAt?: string;
|
|
4
|
+
completedAt?: string;
|
|
5
|
+
steps: any[];
|
|
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,291 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col h-full">
|
|
3
|
+
<!-- Fixed Header with Run Stats -->
|
|
4
|
+
<div class="px-6 py-[17px] border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50 shrink-0">
|
|
5
|
+
<div class="flex items-center gap-4 text-xs">
|
|
6
|
+
<!-- Status -->
|
|
7
|
+
<div class="flex items-center gap-1.5">
|
|
8
|
+
<div
|
|
9
|
+
class="w-1.5 h-1.5 rounded-full"
|
|
10
|
+
:class="getStatusColor(runStatus)"
|
|
11
|
+
/>
|
|
12
|
+
<span class="text-gray-700 dark:text-gray-300 font-medium capitalize">
|
|
13
|
+
{{ runStatus || "unknown" }}
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Divider -->
|
|
18
|
+
<div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
|
|
19
|
+
|
|
20
|
+
<!-- Total Steps -->
|
|
21
|
+
<div class="flex items-center gap-1.5">
|
|
22
|
+
<UIcon
|
|
23
|
+
name="i-lucide-layers"
|
|
24
|
+
class="w-3 h-3 text-gray-500"
|
|
25
|
+
/>
|
|
26
|
+
<span class="text-gray-700 dark:text-gray-300">
|
|
27
|
+
{{ steps.length }} {{ steps.length === 1 ? "step" : "steps" }}
|
|
28
|
+
</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- Divider -->
|
|
32
|
+
<div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
|
|
33
|
+
|
|
34
|
+
<!-- Started -->
|
|
35
|
+
<div class="flex items-center gap-1.5">
|
|
36
|
+
<UIcon
|
|
37
|
+
name="i-lucide-clock"
|
|
38
|
+
class="w-3 h-3 text-gray-500"
|
|
39
|
+
/>
|
|
40
|
+
<span class="text-gray-600 dark:text-gray-400">
|
|
41
|
+
{{ startedAt ? formatTime(startedAt) : "Not started" }}
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- Divider -->
|
|
46
|
+
<div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
|
|
47
|
+
|
|
48
|
+
<!-- Duration -->
|
|
49
|
+
<div class="flex items-center gap-1.5">
|
|
50
|
+
<UIcon
|
|
51
|
+
name="i-lucide-timer"
|
|
52
|
+
class="w-3 h-3 text-gray-500"
|
|
53
|
+
/>
|
|
54
|
+
<span class="text-gray-600 dark:text-gray-400">
|
|
55
|
+
{{ getDuration(startedAt, completedAt) }}
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<!-- Scrollable Steps List -->
|
|
62
|
+
<div class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6">
|
|
63
|
+
<div
|
|
64
|
+
v-if="steps.length === 0"
|
|
65
|
+
class="h-full flex flex-col items-center justify-center text-gray-400 dark:text-gray-500"
|
|
66
|
+
>
|
|
67
|
+
<UIcon
|
|
68
|
+
name="i-lucide-layers"
|
|
69
|
+
class="w-12 h-12 mb-3 opacity-50"
|
|
70
|
+
/>
|
|
71
|
+
<span class="text-sm">No steps executed yet</span>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div
|
|
75
|
+
v-else
|
|
76
|
+
class="space-y-3"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
v-for="(step, idx) in steps"
|
|
80
|
+
:key="step.key"
|
|
81
|
+
class="relative"
|
|
82
|
+
>
|
|
83
|
+
<!-- Connecting Line -->
|
|
84
|
+
<div
|
|
85
|
+
v-if="idx < steps.length - 1"
|
|
86
|
+
class="absolute left-4 top-10 w-0.5 h-8 bg-gray-200 dark:bg-gray-800"
|
|
87
|
+
/>
|
|
88
|
+
|
|
89
|
+
<!-- Step Card -->
|
|
90
|
+
<div class="bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg p-4 hover:border-gray-300 dark:hover:border-gray-700 transition-colors">
|
|
91
|
+
<div class="flex items-start gap-3">
|
|
92
|
+
<!-- Status Icon -->
|
|
93
|
+
<div class="flex-shrink-0 mt-0.5">
|
|
94
|
+
<div
|
|
95
|
+
class="w-8 h-8 rounded-full flex items-center justify-center"
|
|
96
|
+
:class="getStepStatusBg(step.status)"
|
|
97
|
+
>
|
|
98
|
+
<UIcon
|
|
99
|
+
:name="getStepStatusIcon(step.status)"
|
|
100
|
+
class="w-4 h-4"
|
|
101
|
+
:class="getStepStatusIconColor(step.status)"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<!-- Step Details -->
|
|
107
|
+
<div class="flex-1 min-w-0">
|
|
108
|
+
<div class="flex items-start justify-between gap-2">
|
|
109
|
+
<div class="flex-1">
|
|
110
|
+
<h4 class="text-sm font-medium text-gray-900 dark:text-gray-100">
|
|
111
|
+
{{ step.key }}
|
|
112
|
+
</h4>
|
|
113
|
+
<div class="flex items-center gap-3 mt-1 text-xs text-gray-500">
|
|
114
|
+
<span
|
|
115
|
+
class="capitalize"
|
|
116
|
+
:class="getStepStatusTextColor(step.status)"
|
|
117
|
+
>
|
|
118
|
+
{{ step.status || "pending" }}
|
|
119
|
+
</span>
|
|
120
|
+
<span v-if="step.attempt && step.attempt > 1">
|
|
121
|
+
Attempt {{ step.attempt }}
|
|
122
|
+
</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<!-- Timing Info -->
|
|
128
|
+
<div
|
|
129
|
+
v-if="step.startedAt || step.completedAt"
|
|
130
|
+
class="mt-2 flex items-center gap-4 text-xs text-gray-500"
|
|
131
|
+
>
|
|
132
|
+
<div
|
|
133
|
+
v-if="step.startedAt"
|
|
134
|
+
class="flex items-center gap-1"
|
|
135
|
+
>
|
|
136
|
+
<UIcon
|
|
137
|
+
name="i-lucide-clock"
|
|
138
|
+
class="w-3 h-3"
|
|
139
|
+
/>
|
|
140
|
+
<span>{{ formatTime(step.startedAt) }}</span>
|
|
141
|
+
</div>
|
|
142
|
+
<div
|
|
143
|
+
v-if="step.completedAt"
|
|
144
|
+
class="flex items-center gap-1"
|
|
145
|
+
>
|
|
146
|
+
<UIcon
|
|
147
|
+
name="i-lucide-check-circle"
|
|
148
|
+
class="w-3 h-3"
|
|
149
|
+
/>
|
|
150
|
+
<span>{{ formatTime(step.completedAt) }}</span>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<!-- Error Message -->
|
|
155
|
+
<div
|
|
156
|
+
v-if="step.error"
|
|
157
|
+
class="mt-2 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"
|
|
158
|
+
>
|
|
159
|
+
<div class="flex items-start gap-1">
|
|
160
|
+
<UIcon
|
|
161
|
+
name="i-lucide-alert-circle"
|
|
162
|
+
class="w-3 h-3 flex-shrink-0 mt-0.5"
|
|
163
|
+
/>
|
|
164
|
+
<span>{{ step.error }}</span>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<!-- Await Info -->
|
|
169
|
+
<div
|
|
170
|
+
v-if="step.awaitType"
|
|
171
|
+
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"
|
|
172
|
+
>
|
|
173
|
+
<div class="flex items-center gap-1">
|
|
174
|
+
<UIcon
|
|
175
|
+
name="i-lucide-timer"
|
|
176
|
+
class="w-3 h-3"
|
|
177
|
+
/>
|
|
178
|
+
<span>Waiting: {{ step.awaitType }}</span>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</template>
|
|
189
|
+
|
|
190
|
+
<script setup>
|
|
191
|
+
import { UIcon } from "#components";
|
|
192
|
+
defineProps({
|
|
193
|
+
runStatus: { type: String, required: false },
|
|
194
|
+
startedAt: { type: String, required: false },
|
|
195
|
+
completedAt: { type: String, required: false },
|
|
196
|
+
steps: { type: Array, required: true }
|
|
197
|
+
});
|
|
198
|
+
const formatTime = (timestamp) => {
|
|
199
|
+
const date = new Date(timestamp);
|
|
200
|
+
const now = /* @__PURE__ */ new Date();
|
|
201
|
+
const diff = now.getTime() - date.getTime();
|
|
202
|
+
const seconds = Math.floor(diff / 1e3);
|
|
203
|
+
const minutes = Math.floor(seconds / 60);
|
|
204
|
+
const hours = Math.floor(minutes / 60);
|
|
205
|
+
const days = Math.floor(hours / 24);
|
|
206
|
+
if (days > 0)
|
|
207
|
+
return `${days}d ago`;
|
|
208
|
+
if (hours > 0)
|
|
209
|
+
return `${hours}h ago`;
|
|
210
|
+
if (minutes > 0)
|
|
211
|
+
return `${minutes}m ago`;
|
|
212
|
+
if (seconds > 10)
|
|
213
|
+
return `${seconds}s ago`;
|
|
214
|
+
return "just now";
|
|
215
|
+
};
|
|
216
|
+
const getDuration = (start, end) => {
|
|
217
|
+
if (!start)
|
|
218
|
+
return "\u2014";
|
|
219
|
+
const startTime = new Date(start).getTime();
|
|
220
|
+
const endTime = end ? new Date(end).getTime() : Date.now();
|
|
221
|
+
const diff = endTime - startTime;
|
|
222
|
+
const seconds = Math.floor(diff / 1e3);
|
|
223
|
+
const minutes = Math.floor(seconds / 60);
|
|
224
|
+
const hours = Math.floor(minutes / 60);
|
|
225
|
+
if (hours > 0)
|
|
226
|
+
return `${hours}h ${minutes % 60}m`;
|
|
227
|
+
if (minutes > 0)
|
|
228
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
229
|
+
return `${seconds}s`;
|
|
230
|
+
};
|
|
231
|
+
const getStatusColor = (status) => {
|
|
232
|
+
switch (status) {
|
|
233
|
+
case "completed":
|
|
234
|
+
return "bg-emerald-500";
|
|
235
|
+
case "failed":
|
|
236
|
+
return "bg-red-500";
|
|
237
|
+
case "running":
|
|
238
|
+
return "bg-blue-500 animate-pulse";
|
|
239
|
+
default:
|
|
240
|
+
return "bg-gray-300";
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
const getStepStatusBg = (status) => {
|
|
244
|
+
switch (status) {
|
|
245
|
+
case "completed":
|
|
246
|
+
return "bg-emerald-50 dark:bg-emerald-900/20";
|
|
247
|
+
case "failed":
|
|
248
|
+
return "bg-red-50 dark:bg-red-900/20";
|
|
249
|
+
case "running":
|
|
250
|
+
return "bg-blue-50 dark:bg-blue-900/20";
|
|
251
|
+
default:
|
|
252
|
+
return "bg-gray-50 dark:bg-gray-900/20";
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
const getStepStatusIcon = (status) => {
|
|
256
|
+
switch (status) {
|
|
257
|
+
case "completed":
|
|
258
|
+
return "i-lucide-check-circle";
|
|
259
|
+
case "failed":
|
|
260
|
+
return "i-lucide-x-circle";
|
|
261
|
+
case "running":
|
|
262
|
+
return "i-lucide-loader-circle";
|
|
263
|
+
default:
|
|
264
|
+
return "i-lucide-circle";
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const getStepStatusIconColor = (status) => {
|
|
268
|
+
switch (status) {
|
|
269
|
+
case "completed":
|
|
270
|
+
return "text-emerald-600 dark:text-emerald-400";
|
|
271
|
+
case "failed":
|
|
272
|
+
return "text-red-600 dark:text-red-400";
|
|
273
|
+
case "running":
|
|
274
|
+
return "text-blue-600 dark:text-blue-400 animate-spin";
|
|
275
|
+
default:
|
|
276
|
+
return "text-gray-400";
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
const getStepStatusTextColor = (status) => {
|
|
280
|
+
switch (status) {
|
|
281
|
+
case "completed":
|
|
282
|
+
return "text-emerald-600 dark:text-emerald-400";
|
|
283
|
+
case "failed":
|
|
284
|
+
return "text-red-600 dark:text-red-400";
|
|
285
|
+
case "running":
|
|
286
|
+
return "text-blue-600 dark:text-blue-400";
|
|
287
|
+
default:
|
|
288
|
+
return "text-gray-500";
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
runStatus?: string;
|
|
3
|
+
startedAt?: string;
|
|
4
|
+
completedAt?: string;
|
|
5
|
+
steps: any[];
|
|
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,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isRunning?: boolean;
|
|
3
|
+
isCompleted?: boolean;
|
|
4
|
+
isFailed?: boolean;
|
|
5
|
+
isReconnecting?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
isRunning: boolean;
|
|
9
|
+
isCompleted: boolean;
|
|
10
|
+
isFailed: boolean;
|
|
11
|
+
isReconnecting: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flex items-center gap-1.5 px-1.5 py-0.5 rounded text-xs border shrink-0"
|
|
4
|
+
:class="{
|
|
5
|
+
'bg-emerald-50 dark:bg-emerald-950/30 border-emerald-200 dark:border-emerald-800': isCompleted,
|
|
6
|
+
'bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800': isFailed,
|
|
7
|
+
'bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800': isRunning,
|
|
8
|
+
'bg-gray-50 dark:bg-gray-900/30 border-gray-200 dark:border-gray-800': isIdle
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="w-1 h-1 rounded-full"
|
|
13
|
+
:class="{
|
|
14
|
+
'bg-emerald-500': isCompleted,
|
|
15
|
+
'bg-red-500': isFailed,
|
|
16
|
+
'bg-blue-500 animate-pulse': isRunning && !isReconnecting,
|
|
17
|
+
'bg-amber-500 animate-pulse': isReconnecting,
|
|
18
|
+
'bg-gray-400': isIdle
|
|
19
|
+
}"
|
|
20
|
+
/>
|
|
21
|
+
<span
|
|
22
|
+
class="text-[10px] font-medium uppercase tracking-wider"
|
|
23
|
+
:class="{
|
|
24
|
+
'text-emerald-700 dark:text-emerald-400': isCompleted,
|
|
25
|
+
'text-red-700 dark:text-red-400': isFailed,
|
|
26
|
+
'text-blue-700 dark:text-blue-400': isRunning,
|
|
27
|
+
'text-gray-600 dark:text-gray-400': isIdle
|
|
28
|
+
}"
|
|
29
|
+
>
|
|
30
|
+
<template v-if="isReconnecting">
|
|
31
|
+
Reconnecting
|
|
32
|
+
</template>
|
|
33
|
+
<template v-else-if="isRunning">
|
|
34
|
+
Running
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else-if="isCompleted">
|
|
37
|
+
Done
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else-if="isFailed">
|
|
40
|
+
Failed
|
|
41
|
+
</template>
|
|
42
|
+
<template v-else>
|
|
43
|
+
Idle
|
|
44
|
+
</template>
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
import { computed } from "#imports";
|
|
51
|
+
const props = defineProps({
|
|
52
|
+
isRunning: { type: Boolean, required: false, default: false },
|
|
53
|
+
isCompleted: { type: Boolean, required: false, default: false },
|
|
54
|
+
isFailed: { type: Boolean, required: false, default: false },
|
|
55
|
+
isReconnecting: { type: Boolean, required: false, default: false }
|
|
56
|
+
});
|
|
57
|
+
const isIdle = computed(() => {
|
|
58
|
+
return !props.isRunning && !props.isCompleted && !props.isFailed;
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isRunning?: boolean;
|
|
3
|
+
isCompleted?: boolean;
|
|
4
|
+
isFailed?: boolean;
|
|
5
|
+
isReconnecting?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
isRunning: boolean;
|
|
9
|
+
isCompleted: boolean;
|
|
10
|
+
isFailed: boolean;
|
|
11
|
+
isReconnecting: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
events: any[];
|
|
3
|
+
logs: any[];
|
|
4
|
+
isLive?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
export: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onExport?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|