mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add cronjob trigger (#694)
Signed-off-by: Nox <aurelien.gaston@krondor.fr> Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
0f11b03692
commit
8f778ea379
12 files changed
+259
-37
No files matched your search
@@ -9,13 +9,13 @@ export class CronJobStore extends KubeObjectStore<CronJob> {
|
||||
api = cronJobApi
|
||||
|
||||
getStatuses(cronJobs?: CronJob[]) {
|
||||
const status = { failed: 0, running: 0 }
|
||||
const status = { suspended: 0, scheduled: 0 }
|
||||
cronJobs.forEach(cronJob => {
|
||||
if (cronJob.spec.suspend) {
|
||||
status.failed++
|
||||
status.suspended++
|
||||
}
|
||||
else {
|
||||
status.running++
|
||||
status.scheduled++
|
||||
}
|
||||
})
|
||||
return status
|
||||
|
||||
Reference in new issue
Block a user