File tree Expand file tree Collapse file tree
console-ui-next/src/pages/mcpServerDetail
console-ui/src/pages/AI/McpManagement Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -875,12 +875,13 @@ function EndpointItem({
875875 endpoint : { protocol : string ; address : string ; port : string ; path ?: string ; headers ?: { name : string ; value ?: string } [ ] } ;
876876 t : ( key : string ) => string ;
877877} ) {
878- const url = `${ endpoint . protocol } ://${ endpoint . address } ${ endpoint . port ? ':' + endpoint . port : '' } ${ endpoint . path || '' } ` ;
878+ const protocol = endpoint . protocol || 'http' ;
879+ const url = `${ protocol } ://${ endpoint . address } ${ endpoint . port ? ':' + endpoint . port : '' } ${ endpoint . path || '' } ` ;
879880 return (
880881 < div className = "rounded-lg border bg-muted/20 p-3 space-y-2" >
881882 < div className = "flex items-center gap-2" >
882883 < span className = "inline-flex items-center rounded-md bg-primary/10 text-primary px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider" >
883- { endpoint . protocol }
884+ { protocol }
884885 </ span >
885886 < span className = "text-xs font-mono text-muted-foreground truncate" > { url } </ span >
886887 </ div >
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ class McpManagement extends React.Component {
367367 // 外部直连
368368 else if ( data && data . backendEndpoints && data . backendEndpoints . length > 0 ) {
369369 // 解析address
370- const protocol = data . backendEndpoints [ 0 ] . protocol ;
370+ const protocol = data . backendEndpoints [ 0 ] . protocol || 'http' ;
371371 const address = data . backendEndpoints [ 0 ] . address ;
372372 const port = data . backendEndpoints [ 0 ] . port ;
373373 const exportPath = data . backendEndpoints [ 0 ] . path ;
You can’t perform that action at this time.
0 commit comments