Skip to content

Commit

Permalink
Display state in invocation list.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton authored and ahmedhamidawan committed Nov 7, 2024
1 parent 2f444cd commit 776daa1
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions client/src/components/Workflow/InvocationsListState.vue
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>

0 comments on commit 776daa1

Please sign in to comment.