Skip to content

Commit b0cfb36

Browse files
committed
Merge branch 'main' into mcp-Visualize-members-and-status-in-header-area
2 parents de79446 + 224fbcf commit b0cfb36

File tree

15 files changed

+291
-140
lines changed

15 files changed

+291
-140
lines changed

Taskfile.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ vars:
1515
OCM_OUTPUT_DIR: '{{.ROOT_DIR}}/.ctf'
1616
OCM_DESCRIPTOR: '{{.ROOT_DIR}}/ocm/component-descriptor.yaml'
1717

18+
# Backend Image Version
19+
BACKEND_IMAGE_URL: ghcr.io/openmcp-project/mcp-ui-backend
20+
BACKEND_IMAGE_VERSION: v0.7.1
21+
1822
ROOT_DIR2: '{{.ROOT_DIR | trimSuffix "/common" | trimSuffix "/hack"}}'
1923
LOCALBIN: '{{ env "LOCALBIN" | default ( .LOCALBIN | default (print .ROOT_DIR2 "/.bin") ) }}'
2024
OCM: '{{ .OCM | default (print .LOCALBIN "/ocm") }}'
@@ -39,7 +43,9 @@ tasks:
3943
VERSION={{.OCM_COMPONENT_VERSION}} \
4044
IMAGE_VERSION={{.IMAGE_VERSION}} \
4145
COMPONENT_NAME={{.OCM_COMPONENT_NAME}} \
42-
PROVIDER={{.OCM_PROVIDER}}
46+
PROVIDER={{.OCM_PROVIDER}} \
47+
BACKEND_IMAGE_URL={{.BACKEND_IMAGE_URL}} \
48+
BACKEND_IMAGE_VERSION={{.BACKEND_IMAGE_VERSION}}
4349
vars:
4450
IMAGE_VERSION: '{{.IMAGE_VERSION | default (print .OCM_COMPONENT_VERSION)}}'
4551

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

ocm/component-descriptor.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ resources:
1111
access:
1212
type: ociArtifact
1313
imageReference: ghcr.io/openmcp-project/mcp-ui-frontend:${IMAGE_VERSION}
14+
- name: mcp-ui-backend-image
15+
type: ociImage
16+
version: ${BACKEND_IMAGE_VERSION}
17+
access:
18+
type: ociArtifact
19+
imageReference: ${BACKEND_IMAGE_URL}:${BACKEND_IMAGE_VERSION}

public/locales/en.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,5 +524,14 @@
524524
"branchTitle": "Branch",
525525
"gitRepositoryCreated": "Git Repository created successfully",
526526
"gitRepositoryCreationFailed": "Failed to create Git Repository: {{error}}"
527+
},
528+
"mcp": {
529+
"authorization": {
530+
"accessDenied": {
531+
"title": "Access Denied",
532+
"details": "You are not authorized to see this Managed Control Plane."
533+
},
534+
"backToWorkspaces": "Back to Workspaces"
535+
}
527536
}
528537
}

src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,21 @@ export const ControlPlaneCard = ({
100100
resourceName={controlPlane.metadata.name}
101101
resourceType={'managedcontrolplanes'}
102102
/>
103-
{showWarningBecauseOfDisabledSystemIdentityProvider && (
104-
<Infobox size="sm" variant="warning">
103+
{showWarningBecauseOfDisabledSystemIdentityProvider ? (
104+
<Infobox size="sm" variant="warning" noMargin>
105105
{t('ConnectButton.unsupportedIdP')}
106106
</Infobox>
107+
) : (
108+
<ConnectButton
109+
disabled={!isConnectButtonEnabled}
110+
controlPlaneName={name}
111+
projectName={projectName}
112+
workspaceName={workspace.metadata.name ?? ''}
113+
namespace={controlPlane.status?.access?.namespace ?? ''}
114+
secretName={controlPlane.status?.access?.name ?? ''}
115+
secretKey={controlPlane.status?.access?.key ?? ''}
116+
/>
107117
)}
108-
<ConnectButton
109-
disabled={!isConnectButtonEnabled}
110-
controlPlaneName={name}
111-
projectName={projectName}
112-
workspaceName={workspace.metadata.name ?? ''}
113-
namespace={controlPlane.status?.access?.namespace ?? ''}
114-
secretName={controlPlane.status?.access?.name ?? ''}
115-
secretKey={controlPlane.status?.access?.key ?? ''}
116-
/>
117118
</FlexBox>
118119
</FlexBox>
119120
</FlexBox>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.wrapper {
2+
display: flex;
3+
align-items: center;
4+
justify-content: center;
5+
flex-direction: column;
6+
width: 100%;
7+
height: 100%;
8+
}
9+
10+
.textAlignCenter {
11+
text-align: center;
12+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { PropsWithChildren, ReactNode, CSSProperties } from 'react';
2+
import cx from 'clsx';
3+
import styles from './Center.module.css';
4+
5+
export type CenterProps = PropsWithChildren<{
6+
className?: string;
7+
style?: CSSProperties;
8+
textAlignCenter?: boolean;
9+
}>;
10+
11+
export const Center = ({ children, className, style, textAlignCenter = true }: CenterProps): ReactNode => {
12+
const classes = cx(styles.wrapper, { [styles.textAlignCenter]: textAlignCenter }, className);
13+
14+
return (
15+
<div className={classes} style={style}>
16+
{children}
17+
</div>
18+
);
19+
};

src/components/Ui/Infobox/Infobox.module.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
margin-right: 1rem;
1818
}
1919

20+
.icon-sm {
21+
width: 1.25rem;
22+
height: 1.25rem;
23+
}
24+
2025
.content {
2126
flex-grow: 1;
2227
padding-right: 0.5rem;
@@ -29,8 +34,9 @@
2934
}
3035

3136
.size-sm {
32-
padding: 0.75rem 1rem;
33-
font-size: 0.875rem;
37+
padding: 0.5rem 0.875rem;
38+
font-size: 0.75rem;
39+
border-radius: 0.5rem;
3440
}
3541

3642
.size-md {
@@ -67,3 +73,7 @@
6773
color: var(--sapBackgroundColor);
6874
line-height: 1.2rem;
6975
}
76+
77+
.no-margin {
78+
margin-bottom: 0;
79+
}

src/components/Ui/Infobox/Infobox.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface LabelProps {
1212
fullWidth?: boolean;
1313
className?: string;
1414
icon?: string;
15+
noMargin?: boolean;
1516
}
1617

1718
const variantIcons = {
@@ -29,6 +30,7 @@ export const Infobox: React.FC<LabelProps> = ({
2930
fullWidth = false,
3031
className,
3132
icon,
33+
noMargin = false,
3234
}) => {
3335
const infoboxClasses = cx(
3436
styles.infobox,
@@ -41,6 +43,7 @@ export const Infobox: React.FC<LabelProps> = ({
4143
[styles['variant-warning']]: variant === 'warning',
4244
[styles['variant-danger']]: variant === 'danger',
4345
[styles['full-width']]: fullWidth,
46+
[styles['no-margin']]: noMargin,
4447
},
4548
className,
4649
);
@@ -49,7 +52,7 @@ export const Infobox: React.FC<LabelProps> = ({
4952

5053
return (
5154
<div className={infoboxClasses} id={id}>
52-
{iconName && <Icon name={iconName} className={styles.icon} />}
55+
{iconName && <Icon name={iconName} className={cx(styles.icon, { [styles['icon-sm']]: size === 'sm' })} />}
5356
<div className={styles.content}>{children}</div>
5457
</div>
5558
);

src/components/Ui/NotFoundBanner/NotFoundBanner.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
.button {
77
margin-inline: auto;
88
margin-block: 2rem;
9-
}
9+
}

0 commit comments

Comments
 (0)