mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
02e77afcd1
commit
c6dce043a7
406 files changed
+1590
-1580
No files matched your search
@@ -36,13 +36,13 @@ const tolerations: IToleration[] =[
|
||||
key: "CriticalAddonsOnly",
|
||||
operator: "Exist",
|
||||
effect: "NoExecute",
|
||||
tolerationSeconds: 3600
|
||||
tolerationSeconds: 3600,
|
||||
},
|
||||
{
|
||||
key: "node.kubernetes.io/not-ready",
|
||||
operator: "NoExist",
|
||||
effect: "NoSchedule",
|
||||
tolerationSeconds: 7200
|
||||
tolerationSeconds: 7200,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export const ContainerCharts = observer(() => {
|
||||
memoryUsage,
|
||||
memoryRequests,
|
||||
memoryLimits,
|
||||
fsUsage
|
||||
fsUsage,
|
||||
} = mapValues(metrics, metric => normalizeMetrics(metric).data.result[0].values);
|
||||
|
||||
const datasets = [
|
||||
@@ -56,22 +56,22 @@ export const ContainerCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `CPU cores usage`,
|
||||
borderColor: "#3D90CE",
|
||||
data: cpuUsage.map(([x, y]) => ({ x, y }))
|
||||
data: cpuUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
{
|
||||
id: "cpuRequests",
|
||||
label: `Requests`,
|
||||
tooltip: `CPU requests`,
|
||||
borderColor: "#30b24d",
|
||||
data: cpuRequests.map(([x, y]) => ({ x, y }))
|
||||
data: cpuRequests.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
{
|
||||
id: "cpuLimits",
|
||||
label: `Limits`,
|
||||
tooltip: `CPU limits`,
|
||||
borderColor: chartCapacityColor,
|
||||
data: cpuLimits.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
data: cpuLimits.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
// Memory
|
||||
[
|
||||
@@ -80,22 +80,22 @@ export const ContainerCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `Memory usage`,
|
||||
borderColor: "#c93dce",
|
||||
data: memoryUsage.map(([x, y]) => ({ x, y }))
|
||||
data: memoryUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
{
|
||||
id: "memoryRequests",
|
||||
label: `Requests`,
|
||||
tooltip: `Memory requests`,
|
||||
borderColor: "#30b24d",
|
||||
data: memoryRequests.map(([x, y]) => ({ x, y }))
|
||||
data: memoryRequests.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
{
|
||||
id: "memoryLimits",
|
||||
label: `Limits`,
|
||||
tooltip: `Memory limits`,
|
||||
borderColor: chartCapacityColor,
|
||||
data: memoryLimits.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
data: memoryLimits.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
// Filesystem
|
||||
[
|
||||
@@ -104,9 +104,9 @@ export const ContainerCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `Bytes consumed on this filesystem`,
|
||||
borderColor: "#ffc63d",
|
||||
data: fsUsage.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
]
|
||||
data: fsUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
const options = tabId == 0 ? cpuOptions : memoryOptions;
|
||||
|
||||
@@ -52,7 +52,7 @@ export const PodCharts = observer(() => {
|
||||
memoryUsage,
|
||||
fsUsage,
|
||||
networkReceive,
|
||||
networkTransmit
|
||||
networkTransmit,
|
||||
} = mapValues(metrics, metric => normalizeMetrics(metric).data.result[0].values);
|
||||
|
||||
const datasets = [
|
||||
@@ -63,8 +63,8 @@ export const PodCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `Container CPU cores usage`,
|
||||
borderColor: "#3D90CE",
|
||||
data: cpuUsage.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
data: cpuUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
// Memory
|
||||
[
|
||||
@@ -73,7 +73,7 @@ export const PodCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `Container memory usage`,
|
||||
borderColor: "#c93dce",
|
||||
data: memoryUsage.map(([x, y]) => ({ x, y }))
|
||||
data: memoryUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
// Network
|
||||
@@ -83,15 +83,15 @@ export const PodCharts = observer(() => {
|
||||
label: `Receive`,
|
||||
tooltip: `Bytes received by all containers`,
|
||||
borderColor: "#64c5d6",
|
||||
data: networkReceive.map(([x, y]) => ({ x, y }))
|
||||
data: networkReceive.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
{
|
||||
id: `${id}-networkTransmit`,
|
||||
label: `Transmit`,
|
||||
tooltip: `Bytes transmitted from all containers`,
|
||||
borderColor: "#46cd9e",
|
||||
data: networkTransmit.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
data: networkTransmit.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
// Filesystem
|
||||
[
|
||||
@@ -100,9 +100,9 @@ export const PodCharts = observer(() => {
|
||||
label: `Usage`,
|
||||
tooltip: `Bytes consumed on this filesystem`,
|
||||
borderColor: "#ffc63d",
|
||||
data: fsUsage.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
]
|
||||
data: fsUsage.map(([x, y]) => ({ x, y })),
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
@@ -139,7 +139,7 @@ export const ContainerEnvironment = observer((props: Props) => {
|
||||
return Object.keys(secret.data).map(key => {
|
||||
const secretKeyRef = {
|
||||
name: secret.getName(),
|
||||
key
|
||||
key,
|
||||
};
|
||||
|
||||
const value = (
|
||||
|
||||
@@ -62,7 +62,7 @@ export class PodDetailsList extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
this.metricsWatcher.start(true);
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.props.owner, () => this.metricsWatcher.restart(true))
|
||||
reaction(() => this.props.owner, () => this.metricsWatcher.restart(true)),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class PodDetailsSecrets extends Component<Props> {
|
||||
pod.getSecrets().map(secretName => secretsApi.get({
|
||||
name: secretName,
|
||||
namespace: pod.getNs(),
|
||||
}))
|
||||
})),
|
||||
);
|
||||
|
||||
secrets.forEach(secret => secret && this.secrets.set(secret.getName(), secret));
|
||||
|
||||
@@ -63,7 +63,7 @@ export class PodDetails extends React.Component<Props> {
|
||||
reaction(() => this.props.object, () => {
|
||||
this.metrics = null;
|
||||
this.containerMetrics = null;
|
||||
})
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ export class PodsStore extends KubeObjectStore<Pod> {
|
||||
const metrics = this.kubeMetrics.find(metric => {
|
||||
return [
|
||||
metric.getName() === pod.getName(),
|
||||
metric.getNs() === pod.getNs()
|
||||
metric.getNs() === pod.getNs(),
|
||||
].every(v => v);
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ export class PodsStore extends KubeObjectStore<Pod> {
|
||||
|
||||
return {
|
||||
cpu: total.cpu + cpuUnitsToNumber(cpu),
|
||||
memory: total.memory + unitsToBytes(memory)
|
||||
memory: total.memory + unitsToBytes(memory),
|
||||
};
|
||||
}, empty);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export class Pods extends React.Component<Props> {
|
||||
className={cssNames(state, { ready })}
|
||||
tooltip={{
|
||||
formatters: {
|
||||
tableView: true
|
||||
tableView: true,
|
||||
},
|
||||
children: Object.keys(state).map(status => (
|
||||
<Fragment key={status}>
|
||||
@@ -81,7 +81,7 @@ export class Pods extends React.Component<Props> {
|
||||
</div>
|
||||
))}
|
||||
</Fragment>
|
||||
))
|
||||
)),
|
||||
}}
|
||||
/>
|
||||
</Fragment>
|
||||
@@ -153,7 +153,7 @@ export class Pods extends React.Component<Props> {
|
||||
: "",
|
||||
pod.getQosClass(),
|
||||
pod.getAge(),
|
||||
{ title: pod.getStatusMessage(), className: kebabCase(pod.getStatusMessage()) }
|
||||
{ title: pod.getStatusMessage(), className: kebabCase(pod.getStatusMessage()) },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user