Skip to content
Snippets Groups Projects
Commit 660d398c authored by abat's avatar abat
Browse files

Merge into master from pull request #103:

topology ui bugfix: don't assume hosts have ips (https://github.com/floodlight/floodlight/pull/103)
parents 07c2b20a 3bb4c0c7
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ window.TopologyView = Backbone.View.extend({
for (var i = 0; i < this.hosts.length; i++) {
host = this.hosts[i];
host.name = host.attributes['network-addresses'][0]['ip'] + "\n" + host.id;
if ('ip' in host.attributes['network-addresses'][0]) {
host.name = host.attributes['network-addresses'][0]['ip'] + "\n" + host.id;
} else {
host.name = host.id;
}
host.group = 2;
console.log(host);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment