From fd03327a5e8bf32ec01f91f268148275065d5060 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 20 Oct 2023 19:35:50 +0530 Subject: [PATCH] Improved: runtime to be passed from current time millis (#620) --- src/components/BatchModal.vue | 19 +++++++++---------- src/components/JobConfiguration.vue | 2 +- src/store/modules/job/actions.ts | 1 + src/views/Brokering.vue | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue index a3de69d8..921dc1b1 100644 --- a/src/components/BatchModal.vue +++ b/src/components/BatchModal.vue @@ -10,7 +10,7 @@ - + {{ $t('Name') }} @@ -244,18 +244,14 @@ export default defineComponent({ if (hasJobDataError(job)) return; if (this.runTime) { - job['runTime'] = this.runTime + job['runTime'] = DateTime.now().toMillis() + this.runTime } job['jobStatus'] = this.jobStatus !== 'SERVICE_DRAFT' ? this.jobStatus : 'HOURLY'; job['jobName'] = this.jobName || this.currentDateTime; - if (job?.status === 'SERVICE_DRAFT') { - const jobCustomParameters = generateJobCustomParameters(this.customRequiredParameters, this.customOptionalParameters, job.runtimeData) - await this.store.dispatch('job/scheduleService', { job, jobCustomParameters }) - } else if (job?.status === 'SERVICE_PENDING') { - await this.store.dispatch('job/updateJob', job) - } + const jobCustomParameters = generateJobCustomParameters(this.customRequiredParameters, this.customOptionalParameters, job.runtimeData) + await this.store.dispatch('job/scheduleService', { job, jobCustomParameters }) this.closeModal() }, async setCustomFrequency() { @@ -321,7 +317,10 @@ export default defineComponent({ \ No newline at end of file diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue index a27be9a9..8165c3ce 100644 --- a/src/components/JobConfiguration.vue +++ b/src/components/JobConfiguration.vue @@ -18,7 +18,7 @@ {{ $t("Run time") }} - {{ $t(runTime.label) }} + {{ runTime.label }}