mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-21 07:58:25 +00:00
Displaying ports updated
This commit is contained in:
@ -4,19 +4,17 @@
|
|||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="General information">
|
<mat-tab label="General information">
|
||||||
<div class='textBox'>
|
<div class='textBox'>
|
||||||
<mat-list>
|
<div *ngFor="let info of infoList">
|
||||||
<mat-list-item *ngFor="let info of infoList">
|
{{info}}
|
||||||
{{info}}
|
</div>
|
||||||
</mat-list-item>
|
|
||||||
</mat-list>
|
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Command line">
|
<mat-tab label="Command line">
|
||||||
<div *ngIf="node.status !== 'started'" class='textBox'>
|
<div *ngIf="node.status !== 'started'" class='textBox'>
|
||||||
Please start the node in order to get the command line information.
|
Please start the node in order to get the command line information.
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="node.status === 'started'" class="textBox">
|
<div class="textBox">
|
||||||
{{node.command_line}}
|
{{command_line}}
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
|
@ -46,14 +46,12 @@ export class InfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getInfoAboutPorts(ports: Port[]): string {
|
getInfoAboutPorts(ports: Port[]): string {
|
||||||
let response: string = `ports: `
|
let response: string = `Ports: `
|
||||||
ports.forEach(port => {
|
ports.forEach(port => {
|
||||||
response = response + `adapter_number: ${port.adapter_number},
|
response += `link_type: ${port.link_type},
|
||||||
link_type: ${port.link_type},
|
name: ${port.name}; `
|
||||||
name: ${port.name},
|
|
||||||
port_number: ${port.port_number},
|
|
||||||
short_name: ${port.short_name}, `
|
|
||||||
});
|
});
|
||||||
|
response = response.substring(0, response.length - 2);
|
||||||
return response;
|
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") {
|
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.';
|
return 'Command line information is not supported for this type of node.';
|
||||||
} else {
|
} 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.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user