Skip to content

Commit a9d9419

Browse files
switch to overview tab if there is an invalid tab in the URL
Fixes #21101
1 parent 0accaf0 commit a9d9419

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/src/components/WorkflowInvocationState/WorkflowInvocationState.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ const disabledTabTooltip = computed(() => {
8585
}
8686
});
8787
88+
/** We are on the default "Overview" tab if the tab prop is not set or is not one of the expected tab values */
89+
const onOverviewTab = computed(() => {
90+
return !props.tab || !["steps", "inputs", "outputs", "report", "export", "metrics", "debug"].includes(props.tab);
91+
});
92+
8893
const invocation = computed(() => {
8994
const storedInvocation = invocationStore.getInvocationById(props.invocationId);
9095
if (invocationLoaded.value && isWorkflowInvocationElementView(storedInvocation)) {
@@ -340,7 +345,7 @@ async function onCancel() {
340345
</WorkflowAnnotation>
341346

342347
<BNav v-if="props.isFullPage" pills class="mb-2 p-2 bg-light border-bottom">
343-
<BNavItem title="Overview" :active="!props.tab" :to="`/workflows/invocations/${props.invocationId}`">
348+
<BNavItem title="Overview" :active="onOverviewTab" :to="`/workflows/invocations/${props.invocationId}`">
344349
Overview
345350
</BNavItem>
346351
<BNavItem
@@ -424,7 +429,7 @@ async function onCancel() {
424429
</BNav>
425430

426431
<div class="mt-1 d-flex flex-column overflow-auto">
427-
<div v-if="!props.tab">
432+
<div v-if="onOverviewTab">
428433
<WorkflowInvocationOverview
429434
class="invocation-overview"
430435
:invocation="invocation"

0 commit comments

Comments
 (0)