Skip to content

Commit 00f47d3

Browse files
only show overview tab for subworkflow steps in invocation view
This was initially to fix the bug where for a subworkflow (and expandable workflow runs in the invocation grid), we were showing all tabs/nav items and clicking them was changing the route to the subworkflow's (or expanded run's) detailed view on that tab (unexpected behavior when on the parent invocation view or the grid). However, this actually makes sense to only show the overview tab because if a user wishes to view other items such as Report, Export etc, they would be better off viewing that workflow's detailed view in another tab (as guided by the overview tab via the link in `SubworkflowAlert.vue` added here).
1 parent 62dff33 commit 00f47d3

5 files changed

Lines changed: 31 additions & 15 deletions

File tree

client/src/api/invocations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type InvocationInputParameter = components["schemas"]["InvocationInputPar
77
export type InvocationOutput = components["schemas"]["InvocationOutput"];
88
export type InvocationOutputCollection = components["schemas"]["InvocationOutputCollection"];
99
export type InvocationJobsSummary = components["schemas"]["InvocationJobsResponse"];
10+
export type InvocationState = components["schemas"]["InvocationState"];
1011
export type InvocationStep = components["schemas"]["InvocationStep"];
1112
export type InvocationMessage = components["schemas"]["InvocationMessageResponseUnion"];
1213
export type WorkflowInvocationRequest = components["schemas"]["WorkflowInvocationRequestModel"];
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script setup lang="ts">
2+
import { BAlert } from "bootstrap-vue";
3+
4+
import type { InvocationState } from "@/api/invocations";
5+
import { withPrefix } from "@/utils/redirect";
6+
7+
import ExternalLink from "../ExternalLink.vue";
8+
import HelpText from "../Help/HelpText.vue";
9+
10+
const props = defineProps<{
11+
invocationId: string;
12+
state?: InvocationState;
13+
}>();
14+
</script>
15+
16+
<template>
17+
<BAlert variant="secondary" show>
18+
<span v-if="props.state">
19+
This subworkflow is
20+
<HelpText :uri="`galaxy.invocations.states.${props.state}`" :text="props.state" />.
21+
</span>
22+
<ExternalLink :href="withPrefix(`/workflows/invocations/${props.invocationId}`)"> Click here </ExternalLink>
23+
to view this subworkflow in graph view.
24+
</BAlert>
25+
</template>

client/src/components/WorkflowInvocationState/WorkflowInvocationOverview.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import { computed, nextTick, ref } from "vue";
66
import type { InvocationMessage, StepJobSummary, WorkflowInvocationElementView } from "@/api/invocations";
77
import { useWorkflowInstance } from "@/composables/useWorkflowInstance";
88
import { useWorkflowStateStore } from "@/stores/workflowEditorStateStore";
9-
import { withPrefix } from "@/utils/redirect";
109
11-
import ExternalLink from "../ExternalLink.vue";
12-
import HelpText from "../Help/HelpText.vue";
1310
import InvocationGraph from "../Workflow/Invocation/Graph/InvocationGraph.vue";
11+
import SubworkflowAlert from "./SubworkflowAlert.vue";
1412
import WorkflowInvocationError from "./WorkflowInvocationError.vue";
1513
import LoadingSpan from "@/components/LoadingSpan.vue";
1614
@@ -46,12 +44,7 @@ async function showStep(stepId: number) {
4644

4745
<template>
4846
<div class="mb-3 workflow-invocation-state-component">
49-
<BAlert v-if="isSubworkflow" variant="secondary" show>
50-
This subworkflow is
51-
<HelpText :uri="`galaxy.invocations.states.${invocation.state}`" :text="invocation.state" />.
52-
<ExternalLink :href="withPrefix(`/workflows/invocations/${invocation.id}`)"> Click here </ExternalLink>
53-
to view this subworkflow in graph view.
54-
</BAlert>
47+
<SubworkflowAlert v-if="isSubworkflow" :invocation-id="props.invocation.id" :state="props.invocation.state" />
5548
<div v-if="props.invocationMessages?.length" class="d-flex align-items-center">
5649
<WorkflowInvocationError
5750
v-for="message in props.invocationMessages"

client/src/components/WorkflowInvocationState/WorkflowInvocationState.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ async function onCancel() {
338338
</template>
339339
</WorkflowAnnotation>
340340

341-
<BNav pills class="mb-2 p-2 bg-light border-bottom">
341+
<BNav v-if="props.isFullPage" pills class="mb-2 p-2 bg-light border-bottom">
342342
<BNavItem title="Overview" :active="!props.tab" :to="`/workflows/invocations/${props.invocationId}`">
343343
Overview
344344
</BNavItem>

client/src/components/WorkflowInvocationState/WorkflowInvocationStep.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useInvocationStore } from "@/stores/invocationStore";
1010
import Heading from "../Common/Heading.vue";
1111
import JobStep from "./JobStep.vue";
1212
import ParameterStep from "./ParameterStep.vue";
13-
import WorkflowInvocationState from "./WorkflowInvocationState.vue";
13+
import SubworkflowAlert from "./SubworkflowAlert.vue";
1414
import WorkflowInvocationStepHeader from "./WorkflowInvocationStepHeader.vue";
1515
import WorkflowStepTitle from "./WorkflowStepTitle.vue";
1616
import GenericHistoryItem from "@/components/History/Content/GenericItem.vue";
@@ -240,10 +240,7 @@ onUnmounted(() => {
240240
</template>
241241
</div>
242242

243-
<WorkflowInvocationState
244-
v-else
245-
is-subworkflow
246-
:invocation-id="stepDetails.subworkflow_invocation_id" />
243+
<SubworkflowAlert v-else :invocation-id="stepDetails.subworkflow_invocation_id" />
247244
</div>
248245
</div>
249246
</div>

0 commit comments

Comments
 (0)