Deploy vm to specified host through Infrastructure -> Hosts -> <Select one> -> View Instances -> Add Instance

This commit is contained in:
Wei Zhou 2014-12-01 14:47:06 +01:00
parent c3515c9ff9
commit ce2b2a1fc7
3 changed files with 11 additions and 1 deletions

View File

@ -947,7 +947,13 @@
keyboard : keyboard
});
}
if (g_hostid != null) {
$.extend(deployVmData, {
hostid : g_hostid
});
}
$(window).trigger('cloudStack.deployVirtualMachine', {
deployVmData: deployVmData,
formData: args.data

View File

@ -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) {

View File

@ -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;