Skip to content

Commit 9bbe156

Browse files
committed
fix: review comments & move from dashboard
1 parent 9662256 commit 9bbe156

File tree

11 files changed

+522
-2
lines changed

11 files changed

+522
-2
lines changed

src/Common/CodeEditor/CodeEditor.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
172172
})
173173
}
174174

175+
if (mode === MODES.JSON) {
176+
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
177+
validate: true,
178+
})
179+
}
180+
175181
editorRef.current = editor
176182
monacoRef.current = monaco
177183
}

src/Common/Constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const ROUTES = {
102102
PLUGIN_GLOBAL_LIST_DETAIL_V2: 'plugin/global/list/detail/v2',
103103
PLUGIN_GLOBAL_LIST_V2: 'plugin/global/list/v2',
104104
PLUGIN_GLOBAL_LIST_TAGS: 'plugin/global/list/tags',
105+
DEPLOYMENT_CHARTS_LIST: 'deployment/template/fetch',
105106
}
106107

107108
export enum KEY_VALUE {

src/Common/RJSF/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const PLACEHOLDERS = {
2222

2323
export const DEFAULT_FIELD_TITLE = 'Key not available'
2424

25-
export const HideSubmitButtonUISchema = {
25+
export const HIDE_SUBMIT_BUTTON_UI_SCHEMA = {
2626
'ui:submitButtonOptions': {
2727
norender: true,
2828
},

src/Common/RJSF/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
export { RJSFForm } from './Form'
1818
export * from './types'
1919
export { getInferredTypeFromValueType, getRedirectionProps } from './utils'
20-
export { HideSubmitButtonUISchema } from './constants'
20+
export { HIDE_SUBMIT_BUTTON_UI_SCHEMA } from './constants'
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"args": {
5+
"type": "object",
6+
"title": "Arguments",
7+
"properties": {
8+
"value": {
9+
"type": "array",
10+
"items": {
11+
"type": "string"
12+
},
13+
"title": "Value",
14+
"hidden": {
15+
"condition": false,
16+
"match": "enabled"
17+
}
18+
},
19+
"enabled": {
20+
"type": "boolean",
21+
"title": "Enabled"
22+
}
23+
}
24+
},
25+
"command": {
26+
"type": "object",
27+
"title": "Command",
28+
"properties": {
29+
"value": {
30+
"type": "array",
31+
"items": {
32+
"type": "string"
33+
},
34+
"title": "Value",
35+
"hidden": {
36+
"condition": false,
37+
"match": "enabled"
38+
}
39+
},
40+
"enabled": {
41+
"type": "boolean",
42+
"title": "Enabled"
43+
}
44+
}
45+
},
46+
"ingress": {
47+
"type": "object",
48+
"title": "HTTP Requests Routes",
49+
"properties": {
50+
"className": {
51+
"type": "string",
52+
"title": "Class",
53+
"hidden": {
54+
"condition": false,
55+
"match": "enabled"
56+
}
57+
},
58+
"hosts": {
59+
"type": "array",
60+
"items": {
61+
"type": "object",
62+
"properties": {
63+
"host": {
64+
"type": "string"
65+
},
66+
"paths": {
67+
"type": "array",
68+
"items": {
69+
"type": "string"
70+
}
71+
}
72+
}
73+
},
74+
"hidden": {
75+
"condition": false,
76+
"match": "enabled"
77+
}
78+
},
79+
"enabled": {
80+
"type": "boolean",
81+
"title": "Enable HTTP Requests Routes"
82+
}
83+
}
84+
},
85+
"resources": {
86+
"type": "object",
87+
"title": "Resources (CPU & RAM)",
88+
"properties": {
89+
"limits": {
90+
"type": "object",
91+
"required": ["cpu", "memory"],
92+
"properties": {
93+
"cpu": {
94+
"type": "string"
95+
},
96+
"memory": {
97+
"type": "string"
98+
}
99+
}
100+
},
101+
"requests": {
102+
"type": "object",
103+
"properties": {
104+
"cpu": {
105+
"type": "string"
106+
},
107+
"memory": {
108+
"type": "string"
109+
}
110+
}
111+
}
112+
}
113+
},
114+
"autoscaling": {
115+
"type": "object",
116+
"title": "Autoscaling",
117+
"properties": {
118+
"MaxReplicas": {
119+
"type": ["integer", "string"],
120+
"title": "Maximum Replicas",
121+
"pattern": "^[a-zA-Z0-9-+\/*%_\\s]+$",
122+
"hidden": {
123+
"condition": false,
124+
"match": "enabled"
125+
}
126+
},
127+
"MinReplicas": {
128+
"type": ["integer", "string"],
129+
"title": "Minimum Replicas",
130+
"pattern": "^[a-zA-Z0-9-+\/*%_\\s]+$",
131+
"hidden": {
132+
"condition": false,
133+
"match": "enabled"
134+
}
135+
},
136+
"TargetCPUUtilizationPercentage": {
137+
"type": ["integer", "string"],
138+
"title": "Target CPU Utilization Percentage",
139+
"pattern": "^[a-zA-Z0-9-+\/*%_\\s]+$",
140+
"hidden": {
141+
"condition": false,
142+
"match": "enabled"
143+
}
144+
},
145+
"TargetMemoryUtilizationPercentage": {
146+
"type": ["integer", "string"],
147+
"title": "TargetMemoryUtilizationPercentage",
148+
"pattern": "^[a-zA-Z0-9-+\/*%_\\s]+$",
149+
"hidden": {
150+
"condition": false,
151+
"match": "enabled"
152+
}
153+
},
154+
"enabled": {
155+
"type": "boolean",
156+
"title": "Enabled"
157+
}
158+
}
159+
},
160+
"EnvVariables": {
161+
"type": "array",
162+
"items": {
163+
"type": "object",
164+
"properties": {
165+
"key": {
166+
"type": "string"
167+
},
168+
"value": {
169+
"type": "string"
170+
}
171+
}
172+
},
173+
"title": "Environment Variables"
174+
},
175+
"ContainerPort": {
176+
"type": "array",
177+
"items": {
178+
"type": "object",
179+
"properties": {
180+
"port": {
181+
"type": ["integer", "string"]
182+
},
183+
"servicePort": {
184+
"type": ["integer", "string"]
185+
}
186+
},
187+
"required": ["port", "servicePort"]
188+
},
189+
"title": "Container Port"
190+
},
191+
"service": {
192+
"type": "object",
193+
"title": "Service",
194+
"properties": {
195+
"type": {
196+
"type": "string",
197+
"title": "Type"
198+
},
199+
"annotations": {
200+
"type": "object",
201+
"additionalProperties": {
202+
"type": "string"
203+
},
204+
"title": "Annotations"
205+
}
206+
}
207+
},
208+
"ReadinessProbe": {
209+
"type": "object",
210+
"title": "Readiness Probe",
211+
"properties": {
212+
"Path": {
213+
"type": "string"
214+
},
215+
"port": {
216+
"type": ["integer", "string"]
217+
}
218+
}
219+
},
220+
"LivenessProbe": {
221+
"type": "object",
222+
"title": "Liveness Probe",
223+
"properties": {
224+
"Path": {
225+
"type": "string"
226+
},
227+
"port": {
228+
"type": ["integer", "string"]
229+
}
230+
}
231+
},
232+
"tolerations": {
233+
"type": "array",
234+
"items": {
235+
"type": "object",
236+
"properties": {
237+
"key": {
238+
"type": "string"
239+
},
240+
"operator": {
241+
"type": "string",
242+
"pattern": "Equal|Exists"
243+
},
244+
"value": {
245+
"type": "string"
246+
},
247+
"effect": {
248+
"type": "string",
249+
"pattern": "NoSchedule|PreferNoSchedule|NoExecute"
250+
}
251+
}
252+
}
253+
},
254+
"serviceAccount": {
255+
"type": "object",
256+
"properties": {
257+
"create": {
258+
"type": "boolean"
259+
},
260+
"name": {
261+
"type": "string",
262+
"hidden": {
263+
"condition": false,
264+
"match": "create"
265+
}
266+
}
267+
}
268+
}
269+
}
270+
}

0 commit comments

Comments
 (0)