@nvent-addon/app 0.4.5

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 (99) hide show
  1. package/dist/module.d.mts +6 -0
  2. package/dist/module.json +9 -0
  3. package/dist/module.mjs +42 -0
  4. package/dist/runtime/app/assets/vueflow.css +1 -0
  5. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +33 -0
  6. package/dist/runtime/app/components/ConfirmDialog.vue +121 -0
  7. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +33 -0
  8. package/dist/runtime/app/components/FlowDiagram.d.vue.ts +65 -0
  9. package/dist/runtime/app/components/FlowDiagram.vue +341 -0
  10. package/dist/runtime/app/components/FlowDiagram.vue.d.ts +65 -0
  11. package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +29 -0
  12. package/dist/runtime/app/components/FlowNodeCard.vue +158 -0
  13. package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +29 -0
  14. package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +17 -0
  15. package/dist/runtime/app/components/FlowRunOverview.vue +188 -0
  16. package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +17 -0
  17. package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +18 -0
  18. package/dist/runtime/app/components/FlowRunStatusBadge.vue +74 -0
  19. package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +18 -0
  20. package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +12 -0
  21. package/dist/runtime/app/components/FlowRunTimeline.vue +127 -0
  22. package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +12 -0
  23. package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +16 -0
  24. package/dist/runtime/app/components/FlowScheduleDialog.vue +226 -0
  25. package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +16 -0
  26. package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +12 -0
  27. package/dist/runtime/app/components/FlowSchedulesList.vue +99 -0
  28. package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +12 -0
  29. package/dist/runtime/app/components/FlowStepSelector.d.vue.ts +22 -0
  30. package/dist/runtime/app/components/FlowStepSelector.vue +238 -0
  31. package/dist/runtime/app/components/FlowStepSelector.vue.d.ts +22 -0
  32. package/dist/runtime/app/components/JobScheduling.d.vue.ts +6 -0
  33. package/dist/runtime/app/components/JobScheduling.vue +203 -0
  34. package/dist/runtime/app/components/JobScheduling.vue.d.ts +6 -0
  35. package/dist/runtime/app/components/ListItem.d.vue.ts +23 -0
  36. package/dist/runtime/app/components/ListItem.vue +70 -0
  37. package/dist/runtime/app/components/ListItem.vue.d.ts +23 -0
  38. package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +45 -0
  39. package/dist/runtime/app/components/QueueConfigDetails.vue +412 -0
  40. package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +45 -0
  41. package/dist/runtime/app/components/StatCounter.d.vue.ts +9 -0
  42. package/dist/runtime/app/components/StatCounter.vue +25 -0
  43. package/dist/runtime/app/components/StatCounter.vue.d.ts +9 -0
  44. package/dist/runtime/app/components/TimelineList.d.vue.ts +7 -0
  45. package/dist/runtime/app/components/TimelineList.vue +211 -0
  46. package/dist/runtime/app/components/TimelineList.vue.d.ts +7 -0
  47. package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +46 -0
  48. package/dist/runtime/app/components/nhealth/component-router.vue +26 -0
  49. package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +46 -0
  50. package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +24 -0
  51. package/dist/runtime/app/components/nhealth/component-shell.vue +89 -0
  52. package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +24 -0
  53. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +14 -0
  54. package/dist/runtime/app/composables/useAnalyzedFlows.js +8 -0
  55. package/dist/runtime/app/composables/useComponentRouter.d.ts +38 -0
  56. package/dist/runtime/app/composables/useComponentRouter.js +240 -0
  57. package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +82 -0
  58. package/dist/runtime/app/composables/useFlowRunTimeline.js +67 -0
  59. package/dist/runtime/app/composables/useFlowRuns.d.ts +18 -0
  60. package/dist/runtime/app/composables/useFlowRuns.js +32 -0
  61. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +24 -0
  62. package/dist/runtime/app/composables/useFlowRunsInfinite.js +123 -0
  63. package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +9 -0
  64. package/dist/runtime/app/composables/useFlowRunsPolling.js +33 -0
  65. package/dist/runtime/app/composables/useFlowState.d.ts +127 -0
  66. package/dist/runtime/app/composables/useFlowState.js +225 -0
  67. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +27 -0
  68. package/dist/runtime/app/composables/useFlowWebSocket.js +222 -0
  69. package/dist/runtime/app/composables/useFlowsNavigation.d.ts +10 -0
  70. package/dist/runtime/app/composables/useFlowsNavigation.js +58 -0
  71. package/dist/runtime/app/composables/useQueueJobs.d.ts +26 -0
  72. package/dist/runtime/app/composables/useQueueJobs.js +20 -0
  73. package/dist/runtime/app/composables/useQueueUpdates.d.ts +24 -0
  74. package/dist/runtime/app/composables/useQueueUpdates.js +54 -0
  75. package/dist/runtime/app/composables/useQueues.d.ts +45 -0
  76. package/dist/runtime/app/composables/useQueues.js +26 -0
  77. package/dist/runtime/app/composables/useQueuesLive.d.ts +16 -0
  78. package/dist/runtime/app/composables/useQueuesLive.js +62 -0
  79. package/dist/runtime/app/composables/useQueuesWebSocket.d.ts +17 -0
  80. package/dist/runtime/app/composables/useQueuesWebSocket.js +159 -0
  81. package/dist/runtime/app/pages/flows/index.d.vue.ts +3 -0
  82. package/dist/runtime/app/pages/flows/index.vue +683 -0
  83. package/dist/runtime/app/pages/flows/index.vue.d.ts +3 -0
  84. package/dist/runtime/app/pages/index.d.vue.ts +3 -0
  85. package/dist/runtime/app/pages/index.vue +34 -0
  86. package/dist/runtime/app/pages/index.vue.d.ts +3 -0
  87. package/dist/runtime/app/pages/queues/index.d.vue.ts +3 -0
  88. package/dist/runtime/app/pages/queues/index.vue +229 -0
  89. package/dist/runtime/app/pages/queues/index.vue.d.ts +3 -0
  90. package/dist/runtime/app/pages/queues/job.d.vue.ts +3 -0
  91. package/dist/runtime/app/pages/queues/job.vue +262 -0
  92. package/dist/runtime/app/pages/queues/job.vue.d.ts +3 -0
  93. package/dist/runtime/app/pages/queues/jobs.d.vue.ts +3 -0
  94. package/dist/runtime/app/pages/queues/jobs.vue +291 -0
  95. package/dist/runtime/app/pages/queues/jobs.vue.d.ts +3 -0
  96. package/dist/runtime/app/plugins/vueflow.client.d.ts +2 -0
  97. package/dist/runtime/app/plugins/vueflow.client.js +11 -0
  98. package/dist/types.d.mts +7 -0
  99. package/package.json +47 -0
@@ -0,0 +1,65 @@
1
+ interface FlowEntry {
2
+ step: string;
3
+ queue: string;
4
+ workerId: string;
5
+ runtime?: 'nodejs' | 'python';
6
+ runtype?: 'inprocess' | 'task';
7
+ emits?: string[];
8
+ }
9
+ interface FlowStep {
10
+ queue: string;
11
+ workerId: string;
12
+ subscribes?: string[];
13
+ runtime?: 'nodejs' | 'python';
14
+ runtype?: 'inprocess' | 'task';
15
+ emits?: string[];
16
+ }
17
+ interface AnalyzedStep extends FlowStep {
18
+ name: string;
19
+ dependsOn: string[];
20
+ triggers: string[];
21
+ level: number;
22
+ }
23
+ interface FlowMeta {
24
+ id: string;
25
+ entry?: FlowEntry;
26
+ steps?: Record<string, FlowStep>;
27
+ analyzed?: {
28
+ levels: string[][];
29
+ maxLevel: number;
30
+ steps: Record<string, AnalyzedStep>;
31
+ };
32
+ }
33
+ interface StepStatus {
34
+ status: 'pending' | 'running' | 'completed' | 'failed' | 'retrying' | 'waiting' | 'timeout' | 'canceled';
35
+ attempt?: number;
36
+ error?: string;
37
+ }
38
+ type __VLS_Props = {
39
+ flow?: FlowMeta | null;
40
+ heightClass?: string;
41
+ showControls?: boolean;
42
+ showMiniMap?: boolean;
43
+ showBackground?: boolean;
44
+ stepStates?: Record<string, StepStatus>;
45
+ flowStatus?: 'running' | 'completed' | 'failed' | 'canceled';
46
+ };
47
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
48
+ nodeSelected: (payload: {
49
+ id: string;
50
+ }) => any;
51
+ nodeAction: (payload: {
52
+ id: string;
53
+ action: "run" | "logs" | "details";
54
+ }) => any;
55
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
56
+ onNodeSelected?: ((payload: {
57
+ id: string;
58
+ }) => any) | undefined;
59
+ onNodeAction?: ((payload: {
60
+ id: string;
61
+ action: "run" | "logs" | "details";
62
+ }) => any) | undefined;
63
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
64
+ declare const _default: typeof __VLS_export;
65
+ export default _default;
@@ -0,0 +1,29 @@
1
+ type Status = 'idle' | 'running' | 'error' | 'done' | 'canceled' | 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,158 @@
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
+ case "canceled":
153
+ return "orange";
154
+ default:
155
+ return "neutral";
156
+ }
157
+ }
158
+ </script>
@@ -0,0 +1,29 @@
1
+ type Status = 'idle' | 'running' | 'error' | 'done' | 'canceled' | 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,17 @@
1
+ type __VLS_Props = {
2
+ runStatus?: string;
3
+ startedAt?: string | number;
4
+ completedAt?: string | number;
5
+ steps: any[];
6
+ flowName?: string;
7
+ runId?: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "select-step": (stepKey: string | null) => any;
11
+ "cancel-flow": () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onSelect-step"?: ((stepKey: string | null) => any) | undefined;
14
+ "onCancel-flow"?: (() => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,188 @@
1
+ <template>
2
+ <div class="flex flex-col h-full w-full max-w-full min-w-0">
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 justify-between gap-4 text-xs">
6
+ <div class="flex items-center gap-4">
7
+ <!-- Status -->
8
+ <div class="flex items-center gap-1.5">
9
+ <div
10
+ class="w-1.5 h-1.5 rounded-full"
11
+ :class="getStatusColor(runStatus)"
12
+ />
13
+ <span class="text-gray-700 dark:text-gray-300 font-medium capitalize">
14
+ {{ runStatus || "unknown" }}
15
+ </span>
16
+ </div>
17
+
18
+ <!-- Divider -->
19
+ <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
20
+
21
+ <!-- Total Steps -->
22
+ <div class="flex items-center gap-1.5">
23
+ <UIcon
24
+ name="i-lucide-layers"
25
+ class="w-3 h-3 text-gray-500"
26
+ />
27
+ <span class="text-gray-700 dark:text-gray-300">
28
+ {{ steps.length }} {{ steps.length === 1 ? "step" : "steps" }}
29
+ </span>
30
+ </div>
31
+
32
+ <!-- Divider -->
33
+ <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
34
+
35
+ <!-- Started -->
36
+ <div class="flex items-center gap-1.5">
37
+ <UIcon
38
+ name="i-lucide-clock"
39
+ class="w-3 h-3 text-gray-500"
40
+ />
41
+ <span class="text-gray-600 dark:text-gray-400">
42
+ {{ startedAt ? formatTime(startedAt) : "Not started" }}
43
+ </span>
44
+ </div>
45
+
46
+ <!-- Divider -->
47
+ <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
48
+
49
+ <!-- Duration -->
50
+ <div class="flex items-center gap-1.5">
51
+ <UIcon
52
+ name="i-lucide-timer"
53
+ class="w-3 h-3 text-gray-500"
54
+ />
55
+ <span class="text-gray-600 dark:text-gray-400">
56
+ {{ getDuration(startedAt, completedAt) }}
57
+ </span>
58
+ </div>
59
+ </div>
60
+
61
+ <!-- Cancel Button (only show for running flows) -->
62
+ <UButton
63
+ v-if="runStatus === 'running'"
64
+ color="neutral"
65
+ variant="ghost"
66
+ icon="i-lucide-x-circle"
67
+ size="xs"
68
+ label="Cancel"
69
+ @click="handleCancelFlow"
70
+ />
71
+ </div>
72
+ </div>
73
+
74
+ <!-- Scrollable Steps List -->
75
+ <div class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6">
76
+ <div
77
+ v-if="steps.length === 0"
78
+ class="h-full flex flex-col items-center justify-center text-gray-400 dark:text-gray-500"
79
+ >
80
+ <UIcon
81
+ name="i-lucide-layers"
82
+ class="w-12 h-12 mb-3 opacity-50"
83
+ />
84
+ <span class="text-sm">No steps executed yet</span>
85
+ </div>
86
+
87
+ <FlowStepSelector
88
+ v-else
89
+ v-model="selectedStep"
90
+ :items="radioItems"
91
+ />
92
+ </div>
93
+ </div>
94
+ </template>
95
+
96
+ <script setup>
97
+ import { ref, computed, watch } from "#imports";
98
+ import { UIcon, UButton } from "#components";
99
+ import FlowStepSelector from "./FlowStepSelector.vue";
100
+ const props = defineProps({
101
+ runStatus: { type: String, required: false },
102
+ startedAt: { type: [String, Number], required: false },
103
+ completedAt: { type: [String, Number], required: false },
104
+ steps: { type: Array, required: true },
105
+ flowName: { type: String, required: false },
106
+ runId: { type: String, required: false }
107
+ });
108
+ const emit = defineEmits(["select-step", "cancel-flow"]);
109
+ const handleCancelFlow = () => {
110
+ emit("cancel-flow");
111
+ };
112
+ const selectedStep = ref("all-steps");
113
+ const firstStepKey = computed(() => props.steps[0]?.key);
114
+ watch(firstStepKey, (newKey, oldKey) => {
115
+ if (oldKey !== void 0 && newKey !== oldKey) {
116
+ selectedStep.value = "all-steps";
117
+ }
118
+ });
119
+ watch(selectedStep, (newStep) => {
120
+ emit("select-step", newStep === "all-steps" ? null : newStep);
121
+ });
122
+ const radioItems = computed(() => {
123
+ const allItem = {
124
+ value: "all-steps",
125
+ label: "All Steps",
126
+ step: {
127
+ key: "All Steps",
128
+ status: null,
129
+ showAllIndicator: true
130
+ }
131
+ };
132
+ const stepItems = props.steps.map((step) => ({
133
+ value: step.key,
134
+ label: step.key,
135
+ step
136
+ }));
137
+ return [allItem, ...stepItems];
138
+ });
139
+ const formatTime = (timestamp) => {
140
+ const date = new Date(timestamp);
141
+ const now = /* @__PURE__ */ new Date();
142
+ const diff = now.getTime() - date.getTime();
143
+ const seconds = Math.floor(diff / 1e3);
144
+ const minutes = Math.floor(seconds / 60);
145
+ const hours = Math.floor(minutes / 60);
146
+ const days = Math.floor(hours / 24);
147
+ if (days > 0)
148
+ return `${days}d ago`;
149
+ if (hours > 0)
150
+ return `${hours}h ago`;
151
+ if (minutes > 0)
152
+ return `${minutes}m ago`;
153
+ if (seconds > 10)
154
+ return `${seconds}s ago`;
155
+ return "just now";
156
+ };
157
+ const getDuration = (start, end) => {
158
+ if (!start)
159
+ return "\u2014";
160
+ const startTime = new Date(start).getTime();
161
+ const endTime = end ? new Date(end).getTime() : Date.now();
162
+ const diff = endTime - startTime;
163
+ const seconds = Math.floor(diff / 1e3);
164
+ const minutes = Math.floor(seconds / 60);
165
+ const hours = Math.floor(minutes / 60);
166
+ if (hours > 0)
167
+ return `${hours}h ${minutes % 60}m`;
168
+ if (minutes > 0)
169
+ return `${minutes}m ${seconds % 60}s`;
170
+ return `${seconds}s`;
171
+ };
172
+ const getStatusColor = (status) => {
173
+ switch (status) {
174
+ case "completed":
175
+ return "bg-emerald-500";
176
+ case "failed":
177
+ return "bg-red-500";
178
+ case "running":
179
+ return "bg-blue-500 animate-pulse";
180
+ case "canceled":
181
+ return "bg-orange-500";
182
+ case "stalled":
183
+ return "bg-amber-600";
184
+ default:
185
+ return "bg-gray-300";
186
+ }
187
+ };
188
+ </script>
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ runStatus?: string;
3
+ startedAt?: string | number;
4
+ completedAt?: string | number;
5
+ steps: any[];
6
+ flowName?: string;
7
+ runId?: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "select-step": (stepKey: string | null) => any;
11
+ "cancel-flow": () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onSelect-step"?: ((stepKey: string | null) => any) | undefined;
14
+ "onCancel-flow"?: (() => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,18 @@
1
+ interface Props {
2
+ isRunning?: boolean;
3
+ isCompleted?: boolean;
4
+ isFailed?: boolean;
5
+ isCanceled?: boolean;
6
+ isStalled?: boolean;
7
+ isReconnecting?: boolean;
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
10
+ isRunning: boolean;
11
+ isCompleted: boolean;
12
+ isFailed: boolean;
13
+ isCanceled: boolean;
14
+ isStalled: boolean;
15
+ isReconnecting: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,74 @@
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-orange-50 dark:bg-orange-950/30 border-orange-200 dark:border-orange-800': isCanceled,
9
+ 'bg-amber-50 dark:bg-amber-950/30 border-amber-200 dark:border-amber-800': isStalled,
10
+ 'bg-gray-50 dark:bg-gray-900/30 border-gray-200 dark:border-gray-800': isIdle
11
+ }"
12
+ >
13
+ <div
14
+ class="w-1 h-1 rounded-full"
15
+ :class="{
16
+ 'bg-emerald-500': isCompleted,
17
+ 'bg-red-500': isFailed,
18
+ 'bg-blue-500 animate-pulse': isRunning && !isReconnecting,
19
+ 'bg-amber-500 animate-pulse': isReconnecting,
20
+ 'bg-orange-500': isCanceled,
21
+ 'bg-amber-600': isStalled,
22
+ 'bg-gray-400': isIdle
23
+ }"
24
+ />
25
+ <span
26
+ class="text-[10px] font-medium uppercase tracking-wider"
27
+ :class="{
28
+ 'text-emerald-700 dark:text-emerald-400': isCompleted,
29
+ 'text-red-700 dark:text-red-400': isFailed,
30
+ 'text-blue-700 dark:text-blue-400': isRunning,
31
+ 'text-orange-700 dark:text-orange-400': isCanceled,
32
+ 'text-amber-700 dark:text-amber-400': isStalled,
33
+ 'text-gray-600 dark:text-gray-400': isIdle
34
+ }"
35
+ >
36
+ <template v-if="isReconnecting">
37
+ Reconnecting
38
+ </template>
39
+ <template v-else-if="isRunning">
40
+ Running
41
+ </template>
42
+ <template v-else-if="isCompleted">
43
+ Done
44
+ </template>
45
+ <template v-else-if="isFailed">
46
+ Failed
47
+ </template>
48
+ <template v-else-if="isCanceled">
49
+ Canceled
50
+ </template>
51
+ <template v-else-if="isStalled">
52
+ Stalled
53
+ </template>
54
+ <template v-else>
55
+ Idle
56
+ </template>
57
+ </span>
58
+ </div>
59
+ </template>
60
+
61
+ <script setup>
62
+ import { computed } from "#imports";
63
+ const props = defineProps({
64
+ isRunning: { type: Boolean, required: false, default: false },
65
+ isCompleted: { type: Boolean, required: false, default: false },
66
+ isFailed: { type: Boolean, required: false, default: false },
67
+ isCanceled: { type: Boolean, required: false, default: false },
68
+ isStalled: { type: Boolean, required: false, default: false },
69
+ isReconnecting: { type: Boolean, required: false, default: false }
70
+ });
71
+ const isIdle = computed(() => {
72
+ return !props.isRunning && !props.isCompleted && !props.isFailed && !props.isCanceled && !props.isStalled;
73
+ });
74
+ </script>
@@ -0,0 +1,18 @@
1
+ interface Props {
2
+ isRunning?: boolean;
3
+ isCompleted?: boolean;
4
+ isFailed?: boolean;
5
+ isCanceled?: boolean;
6
+ isStalled?: boolean;
7
+ isReconnecting?: boolean;
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
10
+ isRunning: boolean;
11
+ isCompleted: boolean;
12
+ isFailed: boolean;
13
+ isCanceled: boolean;
14
+ isStalled: boolean;
15
+ isReconnecting: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ 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;