Repository: cloudstack Updated Branches: refs/heads/4.3 f6aff77b8 -> ec823db47
[UI] deploy vm to specified host in Infrastructure->Hosts page Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c3cbb797 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c3cbb797 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c3cbb797 Branch: refs/heads/4.3 Commit: c3cbb7972e16deca975723960e53cb78a0651b83 Parents: f6aff77 Author: Wei Zhou <[email protected]> Authored: Thu Jul 3 10:47:34 2014 +0200 Committer: Wei Zhou <[email protected]> Committed: Thu Jul 3 11:20:16 2014 +0200 ---------------------------------------------------------------------- ui/scripts/instanceWizard.js | 3 +++ ui/scripts/instances.js | 3 +++ ui/scripts/sharedFunctions.js | 1 + 3 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3cbb797/ui/scripts/instanceWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index 4a740c6..4708866 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -813,6 +813,9 @@ }); } + if (g_hostid != null) + array1.push("&hostid=" + g_hostid); + $.ajax({ url: createURL('deployVirtualMachine'), data: deployVmData, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3cbb797/ui/scripts/instances.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 896b535..dd33672 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -308,9 +308,12 @@ } if ("hosts" in args.context) { + g_hostid = args.context.hosts[0].id; $.extend(data, { hostid: args.context.hosts[0].id }); + } else { + g_hostid = null; } if ("affinityGroups" in args.context) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3cbb797/ui/scripts/sharedFunctions.js ---------------------------------------------------------------------- diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 9fa70e3..86a4a92 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -20,6 +20,7 @@ var g_role = null; // roles - root, domain-admin, ro-admin, user var g_username = null; var g_account = null; var g_domainid = null; +var g_hostid = null; var g_loginCmdText = null; var g_enableLogging = false; var g_timezoneoffset = null;
