aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-04-14 18:15:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-04-14 18:15:55 +0000
commit6bf37e9864787e0398a1d2e1cdd10b40a8ebc6e6 (patch)
tree18396967cc32110ae5455827e612e2846e55392c /src/templates/base
parentd5b4f4c77534824430fd8e2d3f15e5f7ed6303f5 (diff)
parent557659acfd97ddaacdb89192ff6a575691b39093 (diff)
Merge "Add user + user list to API"
Diffstat (limited to 'src/templates/base')
-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 42148c8..ad9adf2 100644
--- a/src/templates/base/booking/quick_deploy.html
+++ b/src/templates/base/booking/quick_deploy.html
@@ -81,17 +81,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;
}
}
}