File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export class DeviceInfo extends StyledInfo {
2222 this . device = device ;
2323 this . addCommonInfoFields ( ) ;
2424 this . addCommonButtons ( ) ;
25- this . addSendPacketButton ( ) ;
2625 }
2726
2827 private addCommonInfoFields ( ) {
@@ -62,7 +61,7 @@ export class DeviceInfo extends StyledInfo {
6261 ) ;
6362 }
6463
65- private addSendPacketButton ( ) {
64+ addSendPacketButton ( ) {
6665 const { id, viewgraph } = this . device ;
6766
6867 const adjacentDevices = viewgraph
@@ -106,6 +105,10 @@ export class DeviceInfo extends StyledInfo {
106105 this . inputFields . push ( dynamicTable ) ;
107106 }
108107
108+ addEmptySpace ( ) {
109+ this . inputFields . push ( document . createElement ( "br" ) ) ;
110+ }
111+
109112 toHTML ( ) : Node [ ] {
110113 return super . toHTML ( ) . concat ( this . inputFields ) ;
111114 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export class Host extends Device {
1919 showInfo ( ) : void {
2020 const info = new DeviceInfo ( this ) ;
2121 info . addField ( "IP Address" , this . ip . octets . join ( "." ) ) ;
22+ info . addSendPacketButton ( ) ;
2223 RightBar . getInstance ( ) . renderInfo ( info ) ;
2324 }
2425
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export class Router extends Device {
1919 showInfo ( ) : void {
2020 const info = new DeviceInfo ( this ) ;
2121 info . addField ( "IP Address" , this . ip . octets . join ( "." ) ) ;
22+ info . addEmptySpace ( ) ;
2223 info . addRoutingTable ( this . viewgraph . getRoutingTable ( this . id ) ) ;
2324 RightBar . getInstance ( ) . renderInfo ( info ) ;
2425 }
You can’t perform that action at this time.
0 commit comments