From bbf53ba4e68464b32848ddc742192ad646b02cb6 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 3 Dec 2024 12:10:38 +0530 Subject: [PATCH] Improved: showing additional job execution details in the history segment in pipeline page (#743) --- src/locales/en.json | 2 ++ src/store/modules/job/actions.ts | 2 +- src/views/Pipeline.vue | 21 ++++++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 26b52d54..a7cdf399 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -69,6 +69,7 @@ "Create batches and schedule brokering for different orders.": "Create batches and schedule brokering for different orders.", "Create or update order fulfillment history records from FTP.": "Create or update order fulfillment history records from FTP.", "Create new brokering job": "Create new brokering job", + "Created by": "Created by {userLogin}", "Daily": "Daily", "Dashoard": "Dashoard", "Days": "Days", @@ -322,6 +323,7 @@ "Update orders": "Update orders", "Update promise date": "Update promise date", "Update shipping dates in Shopify": "Update shipping dates in Shopify", + "Updated by": "Updated by {userLogin}", "Upload": "Upload", "Uploaded file": "Uploaded file", "Upload Pending Process": "Upload Pending Process", diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index 0df0fdcf..2b6d6ee9 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -52,7 +52,7 @@ const actions: ActionTree = { "shopId_fld1_grp": "2", "shopId_fld1_op": "empty" } as any, - "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "jobResult", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" , "enumTypeId", "enumName", "description", "runtimeDataId" ], + "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "jobResult", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" , "enumTypeId", "enumName", "description", "runtimeDataId", "createdByUserLogin", "lastModifiedByUserLogin", "createdDate", "lastUpdatedStamp", "recurrenceTimeZone" ], "noConditionFind": "Y", "viewSize": payload.viewSize, "viewIndex": payload.viewIndex, diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index 6e20fd9c..5702b0ec 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -209,10 +209,24 @@

{{ job.description }}

+ + + + {{ translate("Created by", { userLogin: job.createdByUserLogin }) }} + {{ job.createdDate ? getDateTime(job.createdDate) : "-" }} + + + + + {{ translate("Updated by", { userLogin: job.lastModifiedByUserLogin }) }} + {{ job.lastUpdatedStamp ? getDateTime(job.lastUpdatedStamp) : "-" }} + + {{ job.runTime ? getTime(job.runTime) : "-" }} +

{{ job.recurrenceTimeZone }}

{{ job.statusId == "SERVICE_CANCELLED" || job.statusId == "SERVICE_CRASHED" ? getJobExecutionTime(job.startDateTime, job.cancelDateTime) : getJobExecutionTime(job.startDateTime, job.finishDateTime) }}
@@ -312,7 +326,7 @@ import { IonButtons } from "@ionic/vue"; import JobConfiguration from '@/components/JobConfiguration.vue' -import { closeCircleOutline, codeWorkingOutline, copyOutline, ellipsisVerticalOutline, filterOutline, helpCircleOutline, pinOutline, refreshOutline, timeOutline, timerOutline } from "ionicons/icons"; +import { closeCircleOutline, codeWorkingOutline, copyOutline, ellipsisVerticalOutline, filterOutline, helpCircleOutline, peopleOutline, personOutline, pinOutline, refreshOutline, timeOutline, timerOutline } from "ionicons/icons"; import emitter from '@/event-bus'; import JobHistoryModal from '@/components/JobHistoryModal.vue'; import { Plugins } from '@capacitor/core'; @@ -469,6 +483,9 @@ export default defineComponent({ getTime (time: any) { return DateTime.fromMillis(time).toLocaleString(DateTime.TIME_SIMPLE); }, + getDateTime (time: any) { + return DateTime.fromMillis(time).toLocaleString(DateTime.DATETIME_MED); + }, timeFromNow (time: any) { const timeDiff = DateTime.fromMillis(time).diff(DateTime.local()); return DateTime.local().plus(timeDiff).toRelative(); @@ -705,6 +722,8 @@ export default defineComponent({ codeWorkingOutline, ellipsisVerticalOutline, helpCircleOutline, + peopleOutline, + personOutline, pinOutline, refreshOutline, timeOutline,