1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Replacing types on interfaces

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-06-19 15:54:15 +03:00
parent f8d2892a74
commit 1db1212ed9
3 changed files with 10 additions and 9 deletions

View File

@ -23,9 +23,9 @@ import { navigate } from "../../renderer/navigation";
import { CatalogCategory, CatalogEntity, CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
import { catalogCategoryRegistry } from "../catalog/catalog-category-registry";
type GeneralEntitySpec = {
interface GeneralEntitySpec extends CatalogEntitySpec {
path: string;
} & CatalogEntitySpec;
}
export class GeneralEntity extends CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, GeneralEntitySpec> {
public readonly apiVersion = "entity.k8slens.dev/v1alpha1";

View File

@ -30,7 +30,7 @@ import { app } from "electron";
import type { CatalogEntitySpec } from "../catalog/catalog-entity";
import { HotbarStore } from "../hotbar-store";
export type KubernetesClusterPrometheusMetrics = {
export interface KubernetesClusterPrometheusMetrics {
address?: {
namespace: string;
service: string;
@ -38,16 +38,16 @@ export type KubernetesClusterPrometheusMetrics = {
prefix: string;
};
type?: string;
};
}
export type KubernetesClusterSpec = {
export interface KubernetesClusterSpec extends CatalogEntitySpec {
kubeconfigPath: string;
kubeconfigContext: string;
metrics?: {
source: string;
prometheus?: KubernetesClusterPrometheusMetrics;
}
} & CatalogEntitySpec;
}
export interface KubernetesClusterStatus extends CatalogEntityStatus {
phase: "connected" | "disconnected" | "deleting";

View File

@ -147,13 +147,14 @@ export interface CatalogEntityAddMenuContext {
menuItems: CatalogEntityAddMenu[];
}
export type CatalogEntitySpec = {
export interface CatalogEntitySpec {
icon?: {
src?: string;
material?: string;
background?: string;
}
} & Record<string, any>;
};
[key: string]: any;
}
export interface CatalogEntityData<
Metadata extends CatalogEntityMetadata = CatalogEntityMetadata,