mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
0f3f5611ba
commit
1477bb8274
531 files changed
+3979
-3975
No files matched your search
@@ -1,2 +1,2 @@
|
||||
export * from "./jobs"
|
||||
export * from "./job-details"
|
||||
export * from "./jobs";
|
||||
export * from "./job-details";
|
||||
@@ -35,12 +35,12 @@ export class JobDetails extends React.Component<Props> {
|
||||
render() {
|
||||
const { object: job } = this.props;
|
||||
if (!job) return null;
|
||||
const selectors = job.getSelectors()
|
||||
const nodeSelector = job.getNodeSelectors()
|
||||
const images = job.getImages()
|
||||
const childPods = jobStore.getChildPods(job)
|
||||
const ownerRefs = job.getOwnerRefs()
|
||||
const condition = job.getCondition()
|
||||
const selectors = job.getSelectors();
|
||||
const nodeSelector = job.getNodeSelectors();
|
||||
const images = job.getImages();
|
||||
const childPods = jobStore.getChildPods(job);
|
||||
const ownerRefs = job.getOwnerRefs();
|
||||
const condition = job.getCondition();
|
||||
return (
|
||||
<div className="JobDetails">
|
||||
<KubeObjectMeta object={job}/>
|
||||
@@ -70,7 +70,7 @@ export class JobDetails extends React.Component<Props> {
|
||||
{
|
||||
ownerRefs.map(ref => {
|
||||
const { name, kind } = ref;
|
||||
const detailsUrl = getDetailsUrl(lookupApiLink(ref, job))
|
||||
const detailsUrl = getDetailsUrl(lookupApiLink(ref, job));
|
||||
return (
|
||||
<p key={name}>
|
||||
{kind} <Link to={detailsUrl}>{name}</Link>
|
||||
@@ -102,7 +102,7 @@ export class JobDetails extends React.Component<Props> {
|
||||
</DrawerItem>
|
||||
<PodDetailsList pods={childPods} owner={job}/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props: any) => <JobDetails {...props}/>
|
||||
}
|
||||
})
|
||||
});
|
||||
kubeObjectDetailRegistry.add({
|
||||
kind: "Job",
|
||||
apiVersions: ["batch/v1"],
|
||||
@@ -120,4 +120,4 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props: any) => <KubeEventDetails {...props}/>
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ export class Jobs extends React.Component<Props> {
|
||||
title: condition.type,
|
||||
className: kebabCase(condition.type),
|
||||
}
|
||||
]
|
||||
];
|
||||
}}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user