Skip to content

Commit b26816b

Browse files
PR changes
1 parent 653879b commit b26816b

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
@@ -36,7 +36,7 @@ import { useTranslation } from 'react-i18next';
3636
import { YamlViewButton } from '../../Yaml/YamlViewButton.tsx';
3737
import { IllustratedBanner } from '../../Ui/IllustratedBanner/IllustratedBanner.tsx';
3838
import { useFrontendConfig } from '../../../context/FrontendConfigContext.tsx';
39-
import { IllustrationName } from '../../Shared/IllustratedName.ts';
39+
import IllustrationMessageType from '@ui5/webcomponents-fiori/dist/types/IllustrationMessageType.js';
4040

4141
interface Props {
4242
projectName: string;
@@ -76,7 +76,7 @@ export function ControlPlaneListWorkspaceGridTile({
7676
title={t(
7777
'ControlPlaneListWorkspaceGridTile.permissionErrorMessage',
7878
)}
79-
subtitleText={t(
79+
details={t(
8080
'ControlPlaneListWorkspaceGridTile.permissionErrorMessageSubtitle',
8181
)}
8282
/>
@@ -149,26 +149,26 @@ export function ControlPlaneListWorkspaceGridTile({
149149
>
150150
{errorView ? (
151151
errorView
152+
) : controlplanes?.length === 0 ? (
153+
<IllustratedBanner
154+
title={t('IllustratedBanner.titleMessage')}
155+
subtitle={t('IllustratedBanner.subtitleMessage')}
156+
illustrationName={IllustrationMessageType.NoData}
157+
help={{
158+
link: links.COM_PAGE_GETTING_STARTED_MCP,
159+
buttonText: t('IllustratedBanner.helpButton'),
160+
}}
161+
/>
152162
) : (
153163
<Grid defaultSpan="XL4 L4 M7 S12">
154-
{controlplanes?.length === 0 ? (
155-
<IllustratedBanner
156-
title={t('NoManagedControlPlaneBanner.titleMessage')}
157-
subtitle={t('NoManagedControlPlaneBanner.subtitleMessage')}
158-
helpButtonText={t('NoManagedControlPlaneBanner.helpButton')}
159-
illustrationName={IllustrationName.NoData}
160-
helpLink={links.COM_PAGE_GETTING_STARTED_MCP}
164+
{controlplanes?.map((cp) => (
165+
<ControlPlaneCard
166+
key={`${cp.metadata.name}--${cp.metadata.namespace}`}
167+
controlPlane={cp}
168+
projectName={projectName}
169+
workspace={workspace}
161170
/>
162-
) : (
163-
controlplanes?.map((cp) => (
164-
<ControlPlaneCard
165-
key={`${cp.metadata.name}--${cp.metadata.namespace}`}
166-
controlPlane={cp}
167-
projectName={projectName}
168-
workspace={workspace}
169-
/>
170-
))
171-
)}
171+
))}
172172
</Grid>
173173
)}
174174
</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
@@ -77,7 +77,7 @@ export default function ProjectsList() {
7777
[],
7878
);
7979
if (error) {
80-
return <IllustratedError error={error.message} />;
80+
return <IllustratedError details={error.message} />;
8181
}
8282

8383
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)