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
@@ -42,6 +42,7 @@ export class DaemonSetDetails extends React.Component<Props> {
|
||||
|
||||
render() {
|
||||
const { object: daemonSet } = this.props;
|
||||
|
||||
if (!daemonSet) return null;
|
||||
const { spec } = daemonSet;
|
||||
const selectors = daemonSet.getSelectors();
|
||||
@@ -49,6 +50,7 @@ export class DaemonSetDetails extends React.Component<Props> {
|
||||
const nodeSelector = daemonSet.getNodeSelectors();
|
||||
const childPods = daemonSetStore.getChildPods(daemonSet);
|
||||
const metrics = daemonSetStore.metrics;
|
||||
|
||||
return (
|
||||
<div className="DaemonSetDetails">
|
||||
{podsStore.isLoaded && (
|
||||
|
||||
@@ -13,6 +13,7 @@ export class DaemonSetStore extends KubeObjectStore<DaemonSet> {
|
||||
|
||||
async loadMetrics(daemonSet: DaemonSet) {
|
||||
const pods = this.getChildPods(daemonSet);
|
||||
|
||||
this.metrics = await podsApi.getMetrics(pods, daemonSet.getNs(), "");
|
||||
}
|
||||
|
||||
@@ -22,8 +23,10 @@ export class DaemonSetStore extends KubeObjectStore<DaemonSet> {
|
||||
|
||||
getStatuses(daemonSets?: DaemonSet[]) {
|
||||
const status = { failed: 0, pending: 0, running: 0 };
|
||||
|
||||
daemonSets.forEach(daemonSet => {
|
||||
const pods = this.getChildPods(daemonSet);
|
||||
|
||||
if (pods.some(pod => pod.getStatus() === PodStatus.FAILED)) {
|
||||
status.failed++;
|
||||
}
|
||||
@@ -34,6 +37,7 @@ export class DaemonSetStore extends KubeObjectStore<DaemonSet> {
|
||||
status.running++;
|
||||
}
|
||||
});
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user