@nvent-addon/app 0.5.5 → 0.5.6
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/TimelineList.vue +6 -2
- package/dist/runtime/app/components/flow/Diagram.vue +1 -1
- package/dist/runtime/app/composables/useFlowState.js +0 -14
- package/dist/runtime/app/pages/flows/[name].vue +3 -6
- package/dist/runtime/app/pages/triggers/[name]/edit.vue +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -453,12 +453,16 @@ function isEmitEvent(type) {
|
|
|
453
453
|
}
|
|
454
454
|
function hasMetadata(eventData) {
|
|
455
455
|
if (!eventData || typeof eventData !== "object") return false;
|
|
456
|
-
const
|
|
456
|
+
const autoInjectedKeys = ["message", "level", "msg", "stepName", "stepId", "stepRunId", "attempt", "flowName"];
|
|
457
|
+
const keys = Object.keys(eventData).filter((k) => !autoInjectedKeys.includes(k));
|
|
457
458
|
return keys.length > 0;
|
|
458
459
|
}
|
|
459
460
|
function prettyMetadata(eventData) {
|
|
460
461
|
if (!eventData || typeof eventData !== "object") return "";
|
|
461
|
-
const { message, level, msg, ...metadata } = eventData;
|
|
462
|
+
const { message, level, msg, stepName, stepId, stepRunId, attempt, flowName, ...metadata } = eventData;
|
|
463
|
+
if (Object.keys(metadata).length === 1 && "value" in metadata) {
|
|
464
|
+
return pretty(metadata.value);
|
|
465
|
+
}
|
|
462
466
|
return pretty(metadata);
|
|
463
467
|
}
|
|
464
468
|
</script>
|
|
@@ -112,7 +112,7 @@ const nodes = computed(() => {
|
|
|
112
112
|
if (f.entry) {
|
|
113
113
|
const entryState = states[f.entry.step];
|
|
114
114
|
const status = mapStatusToNodeStatus(entryState?.status);
|
|
115
|
-
const entryStepTimeout = f.entry.stepTimeout;
|
|
115
|
+
const entryStepTimeout = f.analyzed?.steps?.[f.entry.step]?.stepTimeout;
|
|
116
116
|
out.push({
|
|
117
117
|
id: `entry:${f.entry.step}`,
|
|
118
118
|
position: { x: -nodeWidth / 2, y },
|
|
@@ -199,22 +199,8 @@ export function reduceFlowState(events) {
|
|
|
199
199
|
(s) => s.status === "running" || s.status === "retrying"
|
|
200
200
|
);
|
|
201
201
|
const hasWaitingSteps = Object.values(state.steps).some((s) => s.status === "waiting");
|
|
202
|
-
const hasFailedSteps = Object.values(state.steps).some((s) => s.status === "failed");
|
|
203
|
-
const allStepsTerminal = Object.values(state.steps).every(
|
|
204
|
-
(s) => s.status === "completed" || s.status === "failed" || s.status === "timeout"
|
|
205
|
-
);
|
|
206
202
|
if (hasWaitingSteps && !hasActiveRunningSteps) {
|
|
207
203
|
state.status = "awaiting";
|
|
208
|
-
} else if (allStepsTerminal) {
|
|
209
|
-
if (hasFailedSteps) {
|
|
210
|
-
state.status = "failed";
|
|
211
|
-
} else {
|
|
212
|
-
state.status = "completed";
|
|
213
|
-
}
|
|
214
|
-
const latestCompletion = Object.values(state.steps).map((s) => s.completedAt).filter(Boolean).sort().pop();
|
|
215
|
-
if (latestCompletion) {
|
|
216
|
-
state.completedAt = latestCompletion;
|
|
217
|
-
}
|
|
218
204
|
}
|
|
219
205
|
}
|
|
220
206
|
return state;
|
|
@@ -424,7 +424,7 @@ const selectedRunId = computed({
|
|
|
424
424
|
const goBack = () => {
|
|
425
425
|
componentRouter.push("/flows");
|
|
426
426
|
};
|
|
427
|
-
const mainTab = ref("diagram");
|
|
427
|
+
const mainTab = ref(route.query.run ? "timeline" : "diagram");
|
|
428
428
|
const mainTabs = computed(() => [
|
|
429
429
|
{ label: "Diagram", value: "diagram", icon: "i-lucide-git-branch" },
|
|
430
430
|
{
|
|
@@ -541,8 +541,8 @@ const runSnapshot = computed(() => {
|
|
|
541
541
|
completedAt: state.completedAt,
|
|
542
542
|
logsCount: state.logs.length,
|
|
543
543
|
lastLogLevel: state.logs.length > 0 ? state.logs[state.logs.length - 1]?.level : void 0,
|
|
544
|
-
stallTimeout
|
|
545
|
-
|
|
544
|
+
// Use stallTimeout from event data if available, otherwise fall back to static flow definition
|
|
545
|
+
stallTimeout: state.meta?.stallTimeout || flowMeta?.analyzed?.stallTimeout
|
|
546
546
|
};
|
|
547
547
|
});
|
|
548
548
|
const selectedStepKey = ref(null);
|
|
@@ -566,9 +566,6 @@ const enhancedStepList = computed(() => {
|
|
|
566
566
|
const flowMeta = selectedFlowMeta.value;
|
|
567
567
|
if (!flowMeta?.analyzed?.steps) return steps;
|
|
568
568
|
const stepTimeoutMap = /* @__PURE__ */ new Map();
|
|
569
|
-
if (flowMeta.entry?.stepTimeout !== void 0) {
|
|
570
|
-
stepTimeoutMap.set(flowMeta.entry.step, flowMeta.entry.stepTimeout);
|
|
571
|
-
}
|
|
572
569
|
for (const [stepName, analyzedStep] of Object.entries(flowMeta.analyzed.steps)) {
|
|
573
570
|
if (analyzedStep.stepTimeout !== void 0) {
|
|
574
571
|
stepTimeoutMap.set(stepName, analyzedStep.stepTimeout);
|
|
@@ -314,7 +314,7 @@ const hasChanges = computed(() => {
|
|
|
314
314
|
const saveError = ref(null);
|
|
315
315
|
const saveSuccess = ref(false);
|
|
316
316
|
const onSubmit = async (event) => {
|
|
317
|
-
if (!trigger.value) return;
|
|
317
|
+
if (!trigger.value || isSaving.value) return;
|
|
318
318
|
isSaving.value = true;
|
|
319
319
|
saveError.value = null;
|
|
320
320
|
saveSuccess.value = false;
|