Skip to content

Commit

Permalink
Improved: showing additional job execution details in the history seg…
Browse files Browse the repository at this point in the history
…ment in pipeline page (#743)
  • Loading branch information
amansinghbais committed Dec 3, 2024
1 parent 929ebca commit bbf53ba
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const actions: ActionTree<JobState, RootState> = {
"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,
Expand Down
21 changes: 20 additions & 1 deletion src/views/Pipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,24 @@
<p>{{ job.description }}</p>
</ion-label>
</ion-item>

<ion-item>
<ion-icon slot="start" :icon="personOutline" />
<ion-label class="ion-text-wrap">{{ translate("Created by", { userLogin: job.createdByUserLogin }) }}</ion-label>
<ion-label slot="end">{{ job.createdDate ? getDateTime(job.createdDate) : "-" }}</ion-label>
</ion-item>

<ion-item>
<ion-icon slot="start" :icon="peopleOutline" />
<ion-label class="ion-text-wrap">{{ translate("Updated by", { userLogin: job.lastModifiedByUserLogin }) }}</ion-label>
<ion-label slot="end">{{ job.lastUpdatedStamp ? getDateTime(job.lastUpdatedStamp) : "-" }}</ion-label>
</ion-item>

<ion-item>
<ion-icon slot="start" :icon="timeOutline" />
<ion-label class="ion-text-wrap">
{{ job.runTime ? getTime(job.runTime) : "-" }}
<p>{{ job.recurrenceTimeZone }}</p>
</ion-label>
<ion-note slot="end">{{ job.statusId == "SERVICE_CANCELLED" || job.statusId == "SERVICE_CRASHED" ? getJobExecutionTime(job.startDateTime, job.cancelDateTime) : getJobExecutionTime(job.startDateTime, job.finishDateTime) }}</ion-note>
</ion-item>
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -705,6 +722,8 @@ export default defineComponent({
codeWorkingOutline,
ellipsisVerticalOutline,
helpCircleOutline,
peopleOutline,
personOutline,
pinOutline,
refreshOutline,
timeOutline,
Expand Down

0 comments on commit bbf53ba

Please sign in to comment.