Skip to content

Commit ae327e0

Browse files
committed
feat: add kyverno and eso
1 parent 4bc3bec commit ae327e0

File tree

8 files changed

+4538
-22
lines changed

8 files changed

+4538
-22
lines changed

public/eso.png

8.86 KB
Loading

public/kyverno.svg

Lines changed: 4515 additions & 0 deletions
Loading

public/locales/en.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@
387387
"Hints": {
388388
"CrossplaneHint": {
389389
"title": "Crossplane",
390-
"subtitle": "Managed Resources Readiness",
390+
"subtitle": "Manage your cloud landscape in code",
391391
"activeStatus": "Active v",
392392
"progressAvailable": "Available",
393393
"noResources": "No Resources",
@@ -403,7 +403,7 @@
403403
},
404404
"GitOpsHint": {
405405
"title": "Flux",
406-
"subtitle": "GitOps Progress",
406+
"subtitle": "Persist desired state in code repsitories",
407407
"activeStatus": "Active v",
408408
"progressAvailable": "Available",
409409
"noResources": "No Resources",
@@ -416,9 +416,9 @@
416416
"unmanaged": "Unmanaged"
417417
}
418418
},
419-
"VaultHint": {
420-
"title": "Vault",
421-
"subtitle": "Rotating Secrets Progress",
419+
"ESOHint": {
420+
"title": "ESO",
421+
"subtitle": "Secure secrets with rotation",
422422
"activeStatus": "Active v",
423423
"progressAvailable": "Available",
424424
"noResources": "No Resources",

public/vault.png

-24.9 KB
Binary file not shown.

public/velero.png

-164 KB
Binary file not shown.

src/components/BentoGrid/ComponentCard/componentConfigs.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,29 @@ export const useGitOpsHintConfig = (): GenericHintConfig => {
3737
};
3838
};
3939

40-
export const useVaultHintConfig = (): GenericHintConfig => {
40+
export const useESOHintConfig = (): GenericHintConfig => {
4141
const { t } = useTranslation();
4242

4343
return {
44-
title: t('Hints.VaultHint.title'),
45-
subtitle: t('Hints.VaultHint.subtitle'),
46-
iconSrc: '/vault.png',
47-
iconAlt: 'Vault',
48-
iconStyle: { borderRadius: '0' }, // Vault icon should not be rounded
44+
title: t('Hints.ESOHint.title'),
45+
subtitle: t('Hints.ESOHint.subtitle'),
46+
iconSrc: '/eso.png',
47+
iconAlt: 'ESO',
48+
// Not sure yet whether this looks better fully round or with rounded edges...
49+
// iconStyle: { borderRadius: '8px' }, // ESO icon with rounded corners
4950
calculateSegments: (allItems, isLoading, error, enabled) =>
5051
calculateVaultSegments(allItems, isLoading, error, enabled, t),
5152
};
5253
};
5354

54-
export const useVeleroHintConfig = (): GenericHintConfig => {
55+
export const useKyvernoHintConfig = (): GenericHintConfig => {
5556
const { t } = useTranslation();
5657

5758
return {
58-
title: "Velero",
59-
subtitle: "Backups Status",
60-
iconSrc: '/velero.png',
61-
iconAlt: 'Velero',
59+
title: "Kyverno",
60+
subtitle: "Enfore policies",
61+
iconSrc: '/kyverno.svg',
62+
iconAlt: 'Kyverno',
6263
iconStyle: { borderRadius: '0' }, // Vault icon should not be rounded
6364
calculateSegments: (allItems, isLoading, error, enabled) =>
6465
calculateVaultSegments(allItems, isLoading, error, enabled, t),

src/spaces/mcp/pages/McpPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { AuthProviderMcp } from '../auth/AuthContextMcp.tsx';
2020
import { isNotFoundError } from '../../../lib/api/error.ts';
2121
import { NotFoundBanner } from '../../../components/Ui/NotFoundBanner/NotFoundBanner.tsx';
2222
import { BentoGrid, BentoCard, GraphCard, ComponentCard } from '../../../components/BentoGrid';
23-
import { useCrossplaneHintConfig, useGitOpsHintConfig, useVaultHintConfig, useVeleroHintConfig } from '../../../components/BentoGrid/ComponentCard/componentConfigs.ts';
23+
import { useCrossplaneHintConfig, useGitOpsHintConfig, useESOHintConfig, useKyvernoHintConfig } from '../../../components/BentoGrid/ComponentCard/componentConfigs.ts';
2424
import { ManagedResourcesRequest, ManagedResourcesResponse } from '../../../lib/api/types/crossplane/listManagedResources';
2525
import { resourcesInterval } from '../../../lib/shared/constants';
2626
import { ManagedResourceItem } from '../../../lib/shared/types';
@@ -102,8 +102,8 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
102102
// Get hint configurations
103103
const crossplaneConfig = useCrossplaneHintConfig();
104104
const gitOpsConfig = useGitOpsHintConfig();
105-
const vaultConfig = useVaultHintConfig();
106-
const veleroConfig = useVeleroHintConfig();
105+
const vaultConfig = useESOHintConfig();
106+
const veleroConfig = useKyvernoHintConfig();
107107

108108
// Handle component card clicks
109109
const handleCrossplaneExpand = () => {

src/utils/hintsCardsRowCalculations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,16 @@ export const calculateVaultSegments: GenericHintSegmentCalculator = (
207207

208208
if (!enabled) {
209209
return {
210-
segments: [{ percentage: 100, color: HINT_COLORS.inactive, label: t('Hints.VaultHint.inactive') }],
211-
label: t('Hints.VaultHint.inactive'),
210+
segments: [{ percentage: 100, color: HINT_COLORS.inactive, label: t('Hints.ESOHint.inactive') }],
211+
label: t('Hints.ESOHint.inactive'),
212212
showPercentage: false,
213213
isHealthy: false,
214214
showOnlyNonZero: true,
215215
};
216216
}
217217

218218
const hasResources = allItems.length > 0;
219-
const label = hasResources ? t('Hints.VaultHint.progressAvailable') : t('Hints.VaultHint.noResources');
219+
const label = hasResources ? t('Hints.ESOHint.progressAvailable') : t('Hints.ESOHint.noResources');
220220
const color = hasResources ? HINT_COLORS.healthy : HINT_COLORS.inactive;
221221

222222
return {

0 commit comments

Comments
 (0)