|
1 | | -import { BusyIndicator, ObjectPage, ObjectPageSection, ObjectPageTitle, Panel, Title, Button } from '@ui5/webcomponents-react'; |
| 1 | +import { BusyIndicator, ObjectPage, ObjectPageSection, ObjectPageTitle, Panel, Title } from '@ui5/webcomponents-react'; |
2 | 2 | import { useParams } from 'react-router-dom'; |
3 | 3 | import CopyKubeconfigButton from '../../../components/ControlPlanes/CopyKubeconfigButton.tsx'; |
4 | 4 | import styles from './McpPage.module.css'; |
@@ -182,192 +182,72 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName: |
182 | 182 |
|
183 | 183 | {/* Left side: Crossplane component in large (bottom) */} |
184 | 184 | <BentoCard size="large" gridColumn="1 / 9" gridRow="5 / 7"> |
185 | | - <div |
186 | | - onClick={handleCrossplaneClick} |
187 | | - style={{ |
188 | | - cursor: 'pointer', |
189 | | - height: '100%', |
190 | | - width: '100%', |
191 | | - position: 'relative' |
192 | | - }} |
193 | | - > |
194 | | - <ComponentCard |
195 | | - enabled={!!mcp?.spec?.components?.crossplane} |
196 | | - version={mcp?.spec?.components?.crossplane?.version} |
197 | | - allItems={allItems} |
198 | | - isLoading={managedResourcesLoading} |
199 | | - error={managedResourcesError} |
200 | | - config={crossplaneConfig} |
201 | | - /> |
202 | | - <Button |
203 | | - icon="sap-icon://expand" |
204 | | - design="Transparent" |
205 | | - style={{ |
206 | | - position: 'absolute', |
207 | | - bottom: '8px', |
208 | | - right: '8px', |
209 | | - minWidth: '32px', |
210 | | - height: '32px', |
211 | | - zIndex: 10 |
212 | | - }} |
213 | | - onClick={(e) => { |
214 | | - e.stopPropagation(); |
215 | | - handleCrossplaneClick(); |
216 | | - }} |
217 | | - /> |
218 | | - </div> |
| 185 | + <ComponentCard |
| 186 | + enabled={!!mcp?.spec?.components?.crossplane} |
| 187 | + version={mcp?.spec?.components?.crossplane?.version} |
| 188 | + allItems={allItems} |
| 189 | + isLoading={managedResourcesLoading} |
| 190 | + error={managedResourcesError} |
| 191 | + config={crossplaneConfig} |
| 192 | + onClick={handleCrossplaneClick} |
| 193 | + size="large" |
| 194 | + /> |
219 | 195 | </BentoCard> |
220 | 196 |
|
221 | 197 | {/* Right side: First medium component (GitOps) */} |
222 | 198 | <BentoCard size="medium" gridColumn="9 / 13" gridRow="1 / 3"> |
223 | | - <div |
224 | | - onClick={handleFluxClick} |
225 | | - style={{ |
226 | | - cursor: 'pointer', |
227 | | - height: '100%', |
228 | | - width: '100%', |
229 | | - position: 'relative' |
230 | | - }} |
231 | | - > |
232 | | - <ComponentCard |
233 | | - enabled={!!mcp?.spec?.components?.flux} |
234 | | - version={mcp?.spec?.components?.flux?.version} |
235 | | - allItems={allItems} |
236 | | - isLoading={managedResourcesLoading} |
237 | | - error={managedResourcesError} |
238 | | - config={gitOpsConfig} |
239 | | - /> |
240 | | - <Button |
241 | | - icon="sap-icon://expand" |
242 | | - design="Transparent" |
243 | | - style={{ |
244 | | - position: 'absolute', |
245 | | - bottom: '8px', |
246 | | - right: '8px', |
247 | | - minWidth: '32px', |
248 | | - height: '32px', |
249 | | - zIndex: 10 |
250 | | - }} |
251 | | - onClick={(e) => { |
252 | | - e.stopPropagation(); |
253 | | - handleFluxClick(); |
254 | | - }} |
255 | | - /> |
256 | | - </div> |
| 199 | + <ComponentCard |
| 200 | + enabled={!!mcp?.spec?.components?.flux} |
| 201 | + version={mcp?.spec?.components?.flux?.version} |
| 202 | + allItems={allItems} |
| 203 | + isLoading={managedResourcesLoading} |
| 204 | + error={managedResourcesError} |
| 205 | + config={gitOpsConfig} |
| 206 | + onClick={handleFluxClick} |
| 207 | + size="medium" |
| 208 | + /> |
257 | 209 | </BentoCard> |
258 | 210 |
|
259 | 211 | {/* Right side: Second medium component (GitOps copy) */} |
260 | 212 | <BentoCard size="medium" gridColumn="9 / 13" gridRow="3 / 5"> |
261 | | - <div |
262 | | - onClick={handleFluxClick} |
263 | | - style={{ |
264 | | - cursor: 'pointer', |
265 | | - height: '100%', |
266 | | - width: '100%', |
267 | | - position: 'relative' |
268 | | - }} |
269 | | - > |
270 | | - <ComponentCard |
271 | | - enabled={!!mcp?.spec?.components?.flux} |
272 | | - version={mcp?.spec?.components?.flux?.version} |
273 | | - allItems={allItems} |
274 | | - isLoading={managedResourcesLoading} |
275 | | - error={managedResourcesError} |
276 | | - config={gitOpsConfig} |
277 | | - /> |
278 | | - <Button |
279 | | - icon="sap-icon://expand" |
280 | | - design="Transparent" |
281 | | - style={{ |
282 | | - position: 'absolute', |
283 | | - bottom: '8px', |
284 | | - right: '8px', |
285 | | - minWidth: '32px', |
286 | | - height: '32px', |
287 | | - zIndex: 10 |
288 | | - }} |
289 | | - onClick={(e) => { |
290 | | - e.stopPropagation(); |
291 | | - handleFluxClick(); |
292 | | - }} |
293 | | - /> |
294 | | - </div> |
| 213 | + <ComponentCard |
| 214 | + enabled={!!mcp?.spec?.components?.flux} |
| 215 | + version={mcp?.spec?.components?.flux?.version} |
| 216 | + allItems={allItems} |
| 217 | + isLoading={managedResourcesLoading} |
| 218 | + error={managedResourcesError} |
| 219 | + config={gitOpsConfig} |
| 220 | + onClick={handleFluxClick} |
| 221 | + size="medium" |
| 222 | + /> |
295 | 223 | </BentoCard> |
296 | 224 |
|
297 | 225 | {/* Right side: First small component (Velero config) */} |
298 | 226 | <BentoCard size="small" gridColumn="9 / 11" gridRow="5 / 7"> |
299 | | - <div |
300 | | - onClick={handleKyvernoClick} |
301 | | - style={{ |
302 | | - cursor: 'pointer', |
303 | | - height: '100%', |
304 | | - width: '100%', |
305 | | - position: 'relative' |
306 | | - }} |
307 | | - > |
308 | | - <ComponentCard |
309 | | - enabled={!!mcp?.spec?.components?.kyverno} |
310 | | - version={mcp?.spec?.components?.kyverno?.version} |
311 | | - allItems={allItems} |
312 | | - isLoading={managedResourcesLoading} |
313 | | - error={managedResourcesError} |
314 | | - config={veleroConfig} |
315 | | - /> |
316 | | - <Button |
317 | | - icon="sap-icon://expand" |
318 | | - design="Transparent" |
319 | | - style={{ |
320 | | - position: 'absolute', |
321 | | - bottom: '8px', |
322 | | - right: '8px', |
323 | | - minWidth: '24px', |
324 | | - height: '24px', |
325 | | - zIndex: 10 |
326 | | - }} |
327 | | - onClick={(e) => { |
328 | | - e.stopPropagation(); |
329 | | - handleKyvernoClick(); |
330 | | - }} |
331 | | - /> |
332 | | - </div> |
| 227 | + <ComponentCard |
| 228 | + enabled={!!mcp?.spec?.components?.kyverno} |
| 229 | + version={mcp?.spec?.components?.kyverno?.version} |
| 230 | + allItems={allItems} |
| 231 | + isLoading={managedResourcesLoading} |
| 232 | + error={managedResourcesError} |
| 233 | + config={veleroConfig} |
| 234 | + onClick={handleKyvernoClick} |
| 235 | + size="small" |
| 236 | + /> |
333 | 237 | </BentoCard> |
334 | 238 |
|
335 | 239 | {/* Right side: Second small component (Vault) */} |
336 | 240 | <BentoCard size="small" gridColumn="11 / 13" gridRow="5 / 7"> |
337 | | - <div |
338 | | - onClick={handleVaultClick} |
339 | | - style={{ |
340 | | - cursor: 'pointer', |
341 | | - height: '100%', |
342 | | - width: '100%', |
343 | | - position: 'relative' |
344 | | - }} |
345 | | - > |
346 | | - <ComponentCard |
347 | | - enabled={!!mcp?.spec?.components?.externalSecretsOperator} |
348 | | - version={mcp?.spec?.components?.externalSecretsOperator?.version} |
349 | | - allItems={allItems} |
350 | | - isLoading={managedResourcesLoading} |
351 | | - error={managedResourcesError} |
352 | | - config={vaultConfig} |
353 | | - /> |
354 | | - <Button |
355 | | - icon="sap-icon://expand" |
356 | | - design="Transparent" |
357 | | - style={{ |
358 | | - position: 'absolute', |
359 | | - bottom: '8px', |
360 | | - right: '8px', |
361 | | - minWidth: '24px', |
362 | | - height: '24px', |
363 | | - zIndex: 10 |
364 | | - }} |
365 | | - onClick={(e) => { |
366 | | - e.stopPropagation(); |
367 | | - handleVaultClick(); |
368 | | - }} |
369 | | - /> |
370 | | - </div> |
| 241 | + <ComponentCard |
| 242 | + enabled={!!mcp?.spec?.components?.externalSecretsOperator} |
| 243 | + version={mcp?.spec?.components?.externalSecretsOperator?.version} |
| 244 | + allItems={allItems} |
| 245 | + isLoading={managedResourcesLoading} |
| 246 | + error={managedResourcesError} |
| 247 | + config={vaultConfig} |
| 248 | + onClick={handleVaultClick} |
| 249 | + size="small" |
| 250 | + /> |
371 | 251 | </BentoCard> |
372 | 252 | </BentoGrid> |
373 | 253 | </div> |
|
0 commit comments