@nvent-addon/app 0.5.9 → 0.5.11
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/dist/module.json +1 -1
- package/dist/runtime/app/components/ComponentRouter.d.vue.ts +5 -1
- package/dist/runtime/app/components/ComponentRouter.vue.d.ts +5 -1
- package/dist/runtime/app/components/ComponentShell.d.vue.ts +6 -3
- package/dist/runtime/app/components/ComponentShell.vue.d.ts +6 -3
- package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +6 -1
- package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +6 -1
- package/dist/runtime/app/components/DashboardCard.d.vue.ts +4 -1
- package/dist/runtime/app/components/DashboardCard.vue.d.ts +4 -1
- package/dist/runtime/app/components/SelectableListItem.d.vue.ts +5 -5
- package/dist/runtime/app/components/SelectableListItem.vue.d.ts +5 -5
- package/dist/runtime/app/components/StatCard.d.vue.ts +3 -1
- package/dist/runtime/app/components/StatCard.vue.d.ts +3 -1
- package/dist/runtime/app/components/flow/RunStatusBadge.d.vue.ts +9 -1
- package/dist/runtime/app/components/flow/RunStatusBadge.vue.d.ts +9 -1
- package/dist/runtime/app/composables/useFlowRunsUpdates.d.ts +12 -0
- package/dist/runtime/app/composables/useFlowRunsUpdates.js +59 -0
- package/dist/runtime/app/pages/flows/[name].vue +9 -31
- package/package.json +8 -8
package/dist/module.json
CHANGED
|
@@ -31,7 +31,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
31
31
|
params: Record<string, string>;
|
|
32
32
|
query: Record<string, any>;
|
|
33
33
|
} | undefined>;
|
|
34
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
35
|
+
mode: ComponentRouterMode;
|
|
36
|
+
base: string;
|
|
37
|
+
debug: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
40
|
declare const _default: typeof __VLS_export;
|
|
37
41
|
export default _default;
|
|
@@ -31,7 +31,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
31
31
|
params: Record<string, string>;
|
|
32
32
|
query: Record<string, any>;
|
|
33
33
|
} | undefined>;
|
|
34
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
35
|
+
mode: ComponentRouterMode;
|
|
36
|
+
base: string;
|
|
37
|
+
debug: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
40
|
declare const _default: typeof __VLS_export;
|
|
37
41
|
export default _default;
|
|
@@ -5,11 +5,14 @@ type __VLS_Props = {
|
|
|
5
5
|
activeMatch?: 'exact' | 'prefix';
|
|
6
6
|
fullPage?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_6: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_6) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
orientation: "horizontal" | "vertical";
|
|
14
|
+
activeMatch: "exact" | "prefix";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
17
|
declare const _default: typeof __VLS_export;
|
|
15
18
|
export default _default;
|
|
@@ -5,11 +5,14 @@ type __VLS_Props = {
|
|
|
5
5
|
activeMatch?: 'exact' | 'prefix';
|
|
6
6
|
fullPage?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_6: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_6) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
orientation: "horizontal" | "vertical";
|
|
14
|
+
activeMatch: "exact" | "prefix";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
17
|
declare const _default: typeof __VLS_export;
|
|
15
18
|
export default _default;
|
|
@@ -23,6 +23,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
23
23
|
onCancel?: (() => any) | undefined;
|
|
24
24
|
onConfirm?: (() => any) | undefined;
|
|
25
25
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
26
|
-
}>, {
|
|
26
|
+
}>, {
|
|
27
|
+
confirmLabel: string;
|
|
28
|
+
cancelLabel: string;
|
|
29
|
+
confirmColor: "primary" | "error" | "warning" | "success";
|
|
30
|
+
iconColor: "primary" | "error" | "warning" | "success" | "info";
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
32
|
declare const _default: typeof __VLS_export;
|
|
28
33
|
export default _default;
|
|
@@ -23,6 +23,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
23
23
|
onCancel?: (() => any) | undefined;
|
|
24
24
|
onConfirm?: (() => any) | undefined;
|
|
25
25
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
26
|
-
}>, {
|
|
26
|
+
}>, {
|
|
27
|
+
confirmLabel: string;
|
|
28
|
+
cancelLabel: string;
|
|
29
|
+
confirmColor: "primary" | "error" | "warning" | "success";
|
|
30
|
+
iconColor: "primary" | "error" | "warning" | "success" | "info";
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
32
|
declare const _default: typeof __VLS_export;
|
|
28
33
|
export default _default;
|
|
@@ -10,6 +10,9 @@ interface Props {
|
|
|
10
10
|
color: 'blue' | 'purple' | 'amber' | 'emerald' | 'red';
|
|
11
11
|
onClick?: () => void;
|
|
12
12
|
}
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
secondaryStats: Stat[];
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
17
|
declare const _default: typeof __VLS_export;
|
|
15
18
|
export default _default;
|
|
@@ -10,6 +10,9 @@ interface Props {
|
|
|
10
10
|
color: 'blue' | 'purple' | 'amber' | 'emerald' | 'red';
|
|
11
11
|
onClick?: () => void;
|
|
12
12
|
}
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
secondaryStats: Stat[];
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
17
|
declare const _default: typeof __VLS_export;
|
|
15
18
|
export default _default;
|
|
@@ -9,17 +9,17 @@ type __VLS_Props = {
|
|
|
9
9
|
meta?: string;
|
|
10
10
|
metaSecondary?: string;
|
|
11
11
|
};
|
|
12
|
-
declare var __VLS_1: {},
|
|
12
|
+
declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {}, __VLS_17: {}, __VLS_19: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
icon?: (props: typeof __VLS_1) => any;
|
|
15
15
|
} & {
|
|
16
|
-
title?: (props: typeof
|
|
16
|
+
title?: (props: typeof __VLS_8) => any;
|
|
17
17
|
} & {
|
|
18
|
-
badge?: (props: typeof
|
|
18
|
+
badge?: (props: typeof __VLS_10) => any;
|
|
19
19
|
} & {
|
|
20
|
-
subtitle?: (props: typeof
|
|
20
|
+
subtitle?: (props: typeof __VLS_17) => any;
|
|
21
21
|
} & {
|
|
22
|
-
meta?: (props: typeof
|
|
22
|
+
meta?: (props: typeof __VLS_19) => any;
|
|
23
23
|
};
|
|
24
24
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
25
|
click: () => any;
|
|
@@ -9,17 +9,17 @@ type __VLS_Props = {
|
|
|
9
9
|
meta?: string;
|
|
10
10
|
metaSecondary?: string;
|
|
11
11
|
};
|
|
12
|
-
declare var __VLS_1: {},
|
|
12
|
+
declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {}, __VLS_17: {}, __VLS_19: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
icon?: (props: typeof __VLS_1) => any;
|
|
15
15
|
} & {
|
|
16
|
-
title?: (props: typeof
|
|
16
|
+
title?: (props: typeof __VLS_8) => any;
|
|
17
17
|
} & {
|
|
18
|
-
badge?: (props: typeof
|
|
18
|
+
badge?: (props: typeof __VLS_10) => any;
|
|
19
19
|
} & {
|
|
20
|
-
subtitle?: (props: typeof
|
|
20
|
+
subtitle?: (props: typeof __VLS_17) => any;
|
|
21
21
|
} & {
|
|
22
|
-
meta?: (props: typeof
|
|
22
|
+
meta?: (props: typeof __VLS_19) => any;
|
|
23
23
|
};
|
|
24
24
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
25
|
click: () => any;
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
label: string;
|
|
5
5
|
variant?: 'gray' | 'blue' | 'amber' | 'emerald' | 'red' | 'purple';
|
|
6
6
|
}
|
|
7
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
variant: "gray" | "blue" | "amber" | "emerald" | "red" | "purple";
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
10
|
declare const _default: typeof __VLS_export;
|
|
9
11
|
export default _default;
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
label: string;
|
|
5
5
|
variant?: 'gray' | 'blue' | 'amber' | 'emerald' | 'red' | 'purple';
|
|
6
6
|
}
|
|
7
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
variant: "gray" | "blue" | "amber" | "emerald" | "red" | "purple";
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
10
|
declare const _default: typeof __VLS_export;
|
|
9
11
|
export default _default;
|
|
@@ -7,6 +7,14 @@ interface Props {
|
|
|
7
7
|
isAwaiting?: boolean;
|
|
8
8
|
isReconnecting?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
isReconnecting: boolean;
|
|
12
|
+
isRunning: boolean;
|
|
13
|
+
isCompleted: boolean;
|
|
14
|
+
isFailed: boolean;
|
|
15
|
+
isCanceled: boolean;
|
|
16
|
+
isStalled: boolean;
|
|
17
|
+
isAwaiting: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
19
|
declare const _default: typeof __VLS_export;
|
|
12
20
|
export default _default;
|
|
@@ -7,6 +7,14 @@ interface Props {
|
|
|
7
7
|
isAwaiting?: boolean;
|
|
8
8
|
isReconnecting?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
isReconnecting: boolean;
|
|
12
|
+
isRunning: boolean;
|
|
13
|
+
isCompleted: boolean;
|
|
14
|
+
isFailed: boolean;
|
|
15
|
+
isCanceled: boolean;
|
|
16
|
+
isStalled: boolean;
|
|
17
|
+
isAwaiting: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
19
|
declare const _default: typeof __VLS_export;
|
|
12
20
|
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Ref } from '#imports';
|
|
2
|
+
/**
|
|
3
|
+
* Composable for real-time flow runs updates via WebSocket
|
|
4
|
+
* Similar to useQueueUpdates - triggers refresh flag when flow stats change
|
|
5
|
+
*/
|
|
6
|
+
export declare function useFlowRunsUpdates(flowName: Ref<string>): {
|
|
7
|
+
isConnected: Ref<boolean, boolean>;
|
|
8
|
+
isReconnecting: Ref<boolean, boolean>;
|
|
9
|
+
shouldRefreshRuns: import("vue").ComputedRef<boolean>;
|
|
10
|
+
lastUpdate: import("vue").ComputedRef<number | null>;
|
|
11
|
+
resetRefreshFlag: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ref, computed, watch, onMounted, onUnmounted } from "#imports";
|
|
2
|
+
import { useFlowWebSocket } from "./useFlowWebSocket.js";
|
|
3
|
+
export function useFlowRunsUpdates(flowName) {
|
|
4
|
+
const flowWs = useFlowWebSocket();
|
|
5
|
+
const state = ref({
|
|
6
|
+
shouldRefreshRuns: false,
|
|
7
|
+
lastUpdate: null
|
|
8
|
+
});
|
|
9
|
+
let previousStats = null;
|
|
10
|
+
const setupSubscription = () => {
|
|
11
|
+
if (!import.meta.client) return;
|
|
12
|
+
flowWs.subscribeStats({
|
|
13
|
+
onInitial: (data) => {
|
|
14
|
+
if (data.id !== flowName.value) return;
|
|
15
|
+
const stats = data?.metadata?.stats;
|
|
16
|
+
if (stats) {
|
|
17
|
+
previousStats = { total: stats.total, running: stats.running };
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
onUpdate: (data) => {
|
|
21
|
+
if (data.id !== flowName.value) return;
|
|
22
|
+
const stats = data?.metadata?.stats;
|
|
23
|
+
if (!stats) return;
|
|
24
|
+
const hasNewRuns = previousStats && stats.total !== previousStats.total;
|
|
25
|
+
const runningChanged = previousStats && stats.running !== previousStats.running;
|
|
26
|
+
if (hasNewRuns || runningChanged) {
|
|
27
|
+
state.value.shouldRefreshRuns = true;
|
|
28
|
+
state.value.lastUpdate = Date.now();
|
|
29
|
+
}
|
|
30
|
+
previousStats = { total: stats.total, running: stats.running };
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const resetRefreshFlag = () => {
|
|
35
|
+
state.value.shouldRefreshRuns = false;
|
|
36
|
+
};
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
if (import.meta.client && flowName.value) {
|
|
39
|
+
setupSubscription();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
watch(flowName, (newName, oldName) => {
|
|
43
|
+
if (newName && newName !== oldName) {
|
|
44
|
+
previousStats = null;
|
|
45
|
+
state.value.shouldRefreshRuns = false;
|
|
46
|
+
state.value.lastUpdate = null;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
onUnmounted(() => {
|
|
50
|
+
flowWs.unsubscribeStats();
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
isConnected: flowWs.connected,
|
|
54
|
+
isReconnecting: flowWs.reconnecting,
|
|
55
|
+
shouldRefreshRuns: computed(() => state.value.shouldRefreshRuns),
|
|
56
|
+
lastUpdate: computed(() => state.value.lastUpdate),
|
|
57
|
+
resetRefreshFlag
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
</template>
|
|
389
389
|
|
|
390
390
|
<script setup>
|
|
391
|
-
import { ref, computed, watch
|
|
391
|
+
import { ref, computed, watch } from "#imports";
|
|
392
392
|
import FlowDiagram from "../../components/flow/Diagram.vue";
|
|
393
393
|
import FlowRunOverview from "../../components/flow/RunOverview.vue";
|
|
394
394
|
import FlowRunTimeline from "../../components/flow/RunTimeline.vue";
|
|
@@ -399,6 +399,7 @@ import { useRoute, useRouter } from "#app";
|
|
|
399
399
|
import { useAnalyzedFlows } from "../../composables/useAnalyzedFlows";
|
|
400
400
|
import { useFlowRuns } from "../../composables/useFlowRuns";
|
|
401
401
|
import { useFlowRunTimeline } from "../../composables/useFlowRunTimeline";
|
|
402
|
+
import { useFlowRunsUpdates } from "../../composables/useFlowRunsUpdates";
|
|
402
403
|
import { useComponentRouter } from "../../composables/useComponentRouter";
|
|
403
404
|
const componentRouter = useComponentRouter();
|
|
404
405
|
const router = useRouter();
|
|
@@ -411,7 +412,7 @@ const selectedFlow = computed(() => {
|
|
|
411
412
|
const selectedRunId = computed({
|
|
412
413
|
get: () => route.query.run || "",
|
|
413
414
|
set: (value) => {
|
|
414
|
-
router.
|
|
415
|
+
router.replace({
|
|
415
416
|
query: {
|
|
416
417
|
...route.query,
|
|
417
418
|
run: value || void 0
|
|
@@ -453,7 +454,7 @@ const currentPage = computed({
|
|
|
453
454
|
return page ? Number.parseInt(page, 10) : 1;
|
|
454
455
|
},
|
|
455
456
|
set: (value) => {
|
|
456
|
-
router.
|
|
457
|
+
router.replace({
|
|
457
458
|
query: {
|
|
458
459
|
...route.query,
|
|
459
460
|
page: value > 1 ? value.toString() : void 0
|
|
@@ -474,36 +475,13 @@ const runs = computed(() => runsResponse.value?.items || []);
|
|
|
474
475
|
const totalRuns = computed(() => runsResponse.value?.total || 0);
|
|
475
476
|
const loadingRuns = computed(() => runsStatus.value === "pending");
|
|
476
477
|
const { flowState, isConnected, isReconnecting } = useFlowRunTimeline(selectedFlowRef, selectedRunIdRef);
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
if (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
refreshRuns();
|
|
483
|
-
}
|
|
484
|
-
}, 3e3);
|
|
485
|
-
};
|
|
486
|
-
const stopPolling = () => {
|
|
487
|
-
if (pollInterval) {
|
|
488
|
-
clearInterval(pollInterval);
|
|
489
|
-
pollInterval = null;
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
watch(selectedFlow, (flow) => {
|
|
493
|
-
if (flow) {
|
|
494
|
-
startPolling();
|
|
495
|
-
} else {
|
|
496
|
-
stopPolling();
|
|
497
|
-
}
|
|
498
|
-
}, { immediate: true });
|
|
499
|
-
onMounted(() => {
|
|
500
|
-
if (import.meta.client && selectedFlow.value) {
|
|
501
|
-
startPolling();
|
|
478
|
+
const { shouldRefreshRuns, resetRefreshFlag } = useFlowRunsUpdates(selectedFlowRef);
|
|
479
|
+
watch(shouldRefreshRuns, async (shouldRefresh) => {
|
|
480
|
+
if (shouldRefresh) {
|
|
481
|
+
await refreshRuns();
|
|
482
|
+
resetRefreshFlag();
|
|
502
483
|
}
|
|
503
484
|
});
|
|
504
|
-
onUnmounted(() => {
|
|
505
|
-
stopPolling();
|
|
506
|
-
});
|
|
507
485
|
const startFlowModalOpen = ref(false);
|
|
508
486
|
const flowInputJson = ref("{}");
|
|
509
487
|
const jsonError = ref("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nvent-addon/app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"description": "nvent app module for Nuxt.js",
|
|
5
5
|
"repository": "DevJoghurt/nvent",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"prepack": "pnpm build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@iconify-json/devicon": "^1.2.
|
|
26
|
+
"@iconify-json/devicon": "^1.2.52",
|
|
27
27
|
"@iconify-json/heroicons": "1.2.3",
|
|
28
|
-
"@iconify-json/lucide": "^1.2.
|
|
29
|
-
"@nuxt/kit": "4.2.
|
|
28
|
+
"@iconify-json/lucide": "^1.2.80",
|
|
29
|
+
"@nuxt/kit": "4.2.2",
|
|
30
30
|
"@nuxt/ui": "4.2.1",
|
|
31
31
|
"@vue-flow/background": "^1.3.2",
|
|
32
32
|
"@vue-flow/controls": "^1.1.3",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"@vue-flow/minimap": "^1.5.4",
|
|
35
35
|
"defu": "^6.1.4",
|
|
36
36
|
"json-editor-vue": "^0.18.1",
|
|
37
|
-
"nuxt": "4.2.
|
|
37
|
+
"nuxt": "4.2.2",
|
|
38
38
|
"pathe": "^2.0.3",
|
|
39
39
|
"zod": "^4.1.13"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@nuxt/module-builder": "^1.0.2",
|
|
43
|
-
"@nuxt/schema": "4.2.
|
|
44
|
-
"@types/node": "^
|
|
43
|
+
"@nuxt/schema": "4.2.2",
|
|
44
|
+
"@types/node": "^25.0.0",
|
|
45
45
|
"typescript": "latest",
|
|
46
|
-
"vitest": "^4.0.
|
|
46
|
+
"vitest": "^4.0.15"
|
|
47
47
|
}
|
|
48
48
|
}
|