diff --git a/src/app/components/project-map/info-dialog/info-dialog.component.html b/src/app/components/project-map/info-dialog/info-dialog.component.html index 4bf096d9..96a2234a 100644 --- a/src/app/components/project-map/info-dialog/info-dialog.component.html +++ b/src/app/components/project-map/info-dialog/info-dialog.component.html @@ -4,19 +4,17 @@
- - - {{info}} - - +
+ {{info}} +
Please start the node in order to get the command line information.
-
- {{node.command_line}} +
+ {{command_line}}
diff --git a/src/app/services/info.service.ts b/src/app/services/info.service.ts index 62f58f7a..0e722927 100644 --- a/src/app/services/info.service.ts +++ b/src/app/services/info.service.ts @@ -46,14 +46,12 @@ export class InfoService { } getInfoAboutPorts(ports: Port[]): string { - let response: string = `ports: ` + let response: string = `Ports: ` ports.forEach(port => { - response = response + `adapter_number: ${port.adapter_number}, - link_type: ${port.link_type}, - name: ${port.name}, - port_number: ${port.port_number}, - short_name: ${port.short_name}, ` + response += `link_type: ${port.link_type}, + name: ${port.name}; ` }); + response = response.substring(0, response.length - 2); return response; } @@ -61,7 +59,11 @@ export class InfoService { if (node.node_type === 'cloud' || "nat" || "ethernet_hub" || "ethernet_switch" || "frame_relay_switch" || "atm_switch" || "dynamips" || "traceng" || "iou") { return 'Command line information is not supported for this type of node.'; } else { - return node.command_line; + if (node.status === 'started') { + return node.command_line; + } else { + return 'Please start the node in order to get the command line information.'; + } } } }