You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/26 21:29:01 UTC
[2/2] git commit: updated refs/heads/ui-add-remove-nics to ae79d78
Add remove NIC API calls
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ae79d782
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae79d782
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae79d782
Branch: refs/heads/ui-add-remove-nics
Commit: ae79d782ec56c5bf9b5697850d627b66acf1b9ba
Parents: 9544d04
Author: Brian Federle <br...@citrix.com>
Authored: Fri Apr 26 10:48:25 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Apr 26 10:48:25 2013 -0700
----------------------------------------------------------------------
.../WEB-INF/classes/resources/messages.properties | 2 +
ui/dictionary.jsp | 2 +
ui/scripts/instances.js | 21 +++++++++++---
3 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae79d782/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index ad8f42b..32f5946 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+label.action.delete.nic=Remove NIC
+message.action.delete.nic=Please confirm that want to remove this NIC, which will also remove the associated network from the VM.
label.add.affinity.group=Add new affinity group
message.delete.affinity.group=Please confirm that you would like to remove this affinity group.
label.delete.affinity.group=Delete Affinity Group
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae79d782/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index 1880be5..47ba794 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,8 @@ under the License.
<% long now = System.currentTimeMillis(); %>
<script language="javascript">
dictionary = {
+'label.action.delete.nic': '<fmt:message key="label.action.delete.nic"/>',
+'message.action.delete.nic': '<fmt:message key="message.action.delete.nic"/>',
'label.add.affinity.group': '<fmt:message key="label.add.affinity.group"/>',
'message.delete.affinity.group': '<fmt:message key="message.delete.affinity.group"/>',
'label.delete.affinity.group': '<fmt:message key="label.delete.affinity.group"/>',
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae79d782/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 64f9fb2..f30e8d3 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1492,20 +1492,31 @@
// Remove NIC/Network from VM
destroy: {
- label: 'label.action.delete.network',
+ label: 'label.action.delete.nic',
messages: {
confirm: function(args) {
- return 'message.action.delete.network';
+ return 'message.action.delete.nic';
},
notification: function(args) {
- return 'label.action.delete.network';
+ return 'label.action.delete.nic';
}
},
action: function(args) {
- args.response.success();
+ $.ajax({
+ url: createURL('removeNicFromVirtualMachine'),
+ data: {
+ virtualmachineid: args.context.instances[0].id,
+ nicid: args.context.nics.id
+ },
+ success: function(json) {
+ args.response.success({
+ _custom: { jobId: json.removenicfromvirtualmachineresponse.jobid }
+ })
+ }
+ });
},
notification: {
- poll: function(args) { args.complete(); }
+ poll: pollAsyncJobResult
}
}
},