Skip to content

Commit

Permalink
use openapi-fetch for fetching job
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Aug 15, 2024
1 parent ea4fcb4 commit 96663f2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions client/src/components/WorkflowInvocationState/JobStepTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 96663f2

Please sign in to comment.