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,3 +1,3 @@
|
||||
export * from "./nodes"
|
||||
export * from "./nodes.route"
|
||||
export * from "./node-details"
|
||||
export * from "./nodes";
|
||||
export * from "./nodes.route";
|
||||
export * from "./node-details";
|
||||
@@ -140,7 +140,7 @@ export const NodeCharts = observer(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const options = [cpuOptions, memoryOptions, memoryOptions, podOptions];
|
||||
|
||||
@@ -151,4 +151,4 @@ export const NodeCharts = observer(() => {
|
||||
data={{ datasets: datasets[tabId] }}
|
||||
/>
|
||||
);
|
||||
})
|
||||
});
|
||||
@@ -42,12 +42,12 @@ export class NodeDetails extends React.Component<Props> {
|
||||
render() {
|
||||
const { object: node } = this.props;
|
||||
if (!node) return;
|
||||
const { status } = node
|
||||
const { nodeInfo, addresses, capacity, allocatable } = status
|
||||
const { status } = node;
|
||||
const { nodeInfo, addresses, capacity, allocatable } = status;
|
||||
const conditions = node.getActiveConditions();
|
||||
const taints = node.getTaints()
|
||||
const childPods = podsStore.getPodsByNode(node.getName())
|
||||
const metrics = nodesStore.nodeMetrics
|
||||
const taints = node.getTaints();
|
||||
const childPods = podsStore.getPodsByNode(node.getName());
|
||||
const metrics = nodesStore.nodeMetrics;
|
||||
const metricTabs = [
|
||||
<Trans>CPU</Trans>,
|
||||
<Trans>Memory</Trans>,
|
||||
@@ -120,7 +120,7 @@ export class NodeDetails extends React.Component<Props> {
|
||||
<DrawerItem name={<Trans>Conditions</Trans>} className="conditions" labelsOnly>
|
||||
{
|
||||
conditions.map(condition => {
|
||||
const { type } = condition
|
||||
const { type } = condition;
|
||||
return (
|
||||
<Badge
|
||||
key={type}
|
||||
@@ -138,7 +138,7 @@ export class NodeDetails extends React.Component<Props> {
|
||||
)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
);
|
||||
})
|
||||
}
|
||||
</DrawerItem>
|
||||
@@ -150,7 +150,7 @@ export class NodeDetails extends React.Component<Props> {
|
||||
maxMemory={node.getMemoryCapacity()}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <NodeDetails {...props} />
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
kubeObjectDetailRegistry.add({
|
||||
kind: "Node",
|
||||
@@ -169,4 +169,4 @@ kubeObjectDetailRegistry.add({
|
||||
components: {
|
||||
Details: (props) => <KubeEventDetails {...props} />
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -3,9 +3,9 @@ import { buildURL } from "../../../common/utils/buildUrl";
|
||||
|
||||
export const nodesRoute: RouteProps = {
|
||||
path: "/nodes"
|
||||
}
|
||||
};
|
||||
|
||||
export interface INodesRouteParams {
|
||||
}
|
||||
|
||||
export const nodesURL = buildURL<INodesRouteParams>(nodesRoute.path)
|
||||
export const nodesURL = buildURL<INodesRouteParams>(nodesRoute.path);
|
||||
@@ -1,4 +1,4 @@
|
||||
import { action, computed, observable } from "mobx"
|
||||
import { action, computed, observable } from "mobx";
|
||||
import { clusterApi, IClusterMetrics, INodeMetrics, Node, nodesApi } from "../../api/endpoints";
|
||||
import { autobind } from "../../utils";
|
||||
import { KubeObjectStore } from "../../kube-object.store";
|
||||
@@ -30,11 +30,11 @@ export class NodesStore extends KubeObjectStore<Node> {
|
||||
}
|
||||
|
||||
@computed get masterNodes() {
|
||||
return this.items.filter(node => node.getRoleLabels().includes("master"))
|
||||
return this.items.filter(node => node.getRoleLabels().includes("master"));
|
||||
}
|
||||
|
||||
@computed get workerNodes() {
|
||||
return this.items.filter(node => !node.getRoleLabels().includes("master"))
|
||||
return this.items.filter(node => !node.getRoleLabels().includes("master"));
|
||||
}
|
||||
|
||||
getLastMetricValues(node: Node, metricNames: string[]): number[] {
|
||||
@@ -50,7 +50,7 @@ export class NodesStore extends KubeObjectStore<Node> {
|
||||
result.metric.node,
|
||||
result.metric.instance,
|
||||
result.metric.kubernetes_node,
|
||||
].includes(nodeName)
|
||||
].includes(nodeName);
|
||||
});
|
||||
return result ? parseFloat(result.values.slice(-1)[0][1]) : 0;
|
||||
} catch (e) {
|
||||
@@ -68,5 +68,5 @@ export class NodesStore extends KubeObjectStore<Node> {
|
||||
}
|
||||
}
|
||||
|
||||
export const nodesStore = new NodesStore()
|
||||
export const nodesStore = new NodesStore();
|
||||
apiManager.registerStore(nodesStore);
|
||||
@@ -60,7 +60,7 @@ export class Nodes extends React.Component<Props> {
|
||||
children: _i18n._(t`CPU:`) + ` ${Math.ceil(usage * 100) / cores}\%, ` + _i18n._(t`cores:`) + ` ${cores}`
|
||||
}}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
renderMemoryUsage(node: Node) {
|
||||
@@ -77,7 +77,7 @@ export class Nodes extends React.Component<Props> {
|
||||
children: _i18n._(t`Memory:`) + ` ${Math.ceil(usage * 100 / capacity)}%, ${bytesToUnits(usage, 3)}`
|
||||
}}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
renderDiskUsage(node: Node): any {
|
||||
@@ -94,17 +94,17 @@ export class Nodes extends React.Component<Props> {
|
||||
children: _i18n._(t`Disk:`) + ` ${Math.ceil(usage * 100 / capacity)}%, ${bytesToUnits(usage, 3)}`
|
||||
}}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
renderConditions(node: Node) {
|
||||
if (!node.status.conditions) {
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
const conditions = node.getActiveConditions();
|
||||
return conditions.map(condition => {
|
||||
const { type } = condition
|
||||
const tooltipId = `node-${node.getName()}-condition-${type}`
|
||||
const { type } = condition;
|
||||
const tooltipId = `node-${node.getName()}-condition-${type}`;
|
||||
return (
|
||||
<div key={type} id={tooltipId} className={cssNames("condition", kebabCase(type))}>
|
||||
{type}
|
||||
@@ -116,8 +116,8 @@ export class Nodes extends React.Component<Props> {
|
||||
</div>
|
||||
)}
|
||||
</Tooltip>
|
||||
</div>)
|
||||
})
|
||||
</div>);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -177,10 +177,10 @@ export class Nodes extends React.Component<Props> {
|
||||
node.status.nodeInfo.kubeletVersion,
|
||||
node.getAge(),
|
||||
this.renderConditions(node),
|
||||
]
|
||||
];
|
||||
}}
|
||||
/>
|
||||
</TabLayout>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user