From 96663f2c9f71e57469b5a76ddf209e882c3da5d9 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Thu, 15 Aug 2024 11:26:58 -0500 Subject: [PATCH] use `openapi-fetch` for fetching job --- .../WorkflowInvocationState/JobStepTabs.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/client/src/components/WorkflowInvocationState/JobStepTabs.vue b/client/src/components/WorkflowInvocationState/JobStepTabs.vue index 35c1e260282a..d4d15abd24ac 100644 --- a/client/src/components/WorkflowInvocationState/JobStepTabs.vue +++ b/client/src/components/WorkflowInvocationState/JobStepTabs.vue @@ -5,7 +5,8 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BAlert, BTab, BTabs } from "bootstrap-vue"; import Vue, { computed, ref, watch } from "vue"; -import { fetchJobDetails, type JobBaseModel, type JobDetails } from "@/api/jobs"; +import { GalaxyApi } from "@/api"; +import { type JobBaseModel, type JobDetails } from "@/api/jobs"; import { getHeaderClass, iconClasses } from "@/composables/useInvocationGraph"; import { rethrowSimple } from "@/utils/simple-error"; @@ -33,11 +34,15 @@ watch( async (propJobs: JobBaseModel[]) => { loading.value = true; for (const job of propJobs) { - try { - const { data } = await fetchJobDetails({ job_id: job.id, full: true }); - Vue.set(jobsDetails.value, job.id, data); - } catch (e) { - rethrowSimple(e); + const { data, error } = await GalaxyApi().GET("/api/jobs/{job_id}", { + params: { + path: { job_id: job.id }, + query: { full: true }, + }, + }); + Vue.set(jobsDetails.value, job.id, data); + if (error) { + rethrowSimple(error); } } if (initialLoading.value) {