Skip to content

Commit 22becf9

Browse files
committed
chore: Types moved to resource browser
1 parent 3e43ad0 commit 22becf9

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/Pages/ResourceBrowser/types.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,47 @@ export enum ClusterStatusType {
99
UNHEALTHY = 'unhealthy',
1010
CONNECTION_FAILED = 'connection failed',
1111
}
12+
13+
export interface ResourceDetail {
14+
name: string
15+
capacity: string
16+
allocatable: string
17+
usage: string
18+
request: string
19+
limit: string
20+
usagePercentage: string
21+
requestPercentage: string
22+
limitPercentage: string
23+
}
24+
25+
export interface NodeTaintType {
26+
effect: string
27+
key: string
28+
value: string
29+
}
30+
31+
export interface NodeDetailsType {
32+
nodeName: string
33+
nodeGroup: string
34+
taints?: NodeTaintType[]
35+
}
36+
37+
export interface ClusterCapacityType {
38+
name: string
39+
nodeCount: number
40+
nodeK8sVersions: string[]
41+
cpu: ResourceDetail
42+
memory: ResourceDetail
43+
serverVersion: string
44+
nodeDetails?: NodeDetailsType[]
45+
nodeErrors: Record<string, string>[]
46+
status?: ClusterStatusType
47+
isProd: boolean
48+
}
49+
50+
export interface ClusterDetail extends ClusterCapacityType {
51+
id: number
52+
errorInNodeListing: string
53+
nodeNames?: string[]
54+
isVirtualCluster?: boolean
55+
}

0 commit comments

Comments
 (0)