patch..
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lms",
|
"name": "lms",
|
||||||
"version": "1.1.14",
|
"version": "1.1.15",
|
||||||
"description": "Autonomy Studio LMS Electron app",
|
"description": "Autonomy Studio LMS Electron app",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
+2
-2
@@ -1237,7 +1237,7 @@ async function collectLocalRosGraph(): Promise<RosGraphSnapshot> {
|
|||||||
const names = (await runCommandOutput('docker', ['ps', '--format', '{{.Names}}'], undefined, undefined, 8_000))
|
const names = (await runCommandOutput('docker', ['ps', '--format', '{{.Names}}'], undefined, undefined, 8_000))
|
||||||
.split('\n').map((line) => line.trim()).filter(Boolean)
|
.split('\n').map((line) => line.trim()).filter(Boolean)
|
||||||
const containerName = pickRosGraphProbeContainer(names)
|
const containerName = pickRosGraphProbeContainer(names)
|
||||||
if (!containerName) return { topics: [], message: '실행 중인 ROS 컨테이너가 없습니다.' }
|
if (!containerName) return { topics: [] }
|
||||||
const output = await runCommandOutput('docker', ['exec', containerName, 'bash', '-lc', rosGraphProbeCommand()], undefined, undefined, 12_000)
|
const output = await runCommandOutput('docker', ['exec', containerName, 'bash', '-lc', rosGraphProbeCommand()], undefined, undefined, 12_000)
|
||||||
return parseRosGraphSnapshot(output)
|
return parseRosGraphSnapshot(output)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -1251,7 +1251,7 @@ async function collectRemoteRosGraph(targetInput: RemoteWorkspaceTarget): Promis
|
|||||||
const names = (await runSshOutput(target, 'timeout 8s docker ps --format "{{.Names}}" 2>/dev/null || true', 15_000))
|
const names = (await runSshOutput(target, 'timeout 8s docker ps --format "{{.Names}}" 2>/dev/null || true', 15_000))
|
||||||
.split('\n').map((line) => line.trim()).filter(Boolean)
|
.split('\n').map((line) => line.trim()).filter(Boolean)
|
||||||
const containerName = pickRosGraphProbeContainer(names)
|
const containerName = pickRosGraphProbeContainer(names)
|
||||||
if (!containerName) return { topics: [], message: '실행 중인 ROS 컨테이너가 없습니다.' }
|
if (!containerName) return { topics: [] }
|
||||||
const output = await runSshOutput(target, `timeout 12s docker exec ${quoteShellSingle(containerName)} bash -lc ${quoteShellSingle(rosGraphProbeCommand())}`, 20_000)
|
const output = await runSshOutput(target, `timeout 12s docker exec ${quoteShellSingle(containerName)} bash -lc ${quoteShellSingle(rosGraphProbeCommand())}`, 20_000)
|
||||||
return parseRosGraphSnapshot(output)
|
return parseRosGraphSnapshot(output)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -133,6 +133,15 @@ function summarizeEndpoints(endpoints: RosEndpoint[]): string {
|
|||||||
return endpoints.length === 1 ? truncatedFirstNode : `${truncatedFirstNode} 외 ${endpoints.length - 1}`
|
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({
|
function RuntimeLane({
|
||||||
title,
|
title,
|
||||||
modules,
|
modules,
|
||||||
@@ -372,8 +381,8 @@ export default function WorkspaceRosConnectionsView({
|
|||||||
const fallbackSubscribers = rosModules
|
const fallbackSubscribers = rosModules
|
||||||
.filter((module) => module.subscribers.some((entry) => entry.name === item.name))
|
.filter((module) => module.subscribers.some((entry) => entry.name === item.name))
|
||||||
.map(({ module }) => ({ node: getModuleNodeName(module), type: item.type }))
|
.map(({ module }) => ({ node: getModuleNodeName(module), type: item.type }))
|
||||||
const publishers = graphTopic?.publishers ?? fallbackPublishers
|
const publishers = uniqueEndpoints(graphTopic?.publishers ?? fallbackPublishers)
|
||||||
const subscribers = graphTopic?.subscribers ?? fallbackSubscribers
|
const subscribers = uniqueEndpoints(graphTopic?.subscribers ?? fallbackSubscribers)
|
||||||
return {
|
return {
|
||||||
topic: { name: item.name, type: graphTopic?.types[0] ?? item.type },
|
topic: { name: item.name, type: graphTopic?.types[0] ?? item.type },
|
||||||
publishers,
|
publishers,
|
||||||
@@ -546,7 +555,7 @@ export default function WorkspaceRosConnectionsView({
|
|||||||
</button>
|
</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>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user