Permalink
Browse files

small fix

  • Loading branch information...
1 parent 86d63d0 commit 07ebb41149b80766b6fa9fe87d1edd430a7d25b3 @winebarrel winebarrel committed Apr 22, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 ec2ui/content/ec2ui/instancesview.js
@@ -1479,7 +1479,21 @@ outer:
var hostname = this.getIPFromHostname(instance);
if (isVpc(instance)) {
- hostname = instance.privateIpAddress;
+ hostname = null;
+ var eips = ec2ui_model.getAddresses();
+
+ for (var i in eips) {
+ var eip = eips[i];
+
+ if (eip.instanceid == instance.id) {
+ hostname = eip.address;
+ break;
+ }
+ }
+
+ if (!hostname) {
+ hostname = instance.privateIpAddress;
+ }
} else {
this.openConnectionPort(instance);
}

0 comments on commit 07ebb41

Please sign in to comment.