Skip to content

Commit 8629428

Browse files
authored
refactor(mcp): 优化 API 网关默认值和数据库配置 (higress-group#551)
1 parent 6c6aaca commit 8629428

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

frontend/src/pages/mcp/components/DatabaseConfig.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ const DatabaseConfig: React.FC<DatabaseConfigProps> = ({ dsn, dbType, dbUrl, dbP
9595
<Input
9696
key={item.id}
9797
style={{ width: 180 }}
98-
disabled={item.type === 'db_server_host' || item.type === 'db_server_port'}
9998
type={item.type === 'db_password' ? 'password' : 'text'}
10099
/>
101100
)}

frontend/src/pages/mcp/detail.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const MCPDetailPage: React.FC = () => {
3636
const navigate = useNavigate();
3737
const [activeTab, setActiveTab] = useState('config');
3838
const [mcpData, setMcpData] = useState<any>(null);
39-
const [apiGatewayUrl, setApiGatewayUrl] = useState('https://<higress-gateway-ip>');
39+
const [apiGatewayUrl, setApiGatewayUrl] = useState('http://<higress-gateway-ip>');
4040
const [authEnabled, setAuthEnabled] = useState(false);
4141
const [tools, setTools] = useState<any[]>([]);
4242
const [editToolVisible, setEditToolVisible] = useState(false);
@@ -73,7 +73,7 @@ const MCPDetailPage: React.FC = () => {
7373
const domainProtocol = domain?.enableHttps === 'off' ? 'http' : 'https';
7474
setApiGatewayUrl(`${domainProtocol}://${domain?.name}`);
7575
} else {
76-
setApiGatewayUrl('https://<higress-gateway-ip>');
76+
setApiGatewayUrl('http://<higress-gateway-ip>');
7777
}
7878
}
7979
} catch (error) {
@@ -265,10 +265,10 @@ const MCPDetailPage: React.FC = () => {
265265
<Card title={t('mcp.detail.endpointInfo')} bordered style={{ marginTop: 16 }}>
266266
<Descriptions column={2}>
267267
<Descriptions.Item label={t('mcp.detail.sseEndpoint')}>
268-
{`${apiGatewayUrl || 'https://<higress-gateway-ip>'}/mcp-servers/${name}/sse`}
268+
{`${apiGatewayUrl || 'http://<higress-gateway-ip>'}/mcp-servers/${name}/sse`}
269269
</Descriptions.Item>
270270
<Descriptions.Item label={t('mcp.detail.httpEndpoint')}>
271-
{`${apiGatewayUrl || 'https://<higress-gateway-ip>'}/mcp-servers/${name}`}
271+
{`${apiGatewayUrl || 'http://<higress-gateway-ip>'}/mcp-servers/${name}`}
272272
</Descriptions.Item>
273273
</Descriptions>
274274
</Card>
@@ -413,7 +413,7 @@ const MCPDetailPage: React.FC = () => {
413413
/>
414414
</div>
415415

416-
{apiGatewayUrl !== 'https://<higress-gateway-ip>' && (
416+
{apiGatewayUrl !== 'http://<higress-gateway-ip>' && (
417417
<div>
418418
<div style={{ fontWeight: 'bold', marginBottom: 8 }}>{t('mcp.detail.step2')}</div>
419419
<div style={{ background: '#f7f9fa', padding: 16, borderRadius: 4 }}>

0 commit comments

Comments
 (0)