diff --git a/flow/sunstone/public/js/apptools-appflow-services.js b/flow/sunstone/public/js/apptools-appflow-services.js index 3d02fd4db9..d3f6fb7860 100644 --- a/flow/sunstone/public/js/apptools-appflow-services.js +++ b/flow/sunstone/public/js/apptools-appflow-services.js @@ -103,105 +103,105 @@ var Role = { OpenNebula.Action.simple_action(params, Service.resource, "hold", - null, + generate_batch_action_params(), Role.path); }, "release" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "release", - null, + generate_batch_action_params(), Role.path); }, "suspend" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "suspend", - null, + generate_batch_action_params(), Role.path); }, "resume" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "resume", - null, + generate_batch_action_params(), Role.path); }, "stop" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "stop", - null, + generate_batch_action_params(), Role.path); }, "restart" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "restart", - null, + generate_batch_action_params(), Role.path); }, "reset" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "reset", - null, + generate_batch_action_params(), Role.path); }, "resubmit" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "resubmit", - null, + generate_batch_action_params(), Role.path); }, "reboot" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "reboot", - null, + generate_batch_action_params(), Role.path); }, "poweroff" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "poweroff", - null, + generate_batch_action_params(), Role.path); }, "poweroff_hard" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "poweroff_hard", - null, + generate_batch_action_params(), Role.path); }, "snapshot_create" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "snapshot_create", - null, + generate_batch_action_params(), Role.path); }, "shutdown" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "shutdown", - null, + generate_batch_action_params(), Role.path); }, "cancel" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "cancel", - null, + generate_batch_action_params(), Role.path); }, "del" : function(params){ OpenNebula.Action.simple_action(params, Role.resource, "delete", - null, + generate_batch_action_params(), Role.path); }, "recover" : function(params){ @@ -213,6 +213,14 @@ var Role = { }, } +var generate_batch_action_params = function(){ + var action_obj = { + "period" : $("#batch_action_period").val(), + "number" : $("#batch_action_number").val()}; + + return action_obj; +} + var role_actions = { "Role.hold" : { type: "multiple", @@ -374,7 +382,7 @@ var role_buttons = { type: "action", text: tr("Hold"), tip: tr("This will hold selected pending VMs from being deployed"), - layout: "vmsplanification_buttons", + layout: "vmsplanification_buttons" }, "Role.release" : { type: "action", @@ -505,7 +513,6 @@ var service_tab_content = '\ \ '; - var dataTable_services; var service_actions = { @@ -613,16 +620,14 @@ var service_buttons = { text: tr("Change owner"), select: users_sel, tip: tr("Select the new owner")+":", - layout: "user_select", - condition: mustBeAdmin + layout: "user_select" }, "Service.chgrp" : { type: "confirm_with_select", text: tr("Change group"), select: groups_sel, tip: tr("Select the new group")+":", - layout: "user_select", - condition: mustBeAdmin + layout: "user_select" }, "Service.shutdown" : { type: "action", @@ -771,11 +776,32 @@ function updateServiceInfo(request,elem){ title : "Roles", content : '