Skip to content

Commit 4016c1b

Browse files
authored
Merge pull request #21314 from ahmedhamidawan/change_invocation_default_to_create_time
[25.1] Set `create_time` as the default time for sorting/display for invocations
2 parents 231ea7d + 5d91b55 commit 4016c1b

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

client/src/components/Workflow/Invocation/InvocationScrollList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup lang="ts">
2+
import { faClock } from "@fortawesome/free-regular-svg-icons";
23
import { faHdd, faSitemap } from "@fortawesome/free-solid-svg-icons";
34
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
45
import { storeToRefs } from "pinia";
@@ -123,7 +124,9 @@ function getInvocationBadges(invocation: WorkflowInvocation) {
123124
:title-icon="{ icon: faSitemap }"
124125
:title-n-lines="2"
125126
title-size="text"
126-
:update-time="invocation.update_time"
127+
:update-time="invocation.create_time"
128+
update-time-title="Invoked"
129+
:update-time-icon="faClock"
127130
@title-click="workflowName(invocation.workflow_id)"
128131
@click="() => cardClicked(invocation)">
129132
<template v-slot:description>

client/src/components/Workflow/WorkflowAnnotation.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async function mountWorkflowAnnotation(version: "run_form" | "invocation", ownsW
9292
propsData: {
9393
workflowId: ownsWorkflow ? SAMPLE_WORKFLOW.id : OTHER_USER_WORKFLOW_ID,
9494
historyId: TEST_HISTORY_ID,
95-
invocationUpdateTime: version === "invocation" ? INVOCATION_TIME : undefined,
95+
invocationCreateTime: version === "invocation" ? INVOCATION_TIME : undefined,
9696
showDetails: version === "run_form",
9797
},
9898
localVue,
@@ -164,7 +164,7 @@ describe("WorkflowAnnotation renders", () => {
164164
const { wrapper } = await mountWorkflowAnnotation("invocation");
165165

166166
const timeInfo = wrapper.find(SELECTORS.TIME_INFO);
167-
expect(timeInfo.text()).toContain("updated");
167+
expect(timeInfo.text()).toContain("invoked");
168168
expect(timeInfo.find(SELECTORS.DATE).attributes("title")).toBe(INVOCATION_TIME);
169169
});
170170
});

client/src/components/Workflow/WorkflowAnnotation.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import WorkflowIndicators from "@/components/Workflow/List/WorkflowIndicators.vu
1717
1818
interface Props {
1919
workflowId: string;
20-
invocationUpdateTime?: string;
20+
invocationCreateTime?: string;
2121
historyId: string;
2222
showDetails?: boolean;
2323
hideHr?: boolean;
2424
}
2525
2626
const props = withDefaults(defineProps<Props>(), {
27-
invocationUpdateTime: undefined,
27+
invocationCreateTime: undefined,
2828
});
2929
3030
const { workflow, owned } = useWorkflowInstance(props.workflowId);
@@ -34,7 +34,7 @@ const description = computed(() => {
3434
});
3535
3636
const timeElapsed = computed(() => {
37-
return props.invocationUpdateTime || workflow.value?.update_time;
37+
return props.invocationCreateTime || workflow.value?.update_time;
3838
});
3939
4040
const workflowTags = computed(() => {
@@ -49,11 +49,11 @@ const workflowTags = computed(() => {
4949
<i v-if="timeElapsed" data-description="workflow annotation time info">
5050
<FontAwesomeIcon :icon="faClock" class="mr-1" />
5151
<span v-localize>
52-
{{ props.invocationUpdateTime ? "updated" : "edited" }}
52+
{{ props.invocationCreateTime ? "invoked" : "edited" }}
5353
</span>
5454
<UtcDate :date="timeElapsed" mode="elapsed" data-description="workflow annotation date" />
5555
</i>
56-
<span v-if="invocationUpdateTime" class="d-flex flex-gapx-1 align-items-center">
56+
<span v-if="invocationCreateTime" class="d-flex flex-gapx-1 align-items-center">
5757
<FontAwesomeIcon :icon="faHdd" />History:
5858

5959
<span class="history-link-wrapper">

client/src/components/WorkflowInvocationState/WorkflowInvocationState.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ async function onCancel() {
304304
<WorkflowAnnotation
305305
v-if="props.isFullPage"
306306
:workflow-id="invocation.workflow_id"
307-
:invocation-update-time="invocation.update_time"
307+
:invocation-create-time="invocation.create_time"
308308
:history-id="invocation.history_id">
309309
<template v-slot:middle-content>
310310
<div class="progress-bars mx-1">

0 commit comments

Comments
 (0)