From 139c346facf6f57a3a3dbf8a4623637cfbc2004f Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Tue, 16 Dec 2025 22:14:15 +0800 Subject: [PATCH] misc: removed preview features --- .../MCPEndpointDetailPage.tsx | 8 +- .../MCPEndpointConnectionSection.tsx | 138 +++++++++--------- .../components/MCPEndpointDetailsSection.tsx | 117 ++++++++------- .../MCPEndpointUsageStatisticsSection.tsx | 13 +- .../MCPServerCredentialsSection.tsx | 11 +- 5 files changed, 139 insertions(+), 148 deletions(-) diff --git a/frontend/src/pages/ai/MCPEndpointDetailPage/MCPEndpointDetailPage.tsx b/frontend/src/pages/ai/MCPEndpointDetailPage/MCPEndpointDetailPage.tsx index be0c9ef767..3988ac7250 100644 --- a/frontend/src/pages/ai/MCPEndpointDetailPage/MCPEndpointDetailPage.tsx +++ b/frontend/src/pages/ai/MCPEndpointDetailPage/MCPEndpointDetailPage.tsx @@ -27,8 +27,7 @@ import { MCPEndpointConnectedServersSection, MCPEndpointConnectionSection, MCPEndpointDetailsSection, - MCPEndpointToolSelectionSection, - MCPEndpointUsageStatisticsSection + MCPEndpointToolSelectionSection } from "./components"; const PageContent = () => { @@ -151,11 +150,6 @@ const PageContent = () => { {/* Right Column - Usage Statistics & Tool Selection */}
- { const [isCopied, setIsCopied] = useToggle(false); const [isCreateModalOpen, setIsCreateModalOpen] = useToggle(false); @@ -165,78 +167,80 @@ export const MCPEndpointConnectionSection = ({ endpoint }: Props) => {
-
-
-
- - Authentication Tokens + {SHOW_AUTH_TOKENS_SECTION && ( +
+
+
+ + Authentication Tokens +
+
- -
- {authTokens.length > 0 && ( -
- {authTokens.map((token) => ( -
-
-
-

- {token.name} -

- - handleDeleteToken(token.id)} - className="text-red-500 hover:text-red-400" - > - - - -
-

- Created {formatDate(token.createdAt)} -

-
- - {truncateToken(token.token)} - - - - + {authTokens.length > 0 && ( +
+ {authTokens.map((token) => ( +
+
+
+

+ {token.name} +

+ + handleDeleteToken(token.id)} + className="text-red-500 hover:text-red-400" + > + + + +
+

+ Created {formatDate(token.createdAt)} +

+
+ + {truncateToken(token.token)} + + + + +
-
- ))} -
- )} + ))} +
+ )} - {authTokens.length === 0 && ( -

- No authentication tokens created yet -

- )} -
+ {authTokens.length === 0 && ( +

+ No authentication tokens created yet +

+ )} +
+ )}
diff --git a/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointDetailsSection.tsx b/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointDetailsSection.tsx index e724ea8cf6..8f9f6ebfed 100644 --- a/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointDetailsSection.tsx +++ b/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointDetailsSection.tsx @@ -44,6 +44,8 @@ const getStatusColor = (status: string | null) => { return colors[status || "inactive"] || "bg-red-500"; }; +const SHOW_PII_FILTERING_AND_RATE_LIMITING_SECTION = false; + export const MCPEndpointDetailsSection = ({ endpoint, onEdit }: Props) => { const updateEndpoint = useUpdateAiMcpEndpoint(); const [rateLimitSettings, setRateLimitSettings] = useState({ @@ -143,64 +145,67 @@ export const MCPEndpointDetailsSection = ({ endpoint, onEdit }: Props) => { {format(new Date(endpoint.createdAt), "yyyy-MM-dd, hh:mm aaa")} -
-
-
-
- PII Filtering - - +
+
+
+
+ PII Filtering + + + +
+ Redact sensitive data +
+ +
+
+
+
+
+
+ Rate Limiting +
+ Limit tool invocations per user +
+ +
+ + {rateLimitSettings.enabled && ( +
+ handleRateLimitChange(e.target.value)} + min={1} + placeholder="100" /> - -
- Redact sensitive data + +
+ )}
- -
-
- -
-
-
-
- Rate Limiting -
- Limit tool invocations per user -
- -
- - {rateLimitSettings.enabled && ( -
- handleRateLimitChange(e.target.value)} - min={1} - placeholder="100" - /> - -
- )} -
+ + )}
); diff --git a/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointUsageStatisticsSection.tsx b/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointUsageStatisticsSection.tsx index 0111f3bee0..04111f08c6 100644 --- a/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointUsageStatisticsSection.tsx +++ b/frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointUsageStatisticsSection.tsx @@ -2,12 +2,11 @@ import { useMemo } from "react"; import { faChartLine, faTools, faUsers } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { useListAiMcpActivityLogs, useListEndpointTools } from "@app/hooks/api"; +import { TAiMcpActivityLog, useListEndpointTools } from "@app/hooks/api"; type Props = { endpointId: string; endpointName: string; - projectId: string; }; type StatCardProps = { @@ -42,14 +41,8 @@ const StatCard = ({ icon, label, value, subtitle, trend }: StatCardProps) => { ); }; -export const MCPEndpointUsageStatisticsSection = ({ - endpointId, - endpointName, - projectId -}: Props) => { - const { data: activityLogs = [] } = useListAiMcpActivityLogs({ - projectId - }); +export const MCPEndpointUsageStatisticsSection = ({ endpointId, endpointName }: Props) => { + const activityLogs: TAiMcpActivityLog[] = []; const { data: endpointTools = [] } = useListEndpointTools({ endpointId }); const statistics = useMemo(() => { diff --git a/frontend/src/pages/ai/MCPServerDetailPage/components/MCPServerCredentialsSection.tsx b/frontend/src/pages/ai/MCPServerDetailPage/components/MCPServerCredentialsSection.tsx index 7920abd7b2..3a0cc93c03 100644 --- a/frontend/src/pages/ai/MCPServerDetailPage/components/MCPServerCredentialsSection.tsx +++ b/frontend/src/pages/ai/MCPServerDetailPage/components/MCPServerCredentialsSection.tsx @@ -1,4 +1,4 @@ -import { Button, GenericFieldLabel } from "@app/components/v2"; +import { GenericFieldLabel } from "@app/components/v2"; import { AiMcpServerCredentialMode, TAiMcpServer } from "@app/hooks/api"; type Props = { @@ -14,18 +14,13 @@ const getCredentialModeLabel = (mode: AiMcpServerCredentialMode) => { }; export const MCPServerCredentialsSection = ({ server }: Props) => { - const handleManageCredentials = () => { - // TODO: Implement credential management modal - // Will handle re-authentication and credential removal - }; - return (

Credentials

- + */}