mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use @typescript-eslint/semi.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
0b182ccf6f
commit
460dfe4d2b
179 files changed
+556
-554
No files matched your search
@@ -4,9 +4,9 @@ import { PrometheusService } from "./provider-registry";
|
||||
import logger from "../logger";
|
||||
|
||||
export class PrometheusHelm extends PrometheusLens {
|
||||
id = "helm"
|
||||
name = "Helm"
|
||||
rateAccuracy = "5m"
|
||||
id = "helm";
|
||||
name = "Helm";
|
||||
rateAccuracy = "5m";
|
||||
|
||||
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
|
||||
const labelSelector = "app=prometheus,component=server,heritage=Helm";
|
||||
|
||||
@@ -3,9 +3,9 @@ import { CoreV1Api } from "@kubernetes/client-node";
|
||||
import logger from "../logger";
|
||||
|
||||
export class PrometheusLens implements PrometheusProvider {
|
||||
id = "lens"
|
||||
name = "Lens"
|
||||
rateAccuracy = "1m"
|
||||
id = "lens";
|
||||
name = "Lens";
|
||||
rateAccuracy = "1m";
|
||||
|
||||
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { CoreV1Api, V1Service } from "@kubernetes/client-node";
|
||||
import logger from "../logger";
|
||||
|
||||
export class PrometheusOperator implements PrometheusProvider {
|
||||
rateAccuracy = "1m"
|
||||
id = "operator"
|
||||
name = "Prometheus Operator"
|
||||
rateAccuracy = "1m";
|
||||
id = "operator";
|
||||
name = "Prometheus Operator";
|
||||
|
||||
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
|
||||
try {
|
||||
|
||||
@@ -11,7 +11,7 @@ export type PrometheusClusterQuery = {
|
||||
cpuCapacity: string;
|
||||
podUsage: string;
|
||||
podCapacity: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PrometheusNodeQuery = {
|
||||
memoryUsage: string;
|
||||
@@ -20,7 +20,7 @@ export type PrometheusNodeQuery = {
|
||||
cpuCapacity: string;
|
||||
fsSize: string;
|
||||
fsUsage: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PrometheusPodQuery = {
|
||||
memoryUsage: string;
|
||||
@@ -32,32 +32,32 @@ export type PrometheusPodQuery = {
|
||||
fsUsage: string;
|
||||
networkReceive: string;
|
||||
networkTransmit: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PrometheusPvcQuery = {
|
||||
diskUsage: string;
|
||||
diskCapacity: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PrometheusIngressQuery = {
|
||||
bytesSentSuccess: string;
|
||||
bytesSentFailure: string;
|
||||
requestDurationSeconds: string;
|
||||
responseDurationSeconds: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PrometheusQueryOpts = {
|
||||
[key: string]: string | any;
|
||||
};
|
||||
|
||||
export type PrometheusQuery = PrometheusNodeQuery | PrometheusClusterQuery | PrometheusPodQuery | PrometheusPvcQuery | PrometheusIngressQuery
|
||||
export type PrometheusQuery = PrometheusNodeQuery | PrometheusClusterQuery | PrometheusPodQuery | PrometheusPvcQuery | PrometheusIngressQuery;
|
||||
|
||||
export type PrometheusService = {
|
||||
id: string;
|
||||
namespace: string;
|
||||
service: string;
|
||||
port: number;
|
||||
}
|
||||
};
|
||||
|
||||
export interface PrometheusProvider {
|
||||
id: string;
|
||||
@@ -68,10 +68,10 @@ export interface PrometheusProvider {
|
||||
|
||||
export type PrometheusProviderList = {
|
||||
[key: string]: PrometheusProvider;
|
||||
}
|
||||
};
|
||||
|
||||
export class PrometheusProviderRegistry {
|
||||
private static prometheusProviders: PrometheusProviderList = {}
|
||||
private static prometheusProviders: PrometheusProviderList = {};
|
||||
|
||||
static getProvider(type: string): PrometheusProvider {
|
||||
if (!this.prometheusProviders[type]) {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { CoreV1Api } from "@kubernetes/client-node";
|
||||
import logger from "../logger";
|
||||
|
||||
export class PrometheusStacklight implements PrometheusProvider {
|
||||
id = "stacklight"
|
||||
name = "Stacklight"
|
||||
rateAccuracy = "1m"
|
||||
id = "stacklight";
|
||||
name = "Stacklight";
|
||||
rateAccuracy = "1m";
|
||||
|
||||
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user