diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index c27822cf95..a4bb7a1d34 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -244,12 +244,20 @@ var vm_actions = { {data:obj, success: function (req) { Sunstone.runAction("VM.show", - req.request.data[0]); + req.request.data[0][0]); }, error: onError }); } }, - + + "VM.saveas_disks" : { + type: "single", + call: OpenNebula.VM.show, + callback: saveasDisksCallback, + error: onError, + notify: false + }, + "VM.shutdown" : { type: "multiple", call: OpenNebula.VM.shutdown, @@ -689,10 +697,10 @@ function setupSaveasDialog(){
'); @@ -711,7 +719,7 @@ function setupSaveasDialog(){ var id = $('#vm_id',this).text(); var disk_id = $('#vm_disk_id',this).val(); var image_name = $('#image_name',this).val(); - var type = $('#image_type',this).val(); + //var type = $('#image_type',this).val(); if (!id.length || !disk_id.length || !image_name.length) { notifyError("Skipping VM "+id+ @@ -721,8 +729,8 @@ function setupSaveasDialog(){ var obj = { vm_id: id, disk_id : disk_id, - image_name : image_name, - type: type + image_name : image_name + //type: type }; args.push(id); Sunstone.runAction("VM.saveas",obj); @@ -755,35 +763,68 @@ function popUpSaveasDialog(elems){