Skip to content

Commit 765aa9e

Browse files
PR changes
1 parent 2a9f630 commit 765aa9e

File tree

15 files changed

+61
-83
lines changed

15 files changed

+61
-83
lines changed

public/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"menuDownload": "Download",
6868
"menuCopy": "Copy to clipboard"
6969
},
70-
"NoManagedControlPlaneBanner": {
70+
"IllustratedBanner": {
7171
"titleMessage": "No ManagedControlPlane",
7272
"subtitleMessage": "Create a ManagedControlPlane to get started",
7373
"helpButton": "Help"

src/components/ControlPlane/FluxList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function FluxList() {
4444
if (repoErr || kustomizationErr) {
4545
return (
4646
<IllustratedError
47-
error={repoErr.message || kustomizationErr.message}
47+
details={repoErr.message || kustomizationErr.message}
4848
title={t('FluxList.noFluxError')}
4949
/>
5050
);

src/components/ControlPlane/ManagedResources.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export function ManagedResources() {
109109
<>
110110
<Title level="H4">{t('ManagedResources.header')}</Title>
111111

112-
{error && <IllustratedError error={error.message} />}
112+
{error && <IllustratedError details={error.message} />}
113113

114114
{!error && (
115115
<AnalyticalTable

src/components/ControlPlane/Providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function Providers() {
105105
<>
106106
<Title level="H4">{t('Providers.headerProviders')}</Title>
107107

108-
{error && <IllustratedError error={error.message} />}
108+
{error && <IllustratedError details={error.message} />}
109109

110110
{!error && (
111111
<AnalyticalTable

src/components/ControlPlanes/List/ControlPlaneListAllWorkspaces.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function ControlPlaneListAllWorkspaces({ projectName }: Props) {
2727
return <Loading />;
2828
}
2929
if (error) {
30-
return <IllustratedError error={error.message} />;
30+
return <IllustratedError details={error.message} />;
3131
}
3232

3333
return (

src/components/ControlPlanes/List/ControlPlaneListWorkspaceGridTile.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { APIError } from '../../../lib/api/error.ts';
3535
import { useTranslation } from 'react-i18next';
3636
import { IllustratedBanner } from '../../Ui/IllustratedBanner/IllustratedBanner.tsx';
3737
import { useFrontendConfig } from '../../../context/FrontendConfigContext.tsx';
38-
import { IllustrationName } from '../../Shared/IllustratedName.ts';
38+
import IllustrationMessageType from '@ui5/webcomponents-fiori/dist/types/IllustrationMessageType.js';
3939

4040
interface Props {
4141
projectName: string;
@@ -75,7 +75,7 @@ export function ControlPlaneListWorkspaceGridTile({
7575
title={t(
7676
'ControlPlaneListWorkspaceGridTile.permissionErrorMessage',
7777
)}
78-
subtitleText={t(
78+
details={t(
7979
'ControlPlaneListWorkspaceGridTile.permissionErrorMessageSubtitle',
8080
)}
8181
/>
@@ -140,26 +140,26 @@ export function ControlPlaneListWorkspaceGridTile({
140140
>
141141
{errorView ? (
142142
errorView
143+
) : controlplanes?.length === 0 ? (
144+
<IllustratedBanner
145+
title={t('IllustratedBanner.titleMessage')}
146+
subtitle={t('IllustratedBanner.subtitleMessage')}
147+
illustrationName={IllustrationMessageType.NoData}
148+
help={{
149+
link: links.COM_PAGE_GETTING_STARTED_MCP,
150+
buttonText: t('IllustratedBanner.helpButton'),
151+
}}
152+
/>
143153
) : (
144154
<Grid defaultSpan="XL4 L4 M7 S12">
145-
{controlplanes?.length === 0 ? (
146-
<IllustratedBanner
147-
title={t('NoManagedControlPlaneBanner.titleMessage')}
148-
subtitle={t('NoManagedControlPlaneBanner.subtitleMessage')}
149-
helpButtonText={t('NoManagedControlPlaneBanner.helpButton')}
150-
illustrationName={IllustrationName.NoData}
151-
helpLink={links.COM_PAGE_GETTING_STARTED_MCP}
155+
{controlplanes?.map((cp) => (
156+
<ControlPlaneCard
157+
key={`${cp.metadata.name}--${cp.metadata.namespace}`}
158+
controlPlane={cp}
159+
projectName={projectName}
160+
workspace={workspace}
152161
/>
153-
) : (
154-
controlplanes?.map((cp) => (
155-
<ControlPlaneCard
156-
key={`${cp.metadata.name}--${cp.metadata.namespace}`}
157-
controlPlane={cp}
158-
projectName={projectName}
159-
workspace={workspace}
160-
/>
161-
))
162-
)}
162+
))}
163163
</Grid>
164164
)}
165165
</Panel>

src/components/Projects/ProjectChooser.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function ProjectChooser({ currentProjectName }: Props) {
1414
const navigate = useLuigiNavigate();
1515

1616
if (error) {
17-
return <IllustratedError error={error.message} />;
17+
return <IllustratedError details={error.message} />;
1818
}
1919

2020
return (

src/components/Projects/ProjectsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function ProjectsList() {
1616
refreshInterval: 3000,
1717
});
1818
if (error) {
19-
return <IllustratedError error={error.message} />;
19+
return <IllustratedError details={error.message} />;
2020
}
2121

2222
return (
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
import '@ui5/webcomponents-fiori/dist/illustrations/SimpleError';
22
import { useTranslation } from 'react-i18next';
33
import { IllustratedBanner } from '../Ui/IllustratedBanner/IllustratedBanner';
4-
import { IllustrationName } from './IllustratedName';
4+
import IllustrationMessageType from '@ui5/webcomponents-fiori/dist/types/IllustrationMessageType.js';
55

66
interface Props {
77
title?: string;
8-
subtitleText?: string;
9-
error?: string;
8+
details?: string;
109
}
1110

1211
export default function IllustratedError({
1312
title,
14-
subtitleText,
15-
error,
13+
details,
1614
}: Props) {
1715
const { t } = useTranslation();
1816

1917
return (
2018
<IllustratedBanner
21-
illustrationName={IllustrationName.SimpleError}
19+
illustrationName={IllustrationMessageType.SimpleError}
2220
title={title ?? t('IllustratedError.titleText')}
23-
subtitle={error ?? subtitleText ?? t('IllustratedError.subtitleText')}
21+
subtitle={details ?? t('IllustratedError.subtitleText')}
2422
/>
2523
);
2624
}

src/components/Shared/IllustratedName.ts

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

0 commit comments

Comments
 (0)