Skip to content

Commit 7d95fba

Browse files
committed
disable connection to unsupported IdP
1 parent 99131bb commit 7d95fba

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

public/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
"emptyListSubtitleMessage": "Create a workspace to get started"
5959
},
6060
"ConnectButton": {
61-
"buttonText": "Connect"
61+
"buttonText": "Connect",
62+
"defaultIdP": "default IdP",
63+
"unsupportedIdP": "non-default IdP not supported"
6264
},
6365
"MCPHealthPopoverButton": {
6466
"statusHeader": "Status",

src/components/ControlPlanes/ConnectButton.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ export default function ConnectButton(props: Props) {
102102
data-target={`/mcp/projects/${props.projectName}/workspaces/${extractWorkspaceNameFromNamespace(
103103
props.workspaceName,
104104
)}/mcps/${props.controlPlaneName}/context/${context.name}`}
105-
additionalText={
106-
currentContext === context.name ? '(default IdP)' : undefined
107-
}
105+
additionalText={`(${
106+
currentContext === context.name
107+
? t('ConnectButton.defaultIdP')
108+
: t('ConnectButton.unsupportedIdP')
109+
})`}
110+
disabled={currentContext !== context.name}
108111
/>
109112
))}
110113
<MenuItem

0 commit comments

Comments
 (0)