Permalink
Browse files

small fix

  • Loading branch information...
Genki Sugawara
Genki Sugawara committed Sep 2, 2012
1 parent ff89457 commit d14a0137fa593492cfb4e502c1796179fdd6554e
Showing with 13 additions and 4 deletions.
  1. +13 −4 ec2ui/content/ec2ui/eniview.js
@@ -315,12 +315,21 @@ var ec2ui_ENITreeView = {
}
}
- if (unassigns.length > 0) {
- ec2ui_session.controller.unassignPrivateIpAddresses(eni_id, unassigns);
+ var me = this;
+
+ var assignFunc = function() {
+ if (assigns.length > 0) {
+ ec2ui_session.controller.assignPrivateIpAddresses(eni_id, assigns, reassign);
+ }
+
+ me.refresh();
+ me.selectByNetworkInterfaceId(eni_id);
}
- if (assigns.length > 0) {
- ec2ui_session.controller.assignPrivateIpAddresses(eni_id, assigns, reassign);
+ if (unassigns.length > 0) {
+ ec2ui_session.controller.unassignPrivateIpAddresses(eni_id, unassigns, assignFunc);
+ } else {
+ assignFunc();
}
},

0 comments on commit d14a013

Please sign in to comment.