Skip to content

Commit

Permalink
fix: cronjobs
Browse files Browse the repository at this point in the history
  • Loading branch information
achauve committed Dec 16, 2023
1 parent 1539d1d commit d18813f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/kube/cronjob.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _ from "lodash"
import {
Cronjob,
Job,
getJobStatus,
getCronjobStatus,
getLastSuccessfullJob,
getJobsAfterlastSuccessfull,
Expand Down Expand Up @@ -57,7 +58,7 @@ function Jobs({ cronjob }: { cronjob: Cronjob }) {
</div>
{jobsAfterLastSuccess.length > 0 && (
<div className="text-sm text-gray-700 py-2">
Last failed job:
Latest jobs:
<div className="grid gap-1">
{jobsAfterLastSuccess.map((job) => (
<Job key={job.name} job={job} />
Expand All @@ -80,10 +81,11 @@ function Job({ job }: { job: Job }) {
}
>
<div
key={job.name}
className={
"col-span-1 rounded-lg bg-white shadow border-l-8 text-left border-red-500 p-2"
}
className={`col-span-1 rounded-lg bg-white shadow border-l-8 text-left
${
getJobStatus(job.raw) === "ok" ? "border-emerald-400" : "border-red-500"
}
`}
>
{job.name}
</div>
Expand Down

0 comments on commit d18813f

Please sign in to comment.