-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f444cd
commit 776daa1
Showing
1 changed file
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,49 @@ | ||
<script setup lang="ts"> | ||
import { onBeforeUnmount, onMounted, toRef } from "vue"; | ||
import { useInvocationState } from "@/components/WorkflowInvocationState/usesInvocationState"; | ||
import HelpText from "@/components/Help/HelpText.vue"; | ||
import InvocationJobsProgressBar from "@/components/WorkflowInvocationState/InvocationJobsProgressBar.vue"; | ||
import InvocationStepsProgressBar from "@/components/WorkflowInvocationState/InvocationStepsProgressBar.vue"; | ||
interface Props { | ||
invocationId: string; | ||
invocationState: string; | ||
detailsShowing: boolean; | ||
} | ||
defineProps<Props>(); | ||
const props = defineProps<Props>(); | ||
const { | ||
invocation, | ||
invocationState, | ||
invocationSchedulingTerminal, | ||
invocationAndJobTerminal, | ||
jobStatesSummary, | ||
monitorState, | ||
clearStateMonitor, | ||
} = useInvocationState(toRef(props, "invocationId")); | ||
onMounted(monitorState); | ||
onBeforeUnmount(clearStateMonitor); | ||
</script> | ||
|
||
<template> | ||
<HelpText :uri="`galaxy.invocations.states.${invocationState}`" :text="invocationState" /> | ||
<span> | ||
<HelpText | ||
v-if="!invocation || detailsShowing" | ||
:uri="`galaxy.invocations.states.${props.invocationState}`" | ||
:text="props.invocationState" /> | ||
<template v-else> | ||
<InvocationStepsProgressBar | ||
:invocation="invocation" | ||
:invocation-state="invocationState" | ||
:invocation-scheduling-terminal="invocationSchedulingTerminal" /> | ||
<InvocationJobsProgressBar | ||
:job-states-summary="jobStatesSummary" | ||
:invocation-scheduling-terminal="invocationSchedulingTerminal" | ||
:invocation-and-job-terminal="invocationAndJobTerminal" /> | ||
</template> | ||
</span> | ||
</template> |