diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx
index b621a018..1858dc30 100644
--- a/src/AppRouter.tsx
+++ b/src/AppRouter.tsx
@@ -16,7 +16,7 @@ function AppRouter() {
} />
} />
}
/>
diff --git a/src/components/ControlPlanes/ConnectButton.tsx b/src/components/ControlPlanes/ConnectButton.tsx
index b31cf04e..cbf7cedb 100644
--- a/src/components/ControlPlanes/ConnectButton.tsx
+++ b/src/components/ControlPlanes/ConnectButton.tsx
@@ -7,7 +7,7 @@ import yaml from 'js-yaml';
import { useRef, useState } from 'react';
import { DownloadKubeconfig } from './CopyKubeconfigButton.tsx';
import { useApiResource } from '../../lib/api/useApiResource.ts';
-import { extractWorkspaceNameFromNamespace } from '../../utils/index.ts';
+import { extractWorkspaceNameFromNamespace } from '../../utils';
import { useTranslation } from 'react-i18next';
interface Props {
@@ -45,10 +45,6 @@ export default function ConnectButton(props: Props) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const contexts = kubeconfig.contexts as any[];
- const currentContext = kubeconfig['current-context'];
- if (!currentContext) {
- return <>>;
- }
if (contexts.length === 1) {
return (
@@ -57,9 +53,7 @@ export default function ConnectButton(props: Props) {
disabled={props.disabled}
onClick={() =>
navigate(
- `/mcp/projects/${props.projectName}/workspaces/${extractWorkspaceNameFromNamespace(
- props.workspaceName,
- )}/mcps/${props.controlPlaneName}/context/${currentContext}`,
+ `/mcp/projects/${props.projectName}/workspaces/${extractWorkspaceNameFromNamespace(props.workspaceName)}/mcps/${props.controlPlaneName}`,
)
}
>
diff --git a/src/lib/api/fetch.ts b/src/lib/api/fetch.ts
index d367a5c4..0b442e94 100644
--- a/src/lib/api/fetch.ts
+++ b/src/lib/api/fetch.ts
@@ -7,7 +7,6 @@ const useCrateClusterHeader = 'X-use-crate';
const projectNameHeader = 'X-project';
const workspaceNameHeader = 'X-workspace';
const mcpNameHeader = 'X-mcp';
-const contextHeader = 'X-context';
const jqHeader = 'X-jq';
const contentTypeHeader = 'Content-Type';
@@ -37,7 +36,6 @@ export const fetchApiServer = async (
headers[projectNameHeader] = config.mcpConfig.projectName;
headers[workspaceNameHeader] = config.mcpConfig.workspaceName;
headers[mcpNameHeader] = config.mcpConfig.controlPlaneName;
- headers[contextHeader] = config.mcpConfig.contextName;
} else {
headers[useCrateClusterHeader] = 'true';
}
diff --git a/src/lib/api/types/apiConfig.ts b/src/lib/api/types/apiConfig.ts
index b9ee9b67..b25f5fe2 100644
--- a/src/lib/api/types/apiConfig.ts
+++ b/src/lib/api/types/apiConfig.ts
@@ -2,7 +2,6 @@ type McpConfig = {
projectName: string;
workspaceName: string;
controlPlaneName: string;
- contextName: string;
};
//syntax basically combines all the atrributes from the types into one
diff --git a/src/lib/shared/McpContext.tsx b/src/lib/shared/McpContext.tsx
index 20cfee6a..8c46a06d 100644
--- a/src/lib/shared/McpContext.tsx
+++ b/src/lib/shared/McpContext.tsx
@@ -10,7 +10,6 @@ interface Mcp {
project: string;
workspace: string;
name: string;
- context: string;
secretNamespace?: string;
secretName?: string;
@@ -56,7 +55,6 @@ function RequireDownstreamLogin(props: { children?: ReactNode }) {
;
}
- if (!projectName || !workspaceName || !controlPlaneName || !contextName || isNotFoundError(error)) {
+ if (!projectName || !workspaceName || !controlPlaneName || isNotFoundError(error)) {
return ;
}
@@ -53,7 +53,6 @@ export default function McpPage() {
project: projectName,
workspace: workspaceName,
name: controlPlaneName,
- context: contextName,
}}
>