File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed
Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export const ROUTES = {
114114 DEPLOYMENT_CHARTS_LIST : 'deployment/template/fetch' ,
115115 USER_LIST_MIN : 'user/list/min' ,
116116 CONFIG_DATA : 'config/data' ,
117+ K8S_RESOURCE_LIST : 'k8s/resource/list' ,
117118}
118119
119120export enum KEY_VALUE {
Original file line number Diff line number Diff line change @@ -38,3 +38,29 @@ export interface K8SObjectBaseType {
3838 name : string
3939 isExpanded : boolean
4040}
41+
42+ interface K8sRequestResourceIdentifierType {
43+ groupVersionKind : GVKType
44+ namespace ?: string
45+ name ?: string
46+ }
47+
48+ interface ResourceListPayloadK8sRequestType {
49+ resourceIdentifier : K8sRequestResourceIdentifierType
50+ patch ?: string
51+ forceDelete ?: boolean
52+ }
53+
54+ export interface K8sResourceListPayloadType {
55+ clusterId : number
56+ k8sRequest : ResourceListPayloadK8sRequestType
57+ }
58+
59+ export type K8sResourceDetailDataType = {
60+ [ key : string ] : string | number | object
61+ }
62+
63+ export interface K8sResourceDetailType {
64+ headers : string [ ]
65+ data : K8sResourceDetailDataType [ ]
66+ }
Original file line number Diff line number Diff line change 1616
1717export * from './ResourceBrowser.Types'
1818export * from './Helper'
19+ export * from './service'
Original file line number Diff line number Diff line change 1+ import { post } from '@Common/Api'
2+ import { ROUTES } from '@Common/Constants'
3+ import { ResponseType } from '@Common/Types'
4+ import { K8sResourceDetailType , K8sResourceListPayloadType } from './ResourceBrowser.Types'
5+
6+ export const getK8sResourceList = (
7+ resourceListPayload : K8sResourceListPayloadType ,
8+ signal ?: AbortSignal ,
9+ ) : Promise < ResponseType < K8sResourceDetailType > > =>
10+ post ( ROUTES . K8S_RESOURCE_LIST , resourceListPayload , {
11+ signal,
12+ } )
You can’t perform that action at this time.
0 commit comments