mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add eslint rule padding-line-between-statements (#1593)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
7b77f18376
commit
dcf253e7d5
401 files changed
+2018
-40
No files matched your search
@@ -10,6 +10,7 @@ export class CronJobStore extends KubeObjectStore<CronJob> {
|
||||
|
||||
getStatuses(cronJobs?: CronJob[]) {
|
||||
const status = { suspended: 0, scheduled: 0 };
|
||||
|
||||
cronJobs.forEach(cronJob => {
|
||||
if (cronJob.spec.suspend) {
|
||||
status.suspended++;
|
||||
@@ -18,13 +19,16 @@ export class CronJobStore extends KubeObjectStore<CronJob> {
|
||||
status.scheduled++;
|
||||
}
|
||||
});
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
getActiveJobsNum(cronJob: CronJob) {
|
||||
// Active jobs are jobs without any condition 'Complete' nor 'Failed'
|
||||
const jobs = jobStore.getJobsByOwner(cronJob);
|
||||
|
||||
if (!jobs.length) return 0;
|
||||
|
||||
return jobs.filter(job => !job.getCondition()).length;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user