Skip to content

Commit

Permalink
Give helpful error in more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Oct 16, 2024
1 parent e16808b commit d9e7838
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/components/Progress.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<Accordion v-if="Object.keys(jobs).length > 0">
<AccordionTab :header="job.name + ' - ' + job.status" v-for="job in jobs">
<AccordionTab :header="job.status.length > 0 ? job.name + ' - ' + job.status : job.name" v-for="job in jobs">
<ProgressBar :value="Math.round(job.amount * 100)" :mode="job.definite ? 'determinate' : 'indeterminate'"></ProgressBar>
<pre>{{ job.messages }}</pre>
</AccordionTab>
Expand All @@ -19,11 +19,9 @@ export default {
},
methods: {
update (job, progress) {
console.log("Updating job", job, progress)
this.jobs[job] = progress
},
stop_job (job) {
console.log("Stopping job", job)
delete this.jobs[job]
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ async function restFetch (method: string, url: string, data?: any, progressTrack
return result
} else {
const msg = await response.text()
setProgress(jobid, progressTracker, {amount: 1, status: "Failed ("+response.status+")", messages: msg, name: name})
throw new Error(msg)
}
}
Expand Down

0 comments on commit d9e7838

Please sign in to comment.