patch..
This commit is contained in:
@@ -133,6 +133,15 @@ function summarizeEndpoints(endpoints: RosEndpoint[]): string {
|
||||
return endpoints.length === 1 ? truncatedFirstNode : `${truncatedFirstNode} 외 ${endpoints.length - 1}`
|
||||
}
|
||||
|
||||
function uniqueEndpoints(endpoints: RosEndpoint[]): RosEndpoint[] {
|
||||
const nodes = new Set<string>()
|
||||
return endpoints.filter((endpoint) => {
|
||||
if (nodes.has(endpoint.node)) return false
|
||||
nodes.add(endpoint.node)
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
function RuntimeLane({
|
||||
title,
|
||||
modules,
|
||||
@@ -372,8 +381,8 @@ export default function WorkspaceRosConnectionsView({
|
||||
const fallbackSubscribers = rosModules
|
||||
.filter((module) => module.subscribers.some((entry) => entry.name === item.name))
|
||||
.map(({ module }) => ({ node: getModuleNodeName(module), type: item.type }))
|
||||
const publishers = graphTopic?.publishers ?? fallbackPublishers
|
||||
const subscribers = graphTopic?.subscribers ?? fallbackSubscribers
|
||||
const publishers = uniqueEndpoints(graphTopic?.publishers ?? fallbackPublishers)
|
||||
const subscribers = uniqueEndpoints(graphTopic?.subscribers ?? fallbackSubscribers)
|
||||
return {
|
||||
topic: { name: item.name, type: graphTopic?.types[0] ?? item.type },
|
||||
publishers,
|
||||
@@ -546,7 +555,7 @@ export default function WorkspaceRosConnectionsView({
|
||||
</button>
|
||||
)
|
||||
}) : (
|
||||
<div className={['rounded-md border border-dashed px-4 py-10 text-center text-[11px]', dark ? 'border-white/12 text-white/38' : 'border-[#cdd6e4] text-[#7b8799]'].join(' ')}>
|
||||
<div className={['rounded-md border border-dashed px-3 py-8 text-center text-[11px]', dark ? 'border-white/12 text-white/38' : 'border-[#cdd6e4] text-[#7b8799]'].join(' ')}>
|
||||
실행 모듈에서 확인된 토픽이 없습니다.
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user