1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #4177: Fix VM scheduler requirements (#4183)

This commit is contained in:
Sergio Betanzos 2020-02-12 18:34:46 +01:00 committed by GitHub
parent 0047b0cc96
commit 6e21acba9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -614,19 +614,23 @@ define(function(require) {
function generateRequirements(hosts_table, ds_table, context, id) {
var req_string = [];
var req_ds_string = [];
var selected_hosts = hosts_table.retrieveResourceTableSelect();
var selected_ds = ds_table.retrieveResourceTableSelect();
$.each(selected_hosts, function(index, hostId) {
req_string.push("ID=\"" + hostId + "\"");
});
if (hosts_table) {
var selected_hosts = hosts_table.retrieveResourceTableSelect();
$.each(selected_hosts, function(index, hostId) {
req_string.push("ID=\"" + hostId + "\"");
});
}
if (ds_table) {
var selected_ds = ds_table.retrieveResourceTableSelect();
$.each(selected_ds, function(index, dsId) {
req_ds_string.push("ID=\"" + dsId + "\"");
});
$.each(selected_ds, function(index, dsId) {
req_ds_string.push("ID=\"" + dsId + "\"");
});
}
$("#SCHED_REQUIREMENTS" + id, context).val(req_string.join(" | "));
$("#SCHED_DS_REQUIREMENTS" + id, context).val(req_ds_string.join(" | "));
}
});