1515 */
1616
1717import { Dispatch , SetStateAction , ReactElement } from 'react'
18+ import { InstallationClusterType } from '@Shared/index'
1819import { NodeActionRequest } from './ResourceBrowser.Types'
1920
2021export enum ClusterFiltersType {
@@ -23,10 +24,21 @@ export enum ClusterFiltersType {
2324 UNHEALTHY = 'unhealthy' ,
2425}
2526
27+ export enum InstallationClusterStatus {
28+ Creating = 'Creating' ,
29+ Updating = 'Updating' ,
30+ Installed = 'Installed' ,
31+ Failed = 'Failed' ,
32+ Superseded = 'Superseded' ,
33+ Undefined = 'Undefined' ,
34+ }
35+
2636export enum ClusterStatusType {
2737 HEALTHY = 'healthy' ,
2838 UNHEALTHY = 'unhealthy' ,
2939 CONNECTION_FAILED = 'connection failed' ,
40+ CREATING = 'creating' ,
41+ UPDATING = 'updating' ,
3042}
3143
3244export interface ResourceDetail {
@@ -64,13 +76,15 @@ export interface ClusterCapacityType {
6476 nodeErrors : Record < string , string > [ ]
6577 status ?: ClusterStatusType
6678 isProd : boolean
79+ installationId ?: number
6780}
6881
6982export interface ClusterDetail extends ClusterCapacityType {
7083 id : number
7184 errorInNodeListing : string
7285 nodeNames ?: string [ ]
7386 isVirtualCluster ?: boolean
87+ isInstallationCluster ?: boolean
7488}
7589
7690interface NodeCordonOptions {
@@ -98,3 +112,35 @@ export interface AdditionalConfirmationModalOptionsProps<T = unknown> {
98112 setOptionsData : Dispatch < SetStateAction < T > >
99113 children ?: ReactElement
100114}
115+
116+ export interface InstallationClusterStepType {
117+ lastTransitionTime : string
118+ lastProbeTime : string
119+ message : string
120+ reason : string
121+ status : 'False' | 'True' | 'Unknown'
122+ type : string
123+ }
124+
125+ export interface InstallationClusterConfigDTO {
126+ installationId : number
127+ installationStatus : InstallationClusterStatus
128+ name : string
129+ values : string
130+ valuesSchema : string
131+ isProd : boolean
132+ installationType : InstallationClusterType
133+ conditions : InstallationClusterStepType [ ]
134+ // NOTE: for installation cluster, that is creating this will be 0
135+ installedEntityId : number | 0
136+ }
137+
138+ export interface InstallationClusterConfigType
139+ extends Pick < InstallationClusterConfigDTO , 'installationType' | 'conditions' > {
140+ schema : object
141+ values : object
142+ installationId : number
143+ name : string
144+ status : InstallationClusterStatus
145+ correspondingClusterId : number | 0
146+ }
0 commit comments