Permalink
Browse files

show secondly private ip

  • Loading branch information...
1 parent 8f66349 commit ff8945711868eab4576149d2bad1975611b77d6a Genki Sugawara committed Sep 2, 2012
@@ -2967,6 +2967,24 @@ var ec2ui_controller = {
groupList.sort();
+ var ipAddrList = [];
+ var privateIpAddressesSet = item.getElementsByTagName('privateIpAddressesSet')[0];
+
+ if (privateIpAddressesSet) {
+ var privateIpAddressesSetItems = privateIpAddressesSet.getElementsByTagName('item');
+
+ for (var j = 0; j < privateIpAddressesSetItems.length; j++) {
+ var ip_addr = getNodeValueByName(privateIpAddressesSetItems[j], "privateIpAddress");
+ var primary = getNodeValueByName(privateIpAddressesSetItems[j], "primary");
+
+ if (primary != "true") {
+ ipAddrList.push(ip_addr);
+ }
+ }
+ }
+
+ ipAddrList.sort();
+
var attachmentId = null;
var instanceId = null;
var deviceIndex = null;
@@ -2980,7 +2998,7 @@ var ec2ui_controller = {
list.push(new NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone, description,
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck,
- groupList, attachmentId, instanceId, deviceIndex));
+ groupList, attachmentId, instanceId, deviceIndex, ipAddrList));
}
@@ -79,6 +79,9 @@
<treecol id="eni.privateIpAddress" label="Private IP Address" flex="1" sortDirection="ascending"
persist="width ordinal hidden sortDirection" />
<splitter class="tree-splitter" />
+ <treecol id="eni.ipAddrs" label="Secondly Private IP Address" flex="1" sortDirection="ascending"
+ persist="width ordinal hidden sortDirection" />
+ <splitter class="tree-splitter" />
<treecol id="eni.sourceDestCheck" label="Source/Dest Check" flex="1" sortDirection="ascending"
persist="width ordinal hidden sortDirection" />
<splitter class="tree-splitter" />
@@ -16,6 +16,7 @@ var ec2ui_ENITreeView = {
'eni.instanceId',
'eni.instanceName',
'eni.deviceIndex',
+ 'eni.ipAddrs',
],
treeBox : null,
@@ -152,7 +152,7 @@ function VolumeStatusEvent(volumeId, availabilityZone, eventId, eventType, descr
function NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone, description,
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck,
- groupList, attachmentId, instanceId, deviceIndex) {
+ groupList, attachmentId, instanceId, deviceIndex, ipAddrList) {
this.networkInterfaceId = networkInterfaceId;
this.subnetId = subnetId;
this.vpcId = vpcId;
@@ -169,6 +169,8 @@ function NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone,
this.attachmentId = attachmentId;
this.instanceId = instanceId;
this.deviceIndex = deviceIndex;
+ this.ipAddrList = ipAddrList;
+ this.ipAddrs = this.ipAddrList.sort().join(', ');
}
function SecurityGroup(ownerId, name, description, permissions, vpcId, groupId) {

0 comments on commit ff89457

Please sign in to comment.