Skip to content

Commit d7179f4

Browse files
Merge branch 'main' into renovate/configure
2 parents ff6309c + 09350c5 commit d7179f4

File tree

8 files changed

+73
-40
lines changed

8 files changed

+73
-40
lines changed

public/locales/en.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"signInButton": "Sign in"
77
},
88
"ComponentList": {
9-
"tableComponentHeader": "Component",
9+
"tableComponentHeader": "Name",
1010
"tableVersionHeader": "Version"
1111
},
1212
"FluxList": {
@@ -20,7 +20,7 @@
2020
"tableCreatedHeader": "Created"
2121
},
2222
"ManagedResources": {
23-
"headerManagedResources": "Resources",
23+
"header": "Managed Resources",
2424
"tableHeaderKind": "Kind",
2525
"tableHeaderName": "Name",
2626
"tableHeaderCreated": "Created",
@@ -119,14 +119,18 @@
119119
"addButton": "Add"
120120
},
121121
"ControlPlaneListView": {
122+
"header": "Your instances of <span>ManagedControlPlane</span>",
122123
"projectHeader": "Project:"
123124
},
124125
"ProjectsListView": {
125126
"pageTitle": "Let's get started",
126127
"title": "Projects"
127128
},
128129
"ControlPlaneView": {
129-
"accessError": "Managed Control Plane does not have access information yet"
130+
"accessError": "Managed Control Plane does not have access information yet",
131+
"componentsTitle": "Components",
132+
"crossplaneTitle": "Crossplane",
133+
"gitOpsTitle": "GitOps"
130134
},
131135
"ToastContext": {
132136
"errorMessage": "useToast must be used within a ToastProvider"
@@ -147,7 +151,7 @@
147151
"tableHeaderHealthy": "Healthy"
148152
},
149153
"ProvidersConfig": {
150-
"headerProvidersConfig": "Providers Config"
154+
"header": "Provider Configs"
151155
},
152156
"validationErrors": {
153157
"required": "This field is required!",

src/components/ControlPlane/ComponentList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default function ComponentList({ mcp }: { mcp: ControlPlaneType }) {
4949
columns={componentTableColumns}
5050
minRows={0}
5151
data={data}
52+
style={{marginLeft: "12px", marginRight: "12px"}}
5253
/>
5354
</div>
5455
);

src/components/ControlPlane/ManagedResources.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -83,35 +83,38 @@ export function ManagedResources() {
8383
];
8484

8585
const rows: ResourceRow[] =
86-
managedResources?.flatMap((managedResource) =>
87-
managedResource.items?.map((item) => {
88-
const conditionSynced = item.status.conditions?.find(
89-
(condition) => condition.type === 'Synced',
90-
);
91-
const conditionReady = item.status.conditions?.find(
92-
(condition) => condition.type === 'Ready',
93-
);
86+
managedResources
87+
?.filter((managedResource) => managedResource.items)
88+
.flatMap((managedResource) =>
89+
managedResource.items?.map((item) => {
90+
const conditionSynced = item.status.conditions?.find(
91+
(condition) => condition.type === 'Synced',
92+
);
93+
const conditionReady = item.status.conditions?.find(
94+
(condition) => condition.type === 'Ready',
95+
);
9496

95-
return {
96-
kind: item.kind,
97-
name: item.metadata.name,
98-
created: timeAgo.format(new Date(item.metadata.creationTimestamp)),
99-
synced: conditionSynced?.status === 'True',
100-
syncedTransitionTime: conditionSynced?.lastTransitionTime ?? '',
101-
ready: conditionReady?.status === 'True',
102-
readyTransitionTime: conditionReady?.lastTransitionTime ?? '',
103-
};
104-
}),
105-
) ?? [];
97+
return {
98+
kind: item.kind,
99+
name: item.metadata.name,
100+
created: timeAgo.format(new Date(item.metadata.creationTimestamp)),
101+
synced: conditionSynced?.status === 'True',
102+
syncedTransitionTime: conditionSynced?.lastTransitionTime ?? '',
103+
ready: conditionReady?.status === 'True',
104+
readyTransitionTime: conditionReady?.lastTransitionTime ?? '',
105+
};
106+
}),
107+
) ?? [];
106108

107109
return (
108110
<>
109-
<Title level="H4">{t('ManagedResources.headerManagedResources')}</Title>
111+
<Title level="H4">{t('ManagedResources.header')}</Title>
110112

111113
{error && <IllustratedError error={error} />}
112114

113115
{!error && (
114116
<AnalyticalTable
117+
style={{ margin: '12px' }}
115118
columns={columns}
116119
data={rows}
117120
minRows={1}
@@ -138,10 +141,7 @@ export function ManagedResources() {
138141
);
139142
}
140143

141-
function ResourceStatusCell({
142-
value,
143-
transitionTime,
144-
}: StatusCellProps) {
144+
function ResourceStatusCell({ value, transitionTime }: StatusCellProps) {
145145
return (
146146
<Icon
147147
design={value ? 'Positive' : 'Negative'}

src/components/ControlPlane/ProvidersConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function ProvidersConfig() {
1212

1313
return (
1414
<>
15-
<Title level='H4'>{t('ProvidersConfig.headerProvidersConfig')}</Title>
15+
<Title level='H4'>{t('ProvidersConfig.header')}</Title>
1616
<AnalyticalTable
1717
columns={columns}
1818
data={[]}

src/components/Shared/ConfiguredAnalyticsTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default function ConfiguredAnalyticsTable(props: Props) {
2323
scaleWidthMode={AnalyticalTableScaleWidthMode.Smart}
2424
loading={props.isLoading}
2525
filterable
26+
style={{margin: "12px"}}
2627
/>
2728
);
2829
}

src/index.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
margin-bottom: -30px;
8787
}
8888

89+
.cp-panel {
90+
margin: 12px;
91+
}
92+
8993
.cp-panel-crossplane {
9094
background-color: #FFC933;
9195
}
@@ -112,4 +116,9 @@ ui5-form-item {
112116
ui5-toast {
113117
width: 50ch;
114118
max-width: 100%;
119+
}
120+
121+
.mono-font {
122+
font-family: 'Roboto Mono', monospace;
123+
font-weight: bold;
115124
}

src/views/ControlPlanes/ControlPlaneListView.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { ObjectPage, ObjectPageTitle } from '@ui5/webcomponents-react';
1+
import { ObjectPage, ObjectPageTitle, Title } from '@ui5/webcomponents-react';
22
import ProjectChooser from '../../components/Projects/ProjectChooser.tsx';
33
import { useParams } from 'react-router-dom';
44
import ControlPlaneListAllWorkspaces from '../../components/ControlPlanes/List/ControlPlaneListAllWorkspaces.tsx';
55
import IntelligentBreadcrumbs from '../../components/Core/IntelligentBreadcrumbs.tsx';
66
import { ControlPlaneListToolbar } from '../../components/ControlPlanes/List/ControlPlaneListToolbar.tsx';
7-
import { useTranslation } from 'react-i18next';
7+
import { Trans, useTranslation } from 'react-i18next';
88

99
export default function ControlPlaneListView() {
1010
const { projectName } = useParams();
@@ -16,7 +16,14 @@ export default function ControlPlaneListView() {
1616
preserveHeaderStateOnClick={true}
1717
titleArea={
1818
<ObjectPageTitle
19-
header="Your MCPs"
19+
header={
20+
<Title>
21+
<Trans
22+
i18nKey="ControlPlaneListView.header"
23+
components={{ span: <span className="mono-font" /> }}
24+
/>
25+
</Title>
26+
}
2027
subHeader={
2128
<div
2229
style={{

src/views/ControlPlanes/ControlPlaneView.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,18 @@ export default function ControlPlaneView() {
8888
<ObjectPageSection
8989
className="cp-page-section-components"
9090
id="components"
91-
titleText="Components"
91+
titleText={t('ControlPlaneView.componentsTitle')}
9292
hideTitleText
9393
>
9494
<Panel
95+
className="cp-panel"
9596
headerLevel="H2"
9697
headerText="Panel"
97-
header={<Title level="H3">Components</Title>}
98+
header={
99+
<Title level="H3">
100+
{t('ControlPlaneView.componentsTitle')}
101+
</Title>
102+
}
98103
noAnimation
99104
>
100105
<ComponentList mcp={mcp} />
@@ -103,14 +108,18 @@ export default function ControlPlaneView() {
103108
<ObjectPageSection
104109
className="cp-page-section-crossplane"
105110
id="crossplane"
106-
titleText="Crossplane"
111+
titleText={t('ControlPlaneView.crossplaneTitle')}
107112
hideTitleText
108113
>
109114
<Panel
110-
className="cp-panel-crossplane"
115+
className="cp-panel cp-panel-crossplane"
111116
headerLevel="H3"
112117
headerText="Panel"
113-
header={<Title level="H3">Crossplane</Title>}
118+
header={
119+
<Title level="H3">
120+
{t('ControlPlaneView.crossplaneTitle')}
121+
</Title>
122+
}
114123
noAnimation
115124
>
116125
<ProvidersList />
@@ -119,14 +128,16 @@ export default function ControlPlaneView() {
119128
<ObjectPageSection
120129
className="cp-page-section-gitops"
121130
id="gitops"
122-
titleText="GitOps"
131+
titleText={t('ControlPlaneView.gitOpsTitle')}
123132
hideTitleText
124133
>
125134
<Panel
126-
className="cp-panel-gitops"
135+
className="cp-panel cp-panel-gitops"
127136
headerLevel="H3"
128137
headerText="Panel"
129-
header={<Title level="H3">GitOps</Title>}
138+
header={
139+
<Title level="H3">{t('ControlPlaneView.gitOpsTitle')}</Title>
140+
}
130141
noAnimation
131142
>
132143
<FluxList />

0 commit comments

Comments
 (0)