zterton-status/src/typs/clouds/index.ts
2021-10-19 21:44:06 +01:00

86 lines
1.7 KiB
TypeScript

export const enum LanguageType {
en = 'en',
es = 'es',
None = 'None',
}
export interface StatusItemType {
title: string
content: string
lang: LanguageType
datetime: string
isOpen: boolean
}
export interface StatusItemDataType {
[key: string]: any
title: string
content: string
lang: LanguageType
datetime: string
}
export const enum ReqType {
tcp = 'tcp',
https = 'https',
NotSet = 'NotSet',
}
export const enum CriticalType {
yes = 'yes',
cloud = 'cloud',
group = 'group',
ifresized = 'ifresized',
no = 'no',
}
export interface SrvcType {
name: string
path: string
req: ReqType
target: string
liveness: string
critical: CriticalType
}
export interface SrvcInfoType {
[key: string]: any
name: string
info: string
srvc: SrvcType
}
export interface CloudGroupItemType {
[key: string]: any
hostname: string
tsksrvcs: SrvcType[]
appsrvcs: SrvcType[]
}
export interface CloudGroupServcType {
[key: string]: any
hostname: string
name: string
tsksrvcs: SrvcInfoElemType[]
appsrvcs: SrvcInfoElemType[]
}
export interface CloudDataCheck {
[key: string]: any
name: string
apps: Map<string, Map<string, CloudGroupServcType>>
cloud: Map<string, Map<string, CloudGroupServcType>>
infos: StatusItemType[]
}
export interface CloudOptionType {
name: string
option: number
}
export interface CloudGroupDataType {
[key: string]: CloudGroupItemType[] | any
}
export interface ResCloudDataCheck {
[key: string]: any
name: string
cloud: CloudGroupDataType
apps: CloudGroupDataType
// cloud: CloudGroupSrvcType
// statusentries: StatusItemDataType[]
}
export interface ResCloudDataCheckDefs {
[key: string]: any
check: ResCloudDataCheck[]
defs: any
}