We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 271bb8d commit e19a9c6Copy full SHA for e19a9c6
src/context.ts
@@ -21,13 +21,15 @@ export class GlobalContext {
21
22
// Sets the initial datagraph and viewgraph
23
loadFromLocalStorage(this);
24
+
25
let maxIp = IpAddress.parse("10.0.0.0");
26
this.datagraph.getDevices().forEach((device) => {
27
const ip = IpAddress.parse(device.ip);
28
if (maxIp.octets < ip.octets) {
29
maxIp = ip;
30
}
31
});
32
+ // TODO: we should use IpAddress instead of string here and in Datagraph
33
const baseIp = maxIp.toString();
34
const mask = "255.255.255.255";
35
this.ipGenerator = new IpAddressGenerator(baseIp, mask);
0 commit comments