Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
add instanceId to eni tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Mar 25, 2012
1 parent 15b90db commit 64fad7b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion ec2ui/content/ec2ui/controller.js
Expand Up @@ -2818,8 +2818,15 @@ var ec2ui_controller = {

groupList.sort();

var instanceId = null;
var attachment = item.getElementsByTagName('attachment')[0];

if (attachment) {
var instanceId = getNodeValueByName(attachment, 'instanceId');
}

list.push(new NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone, description,
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck, groupList));
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck, groupList, instanceId));

}

Expand Down
3 changes: 3 additions & 0 deletions ec2ui/content/ec2ui/eni_tab_overlay.xul
Expand Up @@ -71,6 +71,9 @@
<treecol id="eni.groups" label="Security Groups" flex="1" sortDirection="ascending"
persist="width ordinal hidden sortDirection" />
<splitter class="tree-splitter" />
<treecol id="eni.instanceId" label="Instances ID" flex="1" sortDirection="ascending"
persist="width ordinal hidden sortDirection" />
<splitter class="tree-splitter" />
</treecols>
<treechildren context="ec2ui.eni.contextmenu" />
</tree>
Expand Down
1 change: 1 addition & 0 deletions ec2ui/content/ec2ui/eniview.js
Expand Up @@ -12,6 +12,7 @@ var ec2ui_ENITreeView = {
'eni.privateIpAddress',
'eni.sourceDestCheck',
'eni.groups',
'eni.instanceId',
],

treeBox : null,
Expand Down
4 changes: 3 additions & 1 deletion ec2ui/content/ec2ui/model.js
Expand Up @@ -136,7 +136,8 @@ function InstanceStatusEvent(instanceId, availabilityZone, code, description, st
}

function NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone, description,
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck, groupList) {
ownerId, requesterManaged, status, macAddress, privateIpAddress, sourceDestCheck,
groupList, instanceId) {
this.networkInterfaceId = networkInterfaceId;
this.subnetId = subnetId;
this.vpcId = vpcId;
Expand All @@ -150,6 +151,7 @@ function NetworkInterface(networkInterfaceId, subnetId, vpcId, availabilityZone,
this.sourceDestCheck = sourceDestCheck;
this.groupList = groupList;
this.groups = this.groupList.sort().join(', ');
this.instanceId = instanceId;
}

function SecurityGroup(ownerId, name, description, permissions, vpcId, groupId) {
Expand Down

0 comments on commit 64fad7b

Please sign in to comment.