Skip to content
Browse files

add createNetworkInterface

  • Loading branch information...
1 parent 62c5462 commit 1683ab1665dff589f782b5651340901d1d335a34 @winebarrel winebarrel committed
Showing with 176 additions and 0 deletions.
  1. 0 ec2ui/META-INF/MANIFEST.MF
  2. 0 ec2ui/content/ec2ui/accountid_manager.js
  3. 0 ec2ui/content/ec2ui/accountidsview.js
  4. 0 ec2ui/content/ec2ui/amidetaildialog.js
  5. 0 ec2ui/content/ec2ui/amisview.js
  6. 0 ec2ui/content/ec2ui/associate_dhcp_options_dialog.js
  7. 0 ec2ui/content/ec2ui/attach_vpn_gateway_dialog.js
  8. 0 ec2ui/content/ec2ui/attachebsvolumedialog.js
  9. 0 ec2ui/content/ec2ui/availzone_tab_overlay.xul
  10. 0 ec2ui/content/ec2ui/azoneview.js
  11. 0 ec2ui/content/ec2ui/base64.js
  12. 0 ec2ui/content/ec2ui/baseimagesview.js
  13. 0 ec2ui/content/ec2ui/blank.htm
  14. 0 ec2ui/content/ec2ui/bundleInstanceDialog.js
  15. 0 ec2ui/content/ec2ui/bundle_tasks_tab_overlay.xul
  16. 0 ec2ui/content/ec2ui/bundletaskdetailsdialog.js
  17. 0 ec2ui/content/ec2ui/bundletasksview.js
  18. 0 ec2ui/content/ec2ui/client.js
  19. +29 −0 ec2ui/content/ec2ui/controller.js
  20. 0 ec2ui/content/ec2ui/copyS3dialog.js
  21. 0 ec2ui/content/ec2ui/createImageDialog.js
  22. 0 ec2ui/content/ec2ui/create_customer_gateway_dialog.js
  23. 0 ec2ui/content/ec2ui/create_dhcp_options_dialog.js
  24. 0 ec2ui/content/ec2ui/create_subnet_dialog.js
  25. 0 ec2ui/content/ec2ui/create_vpn_connection_dialog.js
  26. 0 ec2ui/content/ec2ui/create_vpn_gateway_dialog.js
  27. 0 ec2ui/content/ec2ui/createsecgroupdialog.js
  28. 0 ec2ui/content/ec2ui/createvpcdialog.js
  29. 0 ec2ui/content/ec2ui/credential_manager.js
  30. 0 ec2ui/content/ec2ui/credentialsview.js
  31. 0 ec2ui/content/ec2ui/customergatewaysview.js
  32. 0 ec2ui/content/ec2ui/deleteamidialog.js
  33. 0 ec2ui/content/ec2ui/dhcpoptionsview.js
  34. 0 ec2ui/content/ec2ui/dialog_about.xul
  35. 0 ec2ui/content/ec2ui/dialog_allocate_address.js
  36. 0 ec2ui/content/ec2ui/dialog_allocate_address.xul
  37. 0 ec2ui/content/ec2ui/dialog_ami_details.xul
  38. 0 ec2ui/content/ec2ui/dialog_associate_dhcp_options.xul
  39. 0 ec2ui/content/ec2ui/dialog_attach_ebs_volume.xul
  40. 0 ec2ui/content/ec2ui/dialog_attach_vpn_gateway.xul
  41. 0 ec2ui/content/ec2ui/dialog_bundle_instance.xul
  42. 0 ec2ui/content/ec2ui/dialog_bundle_task_details.xul
  43. 0 ec2ui/content/ec2ui/dialog_console_output.xul
  44. 0 ec2ui/content/ec2ui/dialog_copy_S3_keys.xul
  45. 0 ec2ui/content/ec2ui/dialog_create_customer_gateway.xul
  46. 0 ec2ui/content/ec2ui/dialog_create_dhcp_options.xul
  47. 0 ec2ui/content/ec2ui/dialog_create_image.xul
  48. 0 ec2ui/content/ec2ui/dialog_create_security_group.xul
  49. 0 ec2ui/content/ec2ui/dialog_create_subnet.xul
  50. 0 ec2ui/content/ec2ui/dialog_create_vpc.xul
  51. 0 ec2ui/content/ec2ui/dialog_create_vpn_connection.xul
  52. 0 ec2ui/content/ec2ui/dialog_create_vpn_gateway.xul
  53. 0 ec2ui/content/ec2ui/dialog_delete_ami.xul
  54. 0 ec2ui/content/ec2ui/dialog_disable_lbazone.xul
  55. 0 ec2ui/content/ec2ui/dialog_eip_details.xul
  56. 0 ec2ui/content/ec2ui/dialog_instance_details.xul
  57. 0 ec2ui/content/ec2ui/dialog_instance_type.xul
  58. 0 ec2ui/content/ec2ui/dialog_keypair_details.xul
  59. 0 ec2ui/content/ec2ui/dialog_manage_accountids.xul
  60. 0 ec2ui/content/ec2ui/dialog_manage_credentials.xul
  61. 0 ec2ui/content/ec2ui/dialog_manage_endpoints.xul
  62. 0 ec2ui/content/ec2ui/dialog_manage_tools.xul
  63. 0 ec2ui/content/ec2ui/dialog_migrate_ami.xul
  64. 0 ec2ui/content/ec2ui/dialog_new_attachment.xul
  65. 0 ec2ui/content/ec2ui/dialog_new_instances.xul
  66. +76 −0 ec2ui/content/ec2ui/dialog_new_interface.js
  67. +38 −0 ec2ui/content/ec2ui/dialog_new_interface.xul
  68. 0 ec2ui/content/ec2ui/dialog_new_permission.xul
  69. 0 ec2ui/content/ec2ui/dialog_new_volume.xul
  70. 0 ec2ui/content/ec2ui/dialog_offering_details.xul
  71. 0 ec2ui/content/ec2ui/dialog_permission_details.xul
  72. 0 ec2ui/content/ec2ui/dialog_purchase_offering.xul
  73. 0 ec2ui/content/ec2ui/dialog_register_image.xul
  74. 0 ec2ui/content/ec2ui/dialog_reserved_instances_details.xul
  75. 0 ec2ui/content/ec2ui/dialog_retry_cancel.xul
  76. 0 ec2ui/content/ec2ui/dialog_security_group.js
  77. 0 ec2ui/content/ec2ui/dialog_security_group.xul
  78. 0 ec2ui/content/ec2ui/dialog_securitygroup_details.xul
  79. 0 ec2ui/content/ec2ui/dialog_select_eip.xul
  80. 0 ec2ui/content/ec2ui/dialog_snapshot_details.xul
  81. 0 ec2ui/content/ec2ui/dialog_summary.xul
  82. 0 ec2ui/content/ec2ui/dialog_volume_details.xul
  83. 0 ec2ui/content/ec2ui/dialog_vpnconnection_customer_config.xul
  84. 0 ec2ui/content/ec2ui/ec2ui.xul
  85. 0 ec2ui/content/ec2ui/ec2ui_main_window.xul
  86. 0 ec2ui/content/ec2ui/eip_tab_overlay.xul
  87. 0 ec2ui/content/ec2ui/eipdetaildialog.js
  88. 0 ec2ui/content/ec2ui/eipview.js
  89. 0 ec2ui/content/ec2ui/endpoint_manager.js
  90. 0 ec2ui/content/ec2ui/endpointsview.js
  91. +4 −0 ec2ui/content/ec2ui/eni_tab_overlay.xul
  92. +29 −0 ec2ui/content/ec2ui/eniview.js
  93. 0 ec2ui/content/ec2ui/images/about.png
  94. 0 ec2ui/content/ec2ui/images/accountids.png
  95. 0 ec2ui/content/ec2ui/images/addlaunchperm.png
  96. 0 ec2ui/content/ec2ui/images/alloc.png
  97. 0 ec2ui/content/ec2ui/images/assoc.png
  98. 0 ec2ui/content/ec2ui/images/attach.png
  99. 0 ec2ui/content/ec2ui/images/authorize.png
  100. 0 ec2ui/content/ec2ui/images/cash.png
  101. 0 ec2ui/content/ec2ui/images/create_security_group.png
  102. 0 ec2ui/content/ec2ui/images/createcgw.png
  103. 0 ec2ui/content/ec2ui/images/createdhcpoptions.png
  104. BIN ec2ui/content/ec2ui/images/createinterface.png
  105. 0 ec2ui/content/ec2ui/images/createkey.png
  106. 0 ec2ui/content/ec2ui/images/createsnap.png
  107. 0 ec2ui/content/ec2ui/images/createsubnet.png
  108. 0 ec2ui/content/ec2ui/images/createvol.png
  109. 0 ec2ui/content/ec2ui/images/createvolfromsnap.png
  110. 0 ec2ui/content/ec2ui/images/createvpc.png
  111. 0 ec2ui/content/ec2ui/images/createvpnconn.png
  112. 0 ec2ui/content/ec2ui/images/createvpngw.png
  113. 0 ec2ui/content/ec2ui/images/credentials.png
  114. 0 ec2ui/content/ec2ui/images/delete.png
  115. 0 ec2ui/content/ec2ui/images/delete_security_group.png
  116. 0 ec2ui/content/ec2ui/images/deregisterami.png
  117. 0 ec2ui/content/ec2ui/images/detach.png
  118. 0 ec2ui/content/ec2ui/images/disassoc.png
  119. 0 ec2ui/content/ec2ui/images/get_console_output.png
  120. 0 ec2ui/content/ec2ui/images/get_customer_config.png
  121. 0 ec2ui/content/ec2ui/images/info.png
  122. 0 ec2ui/content/ec2ui/images/left.png
  123. 0 ec2ui/content/ec2ui/images/makeamipublic.png
  124. 0 ec2ui/content/ec2ui/images/powerdown.png
  125. 0 ec2ui/content/ec2ui/images/powerup.png
  126. 0 ec2ui/content/ec2ui/images/reboot.png
  127. 0 ec2ui/content/ec2ui/images/refresh.png
  128. 0 ec2ui/content/ec2ui/images/regions.png
  129. 0 ec2ui/content/ec2ui/images/registerami.png
  130. 0 ec2ui/content/ec2ui/images/release.png
  131. 0 ec2ui/content/ec2ui/images/removelaunchperm.png
  132. 0 ec2ui/content/ec2ui/images/resetlaunchperms.png
  133. 0 ec2ui/content/ec2ui/images/revoke.png
  134. 0 ec2ui/content/ec2ui/images/right.png
  135. 0 ec2ui/content/ec2ui/images/ssh.png
  136. 0 ec2ui/content/ec2ui/images/start.png
  137. 0 ec2ui/content/ec2ui/images/stop.png
  138. 0 ec2ui/content/ec2ui/images/tools.png
  139. 0 ec2ui/content/ec2ui/images_tab_overlay.xul
  140. 0 ec2ui/content/ec2ui/img.htm
  141. 0 ec2ui/content/ec2ui/instanceconsoledialog.js
  142. 0 ec2ui/content/ec2ui/instancedetaildialog.js
  143. 0 ec2ui/content/ec2ui/instances_tab_overlay.xul
  144. 0 ec2ui/content/ec2ui/instancesummary.js
  145. 0 ec2ui/content/ec2ui/instancesview.js
  146. 0 ec2ui/content/ec2ui/io.js
  147. 0 ec2ui/content/ec2ui/jsbn.js
  148. 0 ec2ui/content/ec2ui/jsbn2.js
  149. 0 ec2ui/content/ec2ui/keypairdetaildialog.js
  150. 0 ec2ui/content/ec2ui/keypairs_tab_overlay.xul
  151. 0 ec2ui/content/ec2ui/keypairview.js
  152. 0 ec2ui/content/ec2ui/leaseofferingsview.js
  153. 0 ec2ui/content/ec2ui/leases_tab_overlay.xul
  154. 0 ec2ui/content/ec2ui/migrateAMIDialog.js
  155. 0 ec2ui/content/ec2ui/model.js
  156. 0 ec2ui/content/ec2ui/newattachmentdialog.js
  157. 0 ec2ui/content/ec2ui/newimagedialog.js
  158. 0 ec2ui/content/ec2ui/newinstancesdialog.js
  159. 0 ec2ui/content/ec2ui/newpermissionauthorizer.js
  160. 0 ec2ui/content/ec2ui/newvolumedialog.js
  161. 0 ec2ui/content/ec2ui/offeringdetaildialog.js
  162. 0 ec2ui/content/ec2ui/permissiondetaildialog.js
  163. 0 ec2ui/content/ec2ui/permissionsview.js
  164. 0 ec2ui/content/ec2ui/preferences.js
  165. 0 ec2ui/content/ec2ui/purchaseofferingdialog.js
  166. 0 ec2ui/content/ec2ui/reservedinstancesdetaildialog.js
  167. 0 ec2ui/content/ec2ui/reservedinstancesview.js
  168. 0 ec2ui/content/ec2ui/rsa.js
  169. 0 ec2ui/content/ec2ui/rsa2.js
  170. 0 ec2ui/content/ec2ui/rsahelper.js
  171. 0 ec2ui/content/ec2ui/scheduledevents.js
  172. 0 ec2ui/content/ec2ui/scheduledevents_tab_overlay.xul
  173. 0 ec2ui/content/ec2ui/security_groups_tab_overlay.xul
  174. 0 ec2ui/content/ec2ui/securitygroupdetaildialog.js
  175. 0 ec2ui/content/ec2ui/securitygroupsview.js
  176. 0 ec2ui/content/ec2ui/selecteipdialog.js
  177. 0 ec2ui/content/ec2ui/session.js
  178. 0 ec2ui/content/ec2ui/sha1.js
  179. 0 ec2ui/content/ec2ui/snapshotdetaildialog.js
  180. 0 ec2ui/content/ec2ui/snapshotsview.js
  181. 0 ec2ui/content/ec2ui/strftime.js
  182. 0 ec2ui/content/ec2ui/subnetsview.js
  183. 0 ec2ui/content/ec2ui/tools_manager.js
  184. 0 ec2ui/content/ec2ui/utils.js
  185. 0 ec2ui/content/ec2ui/volumedetaildialog.js
  186. 0 ec2ui/content/ec2ui/volumes_tab_overlay.xul
  187. 0 ec2ui/content/ec2ui/volumesview.js
  188. 0 ec2ui/content/ec2ui/vpcs_tab_overlay.xul
  189. 0 ec2ui/content/ec2ui/vpcsview.js
  190. 0 ec2ui/content/ec2ui/vpnattachmentsview.js
  191. 0 ec2ui/content/ec2ui/vpnconnection_customer_config_dialog.js
  192. 0 ec2ui/content/ec2ui/vpnconnectionsview.js
  193. 0 ec2ui/content/ec2ui/vpngatewaysview.js
  194. 0 ec2ui/content/ec2ui/vpns_tab_overlay.xul
  195. 0 ec2ui/locale/ec2ui/en-US/ec2ui.dtd
  196. 0 ec2ui/locale/ec2ui/en-US/ec2ui.properties
  197. 0 ec2ui/skin/classic/ec2ui/button.png
  198. 0 ec2ui/skin/classic/ec2ui/ec2ui.css
View
0 ec2ui/META-INF/MANIFEST.MF 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/accountid_manager.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/accountidsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/amidetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/amisview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/associate_dhcp_options_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/attach_vpn_gateway_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/attachebsvolumedialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/availzone_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/azoneview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/base64.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/baseimagesview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/blank.htm 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/bundleInstanceDialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/bundle_tasks_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/bundletaskdetailsdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/bundletasksview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/client.js 100755 → 100644
File mode changed.
View
29 ec2ui/content/ec2ui/controller.js 100755 → 100644
@@ -2811,5 +2811,34 @@ var ec2ui_controller = {
if (objResponse.callback) {
objResponse.callback(list);
}
+ },
+
+ createNetworkInterface : function (vpcId, subnetId, privateIpAddress, description, groupNames, callback) {
+ var params = [['SubnetId', subnetId]];
+
+ if (privateIpAddress) {
+ params.push(['PrivateIpAddress', privateIpAddress]);
+ }
+
+ if (description) {
+ params.push(['Description', description]);
+ }
+
+ var groupNameIds = ec2ui_model.getSecurityGroupNameIds(vpcId);
+
+ for(var i = 0; i < groupNames.length; i++) {
+ var name = groupNames[i];
+ var groupId = groupNameIds[name];
+ if (!groupId) { continue; }
+ params.push(["SecurityGroupId."+(i+1), groupId]);
+ }
+
+ ec2_httpclient.queryEC2("CreateNetworkInterface", params, this, true, "onCompleteCreateNetworkInterface", callback);
+ },
+
+ onCompleteCreateNetworkInterface : function (objResponse) {
+ if (objResponse.callback) {
+ objResponse.callback();
+ }
}
};
View
0 ec2ui/content/ec2ui/copyS3dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/createImageDialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/create_customer_gateway_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/create_dhcp_options_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/create_subnet_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/create_vpn_connection_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/create_vpn_gateway_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/createsecgroupdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/createvpcdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/credential_manager.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/credentialsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/customergatewaysview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/deleteamidialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dhcpoptionsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_about.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_allocate_address.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_allocate_address.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_ami_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_associate_dhcp_options.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_attach_ebs_volume.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_attach_vpn_gateway.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_bundle_instance.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_bundle_task_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_console_output.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_copy_S3_keys.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_customer_gateway.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_dhcp_options.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_image.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_security_group.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_subnet.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_vpc.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_vpn_connection.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_create_vpn_gateway.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_delete_ami.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_disable_lbazone.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_eip_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_instance_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_instance_type.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_keypair_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_manage_accountids.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_manage_credentials.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_manage_endpoints.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_manage_tools.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_migrate_ami.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_new_attachment.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_new_instances.xul 100755 → 100644
File mode changed.
View
76 ec2ui/content/ec2ui/dialog_new_interface.js
@@ -0,0 +1,76 @@
+var ec2_DialogNewInterface = {
+ ec2ui_session : null,
+ subnets : null,
+
+ refreshSecurityGroup: function() {
+ var subnetList = document.getElementById('ec2ui.newinterface.subnetids');
+ var subnet = this.subnets[subnetList.selectedIndex];
+
+ var groupList = document.getElementById('ec2ui.newinterface.securitygroup.list');
+
+ for (var i = groupList.itemCount - 1; i >= 0; i--) {
+ groupList.removeItemAt(i);
+ }
+
+ var groupNameIds = this.ec2ui_session.model.getSecurityGroupNameIds(subnet.vpcId);
+ var i = 0, defidx = 0;
+
+ for (var name in groupNameIds) {
+ if (name == 'default') {
+ defidx = i;
+ }
+
+ groupList.appendItem(name, name);
+ i++;
+ }
+
+ groupList.selectedIndex = defidx;
+
+ return true;
+ },
+
+ onLoad : function() {
+ this.ec2ui_session = window.arguments[0];
+
+ this.subnets = this.ec2ui_session.model.getSubnets();
+ var subnetList = document.getElementById('ec2ui.newinterface.subnetids');
+
+ for (var i = 0; i < this.subnets.length; i++) {
+ var label = this.subnets[i].cidr + " (" + this.subnets[i].id + " / " + this.subnets[i].vpcId + ")";
+ subnetList.appendItem(label, this.subnets[i].id);
+ }
+
+ subnetList.selectedIndex = 0;
+
+ return true
+ },
+
+ doOK: function() {
+ var groupList = document.getElementById('ec2ui.newinterface.securitygroup.list');
+
+ if (groupList.selectedItems.length == 0) {
+ alert('Please choose one or more security groups.');
+ return false;
+ }
+
+ var groups = [];
+
+ for (var i = 0; i < groupList.selectedItems.length; i++) {
+ var selected = groupList.selectedItems[i];
+ groups.push(selected.value);
+ }
+
+ var subnetList = document.getElementById('ec2ui.newinterface.subnetids');
+ var privateipaddress = (document.getElementById('ec2ui.newinterface.privateipaddress').value || '').trim();
+ var description = (document.getElementById('ec2ui.newinterface.description').value || '').trim();
+
+ var returnValue = window.arguments[1];
+ returnValue.accepted = true;
+ returnValue.subnet = this.subnets[subnetList.selectedIndex];
+ returnValue.privateipaddress = privateipaddress;
+ returnValue.description = description;
+ returnValue.groups = groups;
+
+ return true;
+ }
+}
View
38 ec2ui/content/ec2ui/dialog_new_interface.xul
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE window SYSTEM "chrome://ec2ui/locale/ec2ui.dtd">
+
+<dialog id="ec2ui.dialog.newinterface" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ buttons="accept,cancel" ondialogaccept="return ec2_DialogNewInterface.doOK();" ondialogcancel="return true;"
+ onload="ec2_DialogNewInterface.onLoad();" title="Create new interface">
+
+ <script type="application/x-javascript" src="chrome://ec2ui/content/dialog_new_interface.js" />
+
+ <vbox flex="1">
+ <grid flex="1">
+ <columns>
+ <column />
+ <column />
+ </columns>
+ <rows>
+ <row>
+ <label control="ec2ui.newinterface.subnetids" value="Subnet:" />
+ <menulist id="ec2ui.newinterface.subnetids" onselect="ec2_DialogNewInterface.refreshSecurityGroup()" />
+ </row>
+ <row>
+ <label control="ec2ui.newinterface.privateipaddress" value="PrivateIpAddress:" />
+ <textbox id="ec2ui.newinterface.privateipaddress" size="40" value="" />
+ </row>
+ <row>
+ <label control="ec2ui.newinterface.description" value="Description:" />
+ <textbox id="ec2ui.newinterface.description" size="40" value="" />
+ </row>
+ </rows>
+ </grid>
+ <groupbox flex="1" id="ec2ui.newinterface.securitygroup.box">
+ <caption label="Security Group" />
+ <label id="ec2ui.newinterface.securitygroup.label" control="ec2ui.newinterface.securitygroup.list" />
+ <listbox id="ec2ui.newinterface.securitygroup.list" seltype="multiple" flex="1" />
+ </groupbox>
+ </vbox>
+</dialog>
View
0 ec2ui/content/ec2ui/dialog_new_permission.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_new_volume.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_offering_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_permission_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_purchase_offering.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_register_image.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_reserved_instances_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_retry_cancel.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_security_group.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_security_group.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_securitygroup_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_select_eip.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_snapshot_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_summary.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_volume_details.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/dialog_vpnconnection_customer_config.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/ec2ui.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/ec2ui_main_window.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/eip_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/eipdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/eipview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/endpoint_manager.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/endpointsview.js 100755 → 100644
File mode changed.
View
4 ec2ui/content/ec2ui/eni_tab_overlay.xul
@@ -20,6 +20,10 @@
onkeypress="ec2ui_ENITreeView.searchChanged(event);" />
<toolbarbutton image="images/refresh.png" oncommand="ec2ui_ENITreeView.refresh()"
tooltiptext="&ec2ui.refresh.tip;" />
+ <toolbarbutton image="images/createinterface.png"
+ style="-moz-box-orient:horizontal;-moz-box-pack:center;"
+ oncommand="ec2ui_ENITreeView.createNetworkInterface()"
+ tooltiptext="Create network interface" />
</hbox>
</toolbar>
<tree enableColumnDrag="true" id="ec2ui.eni.view" flex="1">
View
29 ec2ui/content/ec2ui/eniview.js
@@ -65,6 +65,35 @@ var ec2ui_ENITreeView = {
return this.networkInterfaceList[index];
},
+ createNetworkInterface : function() {
+ var subnets = ec2ui_session.model.getSubnets();
+
+ if (!subnets) {
+ return;
+ }
+
+ if (subnets.length == 0) {
+ alert('Please create one or more subnets.');
+ return;
+ }
+
+ var returnValue = {accepted:false, result:null};
+
+ openDialog('chrome://ec2ui/content/dialog_new_interface.xul',
+ null,
+ 'chrome,centerscreen,modal,width=400,height=250',
+ ec2ui_session,
+ returnValue);
+
+ if (returnValue.accepted) {
+ var me = this;
+
+ ec2ui_session.controller.createNetworkInterface(returnValue.subnet.vpcId, returnValue.subnet.id, returnValue.privateipaddress, returnValue.description, returnValue.groups, function() {
+ me.refresh();
+ });
+ }
+ },
+
register: function() {
if (!this.registered) {
this.registered = true;
View
0 ec2ui/content/ec2ui/images/about.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/accountids.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/addlaunchperm.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/alloc.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/assoc.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/attach.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/authorize.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/cash.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/create_security_group.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createcgw.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createdhcpoptions.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN ec2ui/content/ec2ui/images/createinterface.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createkey.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createsnap.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createsubnet.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createvol.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createvolfromsnap.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createvpc.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createvpnconn.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/createvpngw.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/credentials.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/delete.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/delete_security_group.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/deregisterami.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/detach.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 ec2ui/content/ec2ui/images/disassoc.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/get_console_output.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/get_customer_config.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/info.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/left.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/makeamipublic.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/powerdown.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/powerup.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/reboot.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/refresh.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/regions.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/registerami.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/release.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/removelaunchperm.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/resetlaunchperms.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/revoke.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/right.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/ssh.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/start.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/stop.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images/tools.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/content/ec2ui/images_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/img.htm 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/instanceconsoledialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/instancedetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/instances_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/instancesummary.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/instancesview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/io.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/jsbn.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/jsbn2.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/keypairdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/keypairs_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/keypairview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/leaseofferingsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/leases_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/migrateAMIDialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/model.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/newattachmentdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/newimagedialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/newinstancesdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/newpermissionauthorizer.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/newvolumedialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/offeringdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/permissiondetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/permissionsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/preferences.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/purchaseofferingdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/reservedinstancesdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/reservedinstancesview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/rsa.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/rsa2.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/rsahelper.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/scheduledevents.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/scheduledevents_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/security_groups_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/securitygroupdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/securitygroupsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/selecteipdialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/session.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/sha1.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/snapshotdetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/snapshotsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/strftime.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/subnetsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/tools_manager.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/utils.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/volumedetaildialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/volumes_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/volumesview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpcs_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpcsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpnattachmentsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpnconnection_customer_config_dialog.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpnconnectionsview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpngatewaysview.js 100755 → 100644
File mode changed.
View
0 ec2ui/content/ec2ui/vpns_tab_overlay.xul 100755 → 100644
File mode changed.
View
0 ec2ui/locale/ec2ui/en-US/ec2ui.dtd 100755 → 100644
File mode changed.
View
0 ec2ui/locale/ec2ui/en-US/ec2ui.properties 100755 → 100644
File mode changed.
View
0 ec2ui/skin/classic/ec2ui/button.png 100755 → 100644
Diff not rendered.
View
0 ec2ui/skin/classic/ec2ui/ec2ui.css 100755 → 100644
File mode changed.

0 comments on commit 1683ab1

Please sign in to comment.
Something went wrong with that request. Please try again.