Skip to content

Commit

Permalink
add isFullPage prop instead of checking route
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Apr 25, 2024
1 parent 9672fcd commit 6c4cd8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
7 changes: 6 additions & 1 deletion client/src/components/Workflow/Run/WorkflowRunSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
<a class="workflow-new-history-target-link" :href="newHistoryTarget">Switch to that history now</a>.
</p>
<p v-else>You can check the status of queued jobs and view the resulting data the History panel.</p>
<p>
View all of your workflow invocations in the
<router-link to="/workflows/invocations">Invocations List</router-link>.
</p>
</div>
<WorkflowInvocationState
v-for="(invocation, index) in invocations"
:key="invocation.id"
:index="index"
:invocation-id="invocation.id" />
:invocation-id="invocation.id"
full-page />
<div id="webhook-view"></div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { faArrowLeft, faClock, faEdit, faEye, faHdd, faSitemap } from "@fortawes
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BAlert, BButton, BCard, BTab, BTabs } from "bootstrap-vue";
import { computed, onMounted, onUnmounted, ref } from "vue";
import { useRoute } from "vue-router/composables";
import { InvocationJobsSummary, WorkflowInvocationElementView } from "@/api/invocations";
import { components } from "@/api/schema";
Expand Down Expand Up @@ -37,6 +36,7 @@ interface Props {
invocationId: string;
index?: number;
isSubworkflow?: boolean;
isFullPage?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
Expand All @@ -48,8 +48,6 @@ const emit = defineEmits<{
(e: "invocation-cancelled"): void;
}>();
const route = useRoute();
const invocationStore = useInvocationStore();
const stepStatesInterval = ref<any>(undefined);
Expand Down Expand Up @@ -79,7 +77,6 @@ const jobStatesSummary = computed(() => {
const jobsSummary = invocationStore.getInvocationJobsSummaryById(props.invocationId);
return (!jobsSummary ? null : jobsSummary) as InvocationJobsSummary;
});
const isInvocationRoute = computed(() => route.path.includes(`/workflows/invocations/${props.invocationId}`));
const workflowStore = useWorkflowStore();
Expand Down Expand Up @@ -139,7 +136,7 @@ function getWorkflowName() {

<template>
<div v-if="invocation" class="d-flex flex-column w-100">
<div v-if="isInvocationRoute" class="d-flex flex-gapx-1">
<div v-if="props.isFullPage" class="d-flex flex-gapx-1">
<Heading h1 separator inline truncate size="xl" class="flex-grow-1">
Invoked Workflow: "{{ getWorkflowName() }}"
</Heading>
Expand All @@ -157,7 +154,7 @@ function getWorkflowName() {
</BButton>
</div>
</div>
<BCard v-if="isInvocationRoute" class="py-2 px-3" no-body>
<BCard v-if="props.isFullPage" class="py-2 px-3" no-body>
<div class="d-flex justify-content-between align-items-center">
<span class="d-flex flex-gapx-1 align-items-center">
<FontAwesomeIcon :icon="faHdd" />History:
Expand Down Expand Up @@ -195,12 +192,11 @@ function getWorkflowName() {
class="invocation-summary"
:invocation="invocation"
:index="index"
:is-invocation-route="isInvocationRoute"
:is-invocation-route="props.isFullPage"
:invocation-and-job-terminal="invocationAndJobTerminal"
:invocation-scheduling-terminal="invocationSchedulingTerminal"
:job-states-summary="jobStatesSummary"
:is-subworkflow="isSubworkflow"
:visible="activeTab === TABS.SUMMARY"
@invocation-cancelled="cancelWorkflowSchedulingLocal" />
</BTab>
<BTab title="Details">
Expand Down
5 changes: 4 additions & 1 deletion client/src/entry/analysis/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ export function getRouter(Galaxy) {
{
path: "workflows/invocations/:invocationId",
component: WorkflowInvocationState,
props: true,
props: (route) => ({
invocationId: route.params.invocationId,
isFullPage: true,
}),
},
{
path: "workflows/list",
Expand Down

0 comments on commit 6c4cd8e

Please sign in to comment.