Commit 7973e51c authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Suspended view regression fixes

parent bc288dc2
......@@ -6624,9 +6624,14 @@ input.has-errors {
text-decoration: underline;
}
.single .suspended-notice {
right: 98px;
top:2px;
}
.icon .suspended-notice {
right: 192px;
top: 50px;
top: 54px;
}
.suspended-notice {
......
......@@ -784,7 +784,19 @@
}, this));
},
get_public_ips: function() {
var ips = [];
this.ports.filter(function(port) {
if (port.get('network') && !port.get('network').get('is_public')) { return }
if (!port.get("ips")) { return }
port.get("ips").each(function(ip) {
ips.push(ip);
});
});
return ips;
},
has_public_ip: function() {
return this.ports.filter(function(port) {
return port.get("network") &&
......
......@@ -104,7 +104,10 @@
data += "\n====================";
data += "\nID: " + vm.id;
data += "\nName: " + vm.get('name');
data += "\nPublic IP: " + vm.get_public_nic().get('ipv4');
var public_ips = vm.get_public_ips();
_.each(public_ips, function(ip) {
data += "\nPublic IP{0}: {1}".format(ip.get('type'), ip.get('ip_address'));
});
data += "\n\n";
views.SuspendedVMView.__super__.show.call(this, data, collect_data, extra_data, cb);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment