Skip to content

Commit

Permalink
Tighten up typing in workflow invocation component.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Mar 12, 2024
1 parent a1bb722 commit a87af2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
runningCount as jobStatesSummaryRunningCount,
} from "./util";
interface Props {
jobStatesSummary: InvocationJobsSummary;
invocationSchedulingTerminal: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import InvocationJobsProgressBar from "./InvocationJobsProgressBar.vue";
import InvocationStepsProgressBar from "./InvocationStepsProgressBar.vue";
interface Props {
invocation?: WorkflowInvocationElementView;
invocation: WorkflowInvocationElementView;
invocationAndJobTerminal: boolean;
invocationSchedulingTerminal: boolean;
jobStatesSummary: InvocationJobsSummary;
Expand All @@ -23,7 +23,7 @@ interface Props {
const props = defineProps<Props>();
const invocationId = computed<string | undefined>(() => props.invocation?.id);
const invocationId = computed<string>(() => props.invocation.id);
const indexStr = computed(() => {
if (props.index == undefined) {
Expand All @@ -34,7 +34,7 @@ const indexStr = computed(() => {
});
const invocationState = computed(() => {
return props.invocation?.state || "new";
return props.invocation.state || "new";
});
const invocationStateSuccess = computed(() => {
Expand All @@ -45,6 +45,10 @@ const runningCount = computed<number>(() => {
return jobStatesSummaryRunningCount(props.jobStatesSummary);
});
const messages = computed(() => {
return props.invocation.messages;
});
const emit = defineEmits<{
(e: "invocation-cancelled"): void;
}>();
Expand Down Expand Up @@ -72,9 +76,9 @@ function onCancel() {
title="Cancel scheduling of workflow invocation"
@click="onCancel"></span>
</div>
<template v-if="invocation.messages?.length">
<template v-if="messages?.length">
<InvocationMessage
v-for="message in invocation.messages"
v-for="message in messages"
:key="message.reason"
class="steps-progress my-1"
:invocation-message="message"
Expand Down

0 comments on commit a87af2b

Please sign in to comment.