From 205ffdb792e6e49e0038bc282ed8e5304b81f389 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 6 Jan 2012 10:42:33 -0800 Subject: [PATCH] bug 12859: cloudstack 3.0 new UI - systemVM page - migrate action - fix a bug that passed an empty virtualMachineId to API. --- ui/scripts/system.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 266d12911ab..3dac1a6b061 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -1679,11 +1679,7 @@ } } }, - action: function(args) { - if(args.data.hostId == null) { - args.response.error("Host field is required"); - return; - } + action: function(args) { $.ajax({ url: createURL("migrateSystemVm&hostid=" + args.data.hostId + "&virtualmachineid=" + args.context.routers[0].id), dataType: "json", @@ -3586,13 +3582,9 @@ } } }, - action: function(args) { - if(args.data.hostId == null) { - args.response.error("Host field is required"); - return; - } + action: function(args) { $.ajax({ - url: createURL("migrateSystemVm&hostid=" + args.data.hostId + "&virtualmachineid=" + args.data.id), + url: createURL("migrateSystemVm&hostid=" + args.data.hostId + "&virtualmachineid=" + args.context.systemVMs[0].id), dataType: "json", async: true, success: function(json) {