Fixing visuals for the SDN-IP demo.
Change-Id: Idd518213062c49c4f9011b951d87d2020927608a
diff --git a/tools/test/topos/sdn-ip.json b/tools/test/topos/sdn-ip.json
index 16f9b45..ab84ba6 100644
--- a/tools/test/topos/sdn-ip.json
+++ b/tools/test/topos/sdn-ip.json
@@ -13,14 +13,14 @@
],
"hosts" : [
- { "mac": "00:00:00:00:00:01", "vlan": -1, "location": "of:0000000000000001/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
- { "mac": "00:00:00:00:00:02", "vlan": -1, "location": "of:0000000000000002/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
- { "mac": "00:00:00:00:00:03", "vlan": -1, "location": "of:0000000000000003/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
- { "mac": "00:00:00:00:01:01", "vlan": -1, "location": "of:0000000000000005/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
- { "mac": "00:00:00:00:01:02", "vlan": -1, "location": "of:0000000000000006/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
- { "mac": "00:00:00:00:02:01", "vlan": -1, "location": "of:0000000000000007/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
- { "mac": "00:00:00:00:03:01", "vlan": -1, "location": "of:0000000000000008/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
- { "mac": "00:00:00:00:04:01", "vlan": -1, "location": "of:0000000000000009/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
- { "mac": "00:00:00:00:44:01", "vlan": -1, "location": "of:0000000000000010/10", "ip": "0.0.0.0", "annotations": { "type": "router" } }
+ { "mac": "00:00:00:00:00:01", "vlan": -1, "location": "of:0000000000000001/10", "ip": "10.0.1.2, 10.0.2.2", "annotations": { "type": "bgpSpeaker" } },
+ { "mac": "00:00:00:00:00:02", "vlan": -1, "location": "of:0000000000000002/10", "ip": "10.0.11.2, 10.0.22.2, 10.0.3.2, 10.0.4.2", "annotations": { "type": "bgpSpeaker" } },
+ { "mac": "00:00:00:00:00:03", "vlan": -1, "location": "of:0000000000000003/10", "ip": "10.0.33.2, 10.0.44.2", "annotations": { "type": "bgpSpeaker" } },
+ { "mac": "00:00:00:00:01:01", "vlan": -1, "location": "of:0000000000000005/10", "ip": "10.0.1.1", "annotations": { "type": "router" } },
+ { "mac": "00:00:00:00:01:02", "vlan": -1, "location": "of:0000000000000006/10", "ip": "10.0.11.1", "annotations": { "type": "router" } },
+ { "mac": "00:00:00:00:02:01", "vlan": -1, "location": "of:0000000000000007/10", "ip": "10.0.2.1, 10.0.22.1", "annotations": { "type": "router" } },
+ { "mac": "00:00:00:00:03:01", "vlan": -1, "location": "of:0000000000000008/10", "ip": "10.0.3.1, 10.0.33.1", "annotations": { "type": "router" } },
+ { "mac": "00:00:00:00:04:01", "vlan": -1, "location": "of:0000000000000009/10", "ip": "10.0.4.1", "annotations": { "type": "router" } },
+ { "mac": "00:00:00:00:44:01", "vlan": -1, "location": "of:0000000000000010/10", "ip": "10.0.44.1", "annotations": { "type": "router" } }
]
}
\ No newline at end of file
diff --git a/web/api/src/main/java/org/onlab/onos/rest/ConfigProvider.java b/web/api/src/main/java/org/onlab/onos/rest/ConfigProvider.java
index 5a0d909..f5694be 100644
--- a/web/api/src/main/java/org/onlab/onos/rest/ConfigProvider.java
+++ b/web/api/src/main/java/org/onlab/onos/rest/ConfigProvider.java
@@ -50,8 +50,10 @@
import java.net.URI;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.onlab.onos.net.DeviceId.deviceId;
@@ -205,10 +207,15 @@
HostId hostId = HostId.hostId(mac, vlanId);
SparseAnnotations annotations = annotations(node.get("annotations"));
HostLocation location = new HostLocation(connectPoint(get(node, "location")), 0);
- IpAddress ip = IpAddress.valueOf(get(node, "ip"));
+
+ String[] ipStrings = get(node, "ip").split(",");
+ Set<IpAddress> ips = new HashSet<>();
+ for (String ip : ipStrings) {
+ ips.add(IpAddress.valueOf(ip.trim()));
+ }
DefaultHostDescription desc =
- new DefaultHostDescription(mac, vlanId, location, ip, annotations);
+ new DefaultHostDescription(mac, vlanId, location, ips, annotations);
hps.hostDetected(hostId, desc);
}
diff --git a/web/gui/src/main/webapp/index2.html b/web/gui/src/main/webapp/index2.html
index ce09aab..eb268bb 100644
--- a/web/gui/src/main/webapp/index2.html
+++ b/web/gui/src/main/webapp/index2.html
@@ -77,7 +77,7 @@
<script type="text/javascript">
var ONOS = $.onos({
comment: 'configuration options',
- theme: 'light',
+ theme: 'dark',
startVid: 'topo',
trace: false
});
diff --git a/web/gui/src/main/webapp/mast2.css b/web/gui/src/main/webapp/mast2.css
index fa23835..e7d94b5 100644
--- a/web/gui/src/main/webapp/mast2.css
+++ b/web/gui/src/main/webapp/mast2.css
@@ -85,11 +85,13 @@
background-color: #bbb;
border: 1px solid #eee;
color: #666;
+
}
.dark #mast span.radio.active {
background-color: #222;
border: 1px solid #eee;
- color: #aaf;
+ Xcolor: #aaf;
+ color: #78a;
}
/* Button Bar */
@@ -119,6 +121,7 @@
border-bottom-color: #fff;
background-color: #888;
color: #ddf;
+ font-weight: bold;
}
.dark #bb .btn {
@@ -133,6 +136,8 @@
border-right-color: #888;
border-bottom-color: #888;
background-color: #555;
- color: #bbd;
+ Xcolor: #bbd;
+ color: #78a;
+ font-weight: bold;
}
diff --git a/web/gui/src/main/webapp/onos2.js b/web/gui/src/main/webapp/onos2.js
index 3dd930c..9fcd7f7 100644
--- a/web/gui/src/main/webapp/onos2.js
+++ b/web/gui/src/main/webapp/onos2.js
@@ -38,7 +38,7 @@
var defaultOptions = {
trace: false,
- theme: 'light',
+ theme: 'dark',
startVid: defaultVid
};
diff --git a/web/gui/src/main/webapp/topo2.css b/web/gui/src/main/webapp/topo2.css
index 3f87d47..40d2f8b 100644
--- a/web/gui/src/main/webapp/topo2.css
+++ b/web/gui/src/main/webapp/topo2.css
@@ -44,6 +44,7 @@
#topo svg .node.selected rect,
#topo svg .node.selected circle {
+ fill: #ffA300;
filter: url(#blue-glow);
}
@@ -81,7 +82,7 @@
}
#topo svg .node.device.roadm.online {
- fill: #03c;
+ fill: #335a9a;
}
/* note: device is offline without the 'online' class */
diff --git a/web/gui/src/main/webapp/topo2.js b/web/gui/src/main/webapp/topo2.js
index 81609e8..b2664fa 100644
--- a/web/gui/src/main/webapp/topo2.js
+++ b/web/gui/src/main/webapp/topo2.js
@@ -77,10 +77,10 @@
linkOutWidth: 30
},
icons: {
- w: 24,
- h: 24,
- xoff: -10,
- yoff: -6
+ w: 30,
+ h: 30,
+ xoff: -16,
+ yoff: -14
},
iconUrl: {
device: 'img/device.png',