Skip to content

Commit

Permalink
feat: Show port info of MCP services (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO authored Jan 16, 2025
1 parent b29bca0 commit 4043459
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
@Slf4j
class ServiceServiceImpl implements ServiceService {

private static final boolean SHOW_MCP_SERVICE_PORTS = true;

private final KubernetesClientService kubernetesClientService;

public ServiceServiceImpl(KubernetesClientService kubernetesClientService) {
Expand Down Expand Up @@ -65,8 +67,8 @@ public PaginatedResult<Service> list(CommonPageQuery query) {
String name = registryzService.getHostname();

List<String> endpoints = getServiceEndpoints(serviceEndpoint, namespace, name);
if (CommonKey.MCP_NAMESPACE.equals(namespace) || CollectionUtils.isEmpty(registryzService.getPorts())) {
// We don't care about the port number of services got from McpBridge.
if (CollectionUtils.isEmpty(registryzService.getPorts())
|| !SHOW_MCP_SERVICE_PORTS && CommonKey.MCP_NAMESPACE.equals(namespace)) {
Service service = new Service();
service.setName(name);
service.setNamespace(namespace);
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/pages/service-source/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ const SourceList: React.FC = () => {
dataIndex: 'port',
key: 'port',
render: (value, record) => {
if (record.type === ServiceSourceTypes.static.key) {
return '-';
}
return value != null ? value : '-';
},
},
Expand Down

0 comments on commit 4043459

Please sign in to comment.