Enforce semicolons in eslint

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2020-11-19 16:35:04 +02:00
1 parent 0f3f5611ba
commit 1477bb8274
531 files changed
+3979 -3975

No files matched your search

@@ -10,34 +10,34 @@ export class JobStore extends KubeObjectStore<Job> {
api = jobApi
getChildPods(job: Job): Pod[] {
return podsStore.getPodsByOwner(job)
return podsStore.getPodsByOwner(job);
}
getJobsByOwner(cronJob: CronJob) {
return this.items.filter(job =>
job.getNs() == cronJob.getNs() &&
job.getOwnerRefs().find(ref => ref.name === cronJob.getName() && ref.kind === cronJob.kind)
)
);
}
getStatuses(jobs?: Job[]) {
const status = { failed: 0, pending: 0, running: 0, succeeded: 0 }
const status = { failed: 0, pending: 0, running: 0, succeeded: 0 };
jobs.forEach(job => {
const pods = this.getChildPods(job)
const pods = this.getChildPods(job);
if (pods.some(pod => pod.getStatus() === PodStatus.FAILED)) {
status.failed++
status.failed++;
}
else if (pods.some(pod => pod.getStatus() === PodStatus.PENDING)) {
status.pending++
status.pending++;
}
else if (pods.some(pod => pod.getStatus() === PodStatus.RUNNING)) {
status.running++
status.running++;
}
else {
status.succeeded++
status.succeeded++;
}
})
return status
});
return status;
}
}