File tree Expand file tree Collapse file tree 6 files changed +45
-24
lines changed Expand file tree Collapse file tree 6 files changed +45
-24
lines changed Original file line number Diff line number Diff line change 105
105
min-height : 300px ;
106
106
}
107
107
108
- .code-editor__information {
109
- font-size : 12px ;
110
- font-weight : 400 ;
111
- line-height : 1.33 ;
112
- letter-spacing : normal ;
113
- color : var (--N900 );
114
- height : auto ;
115
- padding : 8px 16px ;
116
- border-bottom : 1px solid #d6dbdf ;
117
- background-color : var (--B100 );
118
- }
119
-
120
108
.code-editor__information-info-icon {
121
109
width : 16px ;
122
110
height : 16px ;
140
128
background : url (' ../../Assets/Icon/ic-compare.svg' );
141
129
}
142
130
143
- .code-editor__error {
144
- background-color : #fde7e7 ;
145
- color : #862020 ;
146
- font-size : 12px ;
147
- font-weight : 400 ;
148
- line-height : 1.33 ;
149
- padding : 8px 16px ;
150
- border-bottom : 1px solid #d6dbdf ;
151
- }
152
-
153
131
.monaco-editor-hover {
154
132
margin-left : 40px ;
155
133
}
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export const ROUTES = {
114
114
DEPLOYMENT_CHARTS_LIST : 'deployment/template/fetch' ,
115
115
USER_LIST_MIN : 'user/list/min' ,
116
116
CONFIG_DATA : 'config/data' ,
117
+ K8S_RESOURCE_LIST : 'k8s/resource/list' ,
117
118
}
118
119
119
120
export enum KEY_VALUE {
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
+ import { forwardRef } from 'react'
17
18
import RJSF from '@rjsf/core'
18
19
import RJSFValidator from '@rjsf/validator-ajv8'
19
20
@@ -27,7 +28,7 @@ import './rjsfForm.scss'
27
28
const Form = RJSF
28
29
const validator = RJSFValidator
29
30
30
- export const RJSFForm = ( props : FormProps ) => (
31
+ export const RJSFForm = forwardRef ( ( props : FormProps , ref : FormProps [ 'ref' ] ) => (
31
32
< Form
32
33
noHtml5Validate
33
34
showErrorList = { false }
@@ -42,5 +43,6 @@ export const RJSFForm = (props: FormProps) => (
42
43
formContext = { props . formData }
43
44
widgets = { { ...widgets , ...props . widgets } }
44
45
translateString = { translateString }
46
+ ref = { ref }
45
47
/>
46
- )
48
+ ) )
Original file line number Diff line number Diff line change @@ -40,6 +40,33 @@ export interface K8SObjectBaseType {
40
40
isExpanded : boolean
41
41
}
42
42
43
+ interface K8sRequestResourceIdentifierType {
44
+ groupVersionKind : GVKType
45
+ namespace ?: string
46
+ name ?: string
47
+ }
48
+
49
+ interface ResourceListPayloadK8sRequestType {
50
+ resourceIdentifier : K8sRequestResourceIdentifierType
51
+ patch ?: string
52
+ forceDelete ?: boolean
53
+ }
54
+
55
+ export interface K8sResourceListPayloadType {
56
+ clusterId : number
57
+ filter ?: string
58
+ k8sRequest : ResourceListPayloadK8sRequestType
59
+ }
60
+
61
+ export type K8sResourceDetailDataType = {
62
+ [ key : string ] : string | number | object
63
+ }
64
+
65
+ export interface K8sResourceDetailType {
66
+ headers : string [ ]
67
+ data : K8sResourceDetailDataType [ ]
68
+ }
69
+
43
70
export interface BulkSelectionActionWidgetProps {
44
71
count : number
45
72
handleOpenBulkDeleteModal : ( ) => void
Original file line number Diff line number Diff line change 17
17
export * from './ResourceBrowser.Types'
18
18
export * from './Helper'
19
19
export * from './types'
20
+ 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