Skip to content

Commit 33e5876

Browse files
feat: navigation via tabs (#297)
1 parent caabac3 commit 33e5876

File tree

15 files changed

+439
-392
lines changed

15 files changed

+439
-392
lines changed

public/locales/en.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
"tableCreatedHeader": "Created",
2323
"tableVersionHeader": "Revision",
2424
"noFluxError": "Please install flux to view this component",
25-
"gitOpsTitle": "GitOps",
26-
"kustomizationsTitle": "Kustomizations",
2725
"undefinedError": "Something went wrong"
2826
},
2927
"ProvidersList": {
@@ -32,15 +30,13 @@
3230
"tableCreatedHeader": "Created"
3331
},
3432
"ManagedResources": {
35-
"header": "Managed Resources",
3633
"tableHeaderKind": "Kind",
3734
"tableHeaderName": "Name",
3835
"tableHeaderCreated": "Created",
3936
"tableHeaderSynced": "Synced",
4037
"tableHeaderReady": "Ready"
4138
},
4239
"ProvidersConfig": {
43-
"headerProviderConfigs": "Provider Configs",
4440
"tableHeaderProvider": "Provider",
4541
"tableHeaderName": "Name",
4642
"tableHeaderCreated": "Created",
@@ -196,12 +192,18 @@
196192
},
197193
"McpPage": {
198194
"accessError": "Managed Control Plane does not have access information yet",
199-
"componentsTitle": "Components",
200195
"overviewTitle": "Overview",
196+
"dashboardTitle": "Dashboard",
197+
"graphTitle": "Graph",
198+
"componentsTitle": "Components",
201199
"crossplaneTitle": "Crossplane",
202-
"gitOpsTitle": "GitOps",
203-
"landscapersTitle": "Landscapers",
204-
"graphTitle": "Graph"
200+
"providersTitle": "Providers",
201+
"providerConfigsTitle": "ProviderConfigs",
202+
"managedResourcesTitle": "Managed Resources",
203+
"fluxTitle": "Flux",
204+
"gitRepositoriesTitle": "GitRepositories",
205+
"kustomizationsTitle": "Kustomizations",
206+
"landscapersTitle": "Landscapers"
205207
},
206208
"McpHeader": {
207209
"nameLabel": "Name",
@@ -301,7 +303,6 @@
301303
"learnButton": "Learn how to do this in code"
302304
},
303305
"Providers": {
304-
"headerProviders": "Providers",
305306
"tableHeaderVersion": "Version",
306307
"tableHeaderName": "Name",
307308
"tableHeaderCreated": "Created",
@@ -356,7 +357,9 @@
356357
"remaining": "Remaining",
357358
"active": "Active",
358359
"copyToClipboardSuccessToast": "Copied to clipboard",
359-
"copyToClipboardFailedToast": "Failed to copy to clipboard"
360+
"copyToClipboardFailedToast": "Failed to copy to clipboard",
361+
"resourcesCount": "Resources ({{count}})",
362+
"itemsCount": "Items ({{count}})"
360363
},
361364
"errors": {
362365
"installError": "Install error",

src/components/ControlPlane/ComponentList.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
import { AnalyticalTable, AnalyticalTableColumnDefinition } from '@ui5/webcomponents-react';
1+
import {
2+
AnalyticalTable,
3+
AnalyticalTableColumnDefinition,
4+
Panel,
5+
Title,
6+
Toolbar,
7+
ToolbarButton,
8+
ToolbarSpacer,
9+
} from '@ui5/webcomponents-react';
210
import { ControlPlaneType } from '../../lib/api/types/crate/controlPlanes';
311
import { useTranslation } from 'react-i18next';
412

5-
export default function ComponentList({ mcp }: { mcp: ControlPlaneType }) {
13+
export default function ComponentList({ mcp, onEditClick }: { mcp: ControlPlaneType; onEditClick: () => void }) {
614
const { t } = useTranslation();
715

816
const data = [
@@ -40,8 +48,17 @@ export default function ComponentList({ mcp }: { mcp: ControlPlaneType }) {
4048
];
4149

4250
return (
43-
<div>
51+
<Panel
52+
fixed
53+
header={
54+
<Toolbar>
55+
<Title>{t('common.itemsCount', { count: data.length })}</Title>
56+
<ToolbarSpacer />
57+
<ToolbarButton tooltip={t('editMCP.editComponents')} design="Transparent" icon="edit" onClick={onEditClick} />
58+
</Toolbar>
59+
}
60+
>
4461
<AnalyticalTable scaleWidthMode="Smart" columns={componentTableColumns} minRows={0} data={data} />
45-
</div>
62+
</Panel>
4663
);
4764
}

src/components/ControlPlane/FluxList.tsx

Lines changed: 0 additions & 208 deletions
This file was deleted.

0 commit comments

Comments
 (0)