You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2013/02/22 15:01:11 UTC
[32/58] [abbrv] git commit: refs/heads/qemu-img - Remove old list
view actions
Remove old list view actions
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fa14380a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fa14380a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fa14380a
Branch: refs/heads/qemu-img
Commit: fa14380ac94e5f72d34243709a4121bc37882274
Parents: 1ac86e9
Author: Brian Federle <br...@citrix.com>
Authored: Thu Feb 21 15:21:31 2013 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Feb 21 15:21:31 2013 -0800
----------------------------------------------------------------------
ui/scripts/instances.js | 209 ------------------------------------------
1 files changed, 0 insertions(+), 209 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fa14380a/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 76ca693..046962c 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -135,215 +135,6 @@
tagValue: { label: 'Tag Value' }
},
- // List view actions
- actions: {
- // Add instance wizard
- add: {
- label: 'label.vm.add',
-
- action: {
- custom: cloudStack.uiCustom.instanceWizard(cloudStack.instanceWizard)
- },
-
- messages: {
- notification: function(args) {
- return 'label.vm.add';
- }
- },
- notification: {
- poll: pollAsyncJobResult
- }
- },
- start: {
- label: 'label.action.start.instance' ,
- action: function(args) {
- $.ajax({
- url: createURL("startVirtualMachine&id=" + args.context.instances[0].id),
- dataType: "json",
- async: true,
- success: function(json) {
- var jid = json.startvirtualmachineresponse.jobid;
- args.response.success(
- {_custom:
- {jobId: jid,
- getUpdatedItem: function(json) {
- return json.queryasyncjobresultresponse.jobresult.virtualmachine;
- },
- getActionFilter: function() {
- return vmActionfilter;
- }
- }
- }
- );
- }
- });
- },
- messages: {
- confirm: function(args) {
- return 'message.action.start.instance';
- },
- notification: function(args) {
- return 'label.action.start.instance';
- },
- complete: function(args) {
- if(args.password != null) {
- alert('Password of the VM is ' + args.password);
- }
- return 'label.action.start.instance';
- }
- },
- notification: {
- poll: pollAsyncJobResult
- }
- },
- stop: {
- label: 'label.action.stop.instance',
- addRow: 'false',
- createForm: {
- title: 'label.action.stop.instance',
- desc: 'message.action.stop.instance',
- fields: {
- forced: {
- label: 'force.stop',
- isBoolean: true,
- isChecked: false
- }
- }
- },
- action: function(args) {
- var array1 = [];
- array1.push("&forced=" + (args.data.forced == "on"));
- $.ajax({
- url: createURL("stopVirtualMachine&id=" + args.context.instances[0].id + array1.join("")),
- dataType: "json",
- async: true,
- success: function(json) {
- var jid = json.stopvirtualmachineresponse.jobid;
- args.response.success(
- {_custom:
- {jobId: jid,
- getUpdatedItem: function(json) {
- return json.queryasyncjobresultresponse.jobresult.virtualmachine;
- },
- getActionFilter: function() {
- return vmActionfilter;
- }
- }
- }
- );
- }
- });
- },
- messages: {
- confirm: function(args) {
- return 'message.action.stop.instance';
- },
-
- notification: function(args) {
- return 'label.action.stop.instance';
- }
- },
- notification: {
- poll: pollAsyncJobResult
- }
- },
- restart: {
- label: 'instances.actions.reboot.label',
- action: function(args) {
- $.ajax({
- url: createURL("rebootVirtualMachine&id=" + args.context.instances[0].id),
- dataType: "json",
- async: true,
- success: function(json) {
- var jid = json.rebootvirtualmachineresponse.jobid;
- args.response.success(
- {_custom:
- {jobId: jid,
- getUpdatedItem: function(json) {
- return json.queryasyncjobresultresponse.jobresult.virtualmachine;
- },
- getActionFilter: function() {
- return vmActionfilter;
- }
- }
- }
- );
- }
- });
- },
- messages: {
- confirm: function(args) {
- return 'message.action.reboot.instance';
- },
- notification: function(args) {
- return 'instances.actions.reboot.label';
- }
- },
- notification: {
- poll: pollAsyncJobResult
- }
- },
-
- destroy: {
- label: 'label.action.destroy.instance',
- messages: {
- confirm: function(args) {
- return 'message.action.destroy.instance';
- },
- notification: function(args) {
- return 'label.action.destroy.instance';
- }
- },
- action: function(args) {
- $.ajax({
- url: createURL("destroyVirtualMachine&id=" + args.context.instances[0].id),
- dataType: "json",
- async: true,
- success: function(json) {
- var jid = json.destroyvirtualmachineresponse.jobid;
- args.response.success(
- {_custom:
- {jobId: jid,
- getUpdatedItem: function(json) {
- return json.queryasyncjobresultresponse.jobresult.virtualmachine;
- },
- getActionFilter: function() {
- return vmActionfilter;
- }
- }
- }
- );
- }
- });
- },
- notification: {
- poll: pollAsyncJobResult
- }
- },
- restore: {
- label: 'label.action.restore.instance',
- messages: {
- confirm: function(args) {
- return 'message.action.restore.instance';
- },
- notification: function(args) {
- return 'label.action.restore.instance';
- }
- },
- action: function(args) {
- $.ajax({
- url: createURL("recoverVirtualMachine&id=" + args.context.instances[0].id),
- dataType: "json",
- async: true,
- success: function(json) {
- var item = json.recovervirtualmachineresponse.virtualmachine;
- args.response.success({data:item});
- }
- });
- }
- }
- },
-
dataProvider: function(args) {
var data = {};
listViewDataProvider(args, data);