From 666bdd5ce20028e579d1d93064f3b0a816ccc595 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 24 Jun 2013 18:28:15 +0200 Subject: [PATCH] Fix name actions in Sunstone batch action --- .../public/js/apptools-appflow-services.js | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/flow/sunstone/public/js/apptools-appflow-services.js b/flow/sunstone/public/js/apptools-appflow-services.js index d57d26b10b..1ab1072591 100644 --- a/flow/sunstone/public/js/apptools-appflow-services.js +++ b/flow/sunstone/public/js/apptools-appflow-services.js @@ -134,24 +134,17 @@ var Role = { generate_batch_action_params(), Role.path); }, - "restart" : function(params){ + "boot" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "restart", + "boot", generate_batch_action_params(), Role.path); }, - "reset" : function(params){ + "delete_recreate" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "reset", - generate_batch_action_params(), - Role.path); - }, - "resubmit" : function(params){ - OpenNebula.Action.simple_action(params, - Role.resource, - "resubmit", + "delete-recreate", generate_batch_action_params(), Role.path); }, @@ -162,6 +155,13 @@ var Role = { generate_batch_action_params(), Role.path); }, + "reboot_hard" : function(params){ + OpenNebula.Action.simple_action(params, + Role.resource, + "reboot-hard", + generate_batch_action_params(), + Role.path); + }, "poweroff" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, @@ -172,7 +172,7 @@ var Role = { "poweroff_hard" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "poweroff_hard", + "poweroff-hard", generate_batch_action_params(), Role.path); }, @@ -186,14 +186,14 @@ var Role = { "undeploy_hard" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "undeploy_hard", + "undeploy-hard", generate_batch_action_params(), Role.path); }, "snapshot_create" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "snapshot_create", + "snapshot-create", generate_batch_action_params(), Role.path); }, @@ -207,7 +207,7 @@ var Role = { "cancel" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, - "cancel", + "shutdown-hard", generate_batch_action_params(), Role.path); }, @@ -313,7 +313,7 @@ var role_actions = { "Role.boot" : { type: "multiple", - call: Role.restart, + call: Role.boot, callback: roleCallback, elements: roleElements, error: onError, @@ -322,7 +322,7 @@ var role_actions = { "Role.reboot_hard" : { type: "multiple", - call: Role.reset, + call: Role.reboot_hard, callback: roleCallback, elements: roleElements, error: onError, @@ -331,7 +331,7 @@ var role_actions = { "Role.delete_recreate" : { type: "multiple", - call: Role.resubmit, + call: Role.delete_recreate, callback: roleCallback, elements: roleElements, error: onError, @@ -508,36 +508,36 @@ var role_buttons = { }, "Role.undeploy" : { type: "action", - text: tr("Undeploy Off"), + text: tr("Undeploy"), layout: "vmsstop_buttons", tip: tr("Shuts down the given VM. The VM is saved in the system Datastore.") }, "Role.undeploy_hard" : { type: "action", - text: tr("Undeploy Off") + ' hard', + text: tr("Undeploy") + ' hard', layout: "vmsstop_buttons", tip: tr("Shuts down the given VM. The VM is saved in the system Datastore.") }, "Role.shutdown" : { - type: "confirm", + type: "action", text: tr("Shutdown"), layout: "vmsdelete_buttons", tip: tr("This will initiate the shutdown process in the selected VMs") }, "Role.shutdown_hard" : { - type: "confirm", + type: "action", text: tr("Shutdown") + ' hard', layout: "vmsdelete_buttons", tip: tr("This will initiate the shutdown-hard (forced) process in the selected VMs") }, "Role.delete" : { - type: "confirm", + type: "action", text: tr("Delete"), layout: "vmsdelete_buttons", tip: tr("This will delete the selected VMs from the database") }, "Role.delete_recreate" : { - type: "confirm", + type: "action", text: tr("Delete") + ' recreate', layout: "vmsrepeat_buttons", tip: tr("This will delete and recreate VMs to PENDING state") @@ -975,6 +975,9 @@ function updateServiceInfo(request,elem){ setupScaleDialog(); + $('tbody input.check_item',servicerolesDataTable).die(); + $('tbody tr',servicerolesDataTable).die(); + initCheckAllBoxes(servicerolesDataTable); tableCheckboxesListener(servicerolesDataTable);