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 committed Mar 25, 2024
1 parent 495ce6c commit ee7aad9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
9 changes: 6 additions & 3 deletions client/src/components/Workflow/InvocationsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
<UtcDate :date="data.value" mode="elapsed" />
</template>
<template v-slot:cell(state)="data">
<InvocationsListState :invocation-state="data.value" :invocation-id="data.item.id" />
<InvocationsListState
:invocation-state="data.value"
:invocation-id="data.item.id"
:details-showing="data.detailsShowing" />
</template>
<template v-slot:cell(execute)="data">
<WorkflowRunButton
Expand Down Expand Up @@ -126,7 +129,7 @@ export default {
}
fields.push(
{ key: "create_time", label: "Invoked", class: "col-small", sortable: true },
{ key: "state", class: "col-small" },
{ key: "state" },
{ key: "execute", label: "Run", class: "col-button" }
);
return {
Expand Down Expand Up @@ -212,7 +215,7 @@ export default {
}
.table:deep(.col-name) {
width: 40%;
width: 35%;
}
.table:deep(.col-history) {
Expand Down
38 changes: 36 additions & 2 deletions client/src/components/Workflow/InvocationsListState.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
<script setup lang="ts">
import { onMounted, onBeforeUnmount, toRef } from "vue";
import HelpText from "@/components/Help/HelpText.vue";
import InvocationJobsProgressBar from "@/components/WorkflowInvocationState/InvocationJobsProgressBar.vue";
import InvocationStepsProgressBar from "@/components/WorkflowInvocationState/InvocationStepsProgressBar.vue";
import { useInvocationState } from "@/components/WorkflowInvocationState/usesInvocationState";
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 ee7aad9

Please sign in to comment.