aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/booking
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-03-17 12:52:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-03-17 12:52:21 +0000
commit287a9e199abf29c4872390e4ff15db5f87382e20 (patch)
tree01948e75db2eb3c398de4ae9d266fc6c60da59e9 /src/templates/base/booking
parentc8998d426cbf12afb2d2e68059e0969388b50c95 (diff)
parente90f13e0413594d95e50256b1206ffd64217f2da (diff)
Merge "Quick Deploy Fixes." into resource
Diffstat (limited to 'src/templates/base/booking')
-rw-r--r--src/templates/base/booking/quick_deploy.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/templates/base/booking/quick_deploy.html b/src/templates/base/booking/quick_deploy.html
index 8570f25..d737b7d 100644
--- a/src/templates/base/booking/quick_deploy.html
+++ b/src/templates/base/booking/quick_deploy.html
@@ -77,17 +77,21 @@
var sup_image_dict = {{image_filter | safe}};
var sup_installer_dict = {{installer_filter | safe}};
var sup_scenario_dict = {{scenario_filter | safe}};
+ var resource_profile_map = {{resource_profile_map | safe}};
function imageFilter() {
var drop = document.getElementById("id_image");
var lab_pk = get_selected_value("lab");
- var host_pk = get_selected_value("host");
+ var host_pk = get_selected_value("resource");
for (const childNode of drop.childNodes) {
var image_object = sup_image_dict[childNode.value];
if (image_object) //weed out empty option
{
- childNode.disabled = !(image_object.host_profile == host_pk && image_object.lab == lab_pk);
+ const img_at_lab = image_object.lab == lab_pk;
+ const profiles = resource_profile_map[host_pk];
+ const img_in_template = profiles && profiles.indexOf(image_object.host_profile) > -1
+ childNode.disabled = !img_at_lab || !img_in_template;
}
}
}