Skip to content

Commit e939761

Browse files
committed
Topology
1 parent 582bd66 commit e939761

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Protest/Front/topology.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ class Topology extends Window {
177177
this.svg.appendChild(this.linksGroup);
178178
}
179179

180+
Clear() {
181+
this.devices = {};
182+
this.workspace.textContent = "";
183+
this.sideBar.textContent = "";
184+
}
185+
180186
StartDialog() {
181187
const dialog = this.DialogBox("280px");
182188
if (dialog === null) return;
@@ -268,6 +274,9 @@ class Topology extends Window {
268274
setTimeout(()=>okButton.focus(), 200);
269275

270276
okButton.onclick = async ()=> {
277+
this.Clear();
278+
this.InitializeSvg();
279+
271280
dialog.Close();
272281

273282
const devices = [];
@@ -431,8 +440,8 @@ class Topology extends Window {
431440
ComputeLinks(device) {
432441
device.links = {};
433442

434-
for (let i=0; i<ldap.localPortName.length; i++) {
435-
console.log(ldap.localPortName[i]);
443+
for (let i=0; i<device.lldp.localPortName.length; i++) {
444+
436445
}
437446
}
438447

0 commit comments

Comments
 (0)