Skip to content

Commit c3cbb79

Browse files
committed
[UI] deploy vm to specified host in Infrastructure->Hosts page
1 parent f6aff77 commit c3cbb79

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎ui/scripts/instanceWizard.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,9 @@
813813
});
814814
}
815815

816+
if (g_hostid != null)
817+
array1.push("&hostid=" + g_hostid);
818+
816819
$.ajax({
817820
url: createURL('deployVirtualMachine'),
818821
data: deployVmData,

‎ui/scripts/instances.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,12 @@
308308
}
309309

310310
if ("hosts" in args.context) {
311+
g_hostid = args.context.hosts[0].id;
311312
$.extend(data, {
312313
hostid: args.context.hosts[0].id
313314
});
315+
} else {
316+
g_hostid = null;
314317
}
315318

316319
if ("affinityGroups" in args.context) {

‎ui/scripts/sharedFunctions.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var g_role = null; // roles - root, domain-admin, ro-admin, user
2020
var g_username = null;
2121
var g_account = null;
2222
var g_domainid = null;
23+
var g_hostid = null;
2324
var g_loginCmdText = null;
2425
var g_enableLogging = false;
2526
var g_timezoneoffset = null;

0 commit comments

Comments
 (0)