mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: object-curly-spacing (error) (#4198)
This commit is contained in:
1 parent
0759b80435
commit
41863e87ce
89 files changed
+230
-216
No files matched your search
@@ -31,7 +31,7 @@ export default class ClusterMetricsFeatureExtension extends Renderer.LensExtensi
|
||||
title: "Lens Metrics",
|
||||
priority: 5,
|
||||
components: {
|
||||
View: ({ entity = null }: { entity: Common.Catalog.KubernetesCluster}) => {
|
||||
View: ({ entity = null }: { entity: Common.Catalog.KubernetesCluster }) => {
|
||||
return (
|
||||
<MetricsSettings cluster={entity} />
|
||||
);
|
||||
|
||||
@@ -92,11 +92,11 @@ export class MetricsFeature {
|
||||
}
|
||||
|
||||
async getStatus(): Promise<MetricsStatus> {
|
||||
const status: MetricsStatus = { installed: false, canUpgrade: false};
|
||||
const status: MetricsStatus = { installed: false, canUpgrade: false };
|
||||
|
||||
try {
|
||||
const namespaceApi = forCluster(this.cluster, Namespace);
|
||||
const namespace = await namespaceApi.get({name: "lens-metrics"});
|
||||
const namespace = await namespaceApi.get({ name: "lens-metrics" });
|
||||
|
||||
if (namespace?.kind) {
|
||||
const currentVersion = namespace.metadata.annotations?.extensionVersion || "0.0.0";
|
||||
|
||||
@@ -114,7 +114,7 @@ export class MetricsSettings extends React.Component<Props> {
|
||||
const statefulSet = forCluster(this.props.cluster, StatefulSet);
|
||||
|
||||
try {
|
||||
await statefulSet.get({name: "prometheus", namespace: "lens-metrics"});
|
||||
await statefulSet.get({ name: "prometheus", namespace: "lens-metrics" });
|
||||
this.featureStates.prometheus = true;
|
||||
} catch(e) {
|
||||
if (e?.error?.code === 404) {
|
||||
@@ -127,7 +127,7 @@ export class MetricsSettings extends React.Component<Props> {
|
||||
const deployment = forCluster(this.props.cluster, Deployment);
|
||||
|
||||
try {
|
||||
await deployment.get({name: "kube-state-metrics", namespace: "lens-metrics"});
|
||||
await deployment.get({ name: "kube-state-metrics", namespace: "lens-metrics" });
|
||||
this.featureStates.kubeStateMetrics = true;
|
||||
} catch(e) {
|
||||
if (e?.error?.code === 404) {
|
||||
@@ -140,7 +140,7 @@ export class MetricsSettings extends React.Component<Props> {
|
||||
const daemonSet = forCluster(this.props.cluster, DaemonSet);
|
||||
|
||||
try {
|
||||
await daemonSet.get({name: "node-exporter", namespace: "lens-metrics"});
|
||||
await daemonSet.get({ name: "node-exporter", namespace: "lens-metrics" });
|
||||
this.featureStates.nodeExporter = true;
|
||||
} catch(e) {
|
||||
if (e?.error?.code === 404) {
|
||||
@@ -207,14 +207,14 @@ export class MetricsSettings extends React.Component<Props> {
|
||||
<>
|
||||
{ this.props.cluster.status.phase !== "connected" && (
|
||||
<section>
|
||||
<p style={ {color: "var(--colorError)"} }>
|
||||
<p style={ { color: "var(--colorError)" } }>
|
||||
Lens Metrics settings requires established connection to the cluster.
|
||||
</p>
|
||||
</section>
|
||||
)}
|
||||
{ !this.isActiveMetricsProvider && (
|
||||
<section>
|
||||
<p style={ {color: "var(--colorError)"} }>
|
||||
<p style={ { color: "var(--colorError)" } }>
|
||||
Other metrics provider is currently active. See "Metrics" tab for details.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user