Skip to content
Snippets Groups Projects
Commit 98ae0c4d authored by abat's avatar abat
Browse files

Merge into master from pull request #105:

    topology ui: more error checking  (https://github.com/floodlight/floodlight/pull/105)
parents b66d21fb 1677f28f
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,8 @@ window.TopologyView = Backbone.View.extend({
for (var i = 0; i < this.hosts.length; i++) {
host = this.hosts[i];
if ('ip' in host.attributes['network-addresses'][0]) {
if (( host.attributes['network-addresses'].length > 0 ) &&
('ip' in host.attributes['network-addresses'][0])) {
host.name = host.attributes['network-addresses'][0]['ip'] + "\n" + host.id;
} else {
host.name = host.id;
......
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