Skip to content

Commit

Permalink
[5.x] Failed job list: Modify job retry tooltip label to include stat…
Browse files Browse the repository at this point in the history
…us of last job retry (#1182)

* [5.x] Failed jobs list: Modify job retried tooltip label to include status of last retry

* [5.x] Failed jobs list: Modify job retried tooltip label to include status of last retry

- Simplified logic by removing unnecessary checks, since when method is called there will always have been a retry

* [5.x] Failed jobs list: Modify job retried tooltip label to include status of last retry

- Updated comment

* Update index.vue

* Update index.vue

Co-authored-by: Jeandre van Zyl <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
3 people authored Sep 5, 2022
1 parent 72be93e commit 3db6568
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion resources/js/screens/failedJobs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@
return job.payload.retry_of;
},
/**
* Construct the tooltip label for a retried job.
*/
retriedJobTooltip(job) {
let lastRetry = job.retried_by[job.retried_by.length - 1];
return `Total retries: ${job.retried_by.length}, Last retry status: ${_.upperFirst(lastRetry.status)}`;
},
/**
* Refresh the jobs every period of time.
Expand Down Expand Up @@ -240,7 +248,7 @@
</router-link>

<small class="badge badge-secondary badge-sm"
v-tooltip:top="`Total retries: ${job.retried_by.length}`"
v-tooltip:top="retriedJobTooltip(job)"
v-if="wasRetried(job)">
Retried
</small>
Expand Down

0 comments on commit 3db6568

Please sign in to comment.