You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2014/12/01 14:47:43 UTC
git commit: updated refs/heads/master to ce2b2a1
Repository: cloudstack
Updated Branches:
refs/heads/master c3515c9ff -> ce2b2a1fc
Deploy vm to specified host through Infrastructure -> Hosts -> <Select one> -> View Instances -> Add Instance
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ce2b2a1f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ce2b2a1f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ce2b2a1f
Branch: refs/heads/master
Commit: ce2b2a1fc7c4b018bde11385c25b5a41333b2312
Parents: c3515c9
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Mon Dec 1 14:47:06 2014 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Mon Dec 1 14:47:06 2014 +0100
----------------------------------------------------------------------
ui/scripts/instanceWizard.js | 8 +++++++-
ui/scripts/instances.js | 3 +++
ui/scripts/sharedFunctions.js | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce2b2a1f/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 0baad4f..2a02ad5 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -947,7 +947,13 @@
keyboard : keyboard
});
}
-
+
+ if (g_hostid != null) {
+ $.extend(deployVmData, {
+ hostid : g_hostid
+ });
+ }
+
$(window).trigger('cloudStack.deployVirtualMachine', {
deployVmData: deployVmData,
formData: args.data
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce2b2a1f/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 5312e90..5d431b1 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -328,9 +328,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/ce2b2a1f/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index b148ded..2d1977e 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -21,6 +21,7 @@ var g_username = null;
var g_userid = 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;