aboutsummaryrefslogtreecommitdiffstats
path: root/src/static/js/dashboard.js
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2021-04-07 15:20:07 +0000
committerGerrit Code Review <gerrit@opnfv.org>2021-04-07 15:20:07 +0000
commit593ea6dc98ab12c1e70d65b16103f92f8b17abbc (patch)
treee3acf0991d160bf5dbee59ccc7b648bd7a2629a5 /src/static/js/dashboard.js
parent241ff304980c8bf542fdd1a2a47f73accf912ee1 (diff)
parent2271036232bce7ce4f2136ee6e031e9e77d9c1c2 (diff)
Merge "Restrict image on multi-node booking"
Diffstat (limited to 'src/static/js/dashboard.js')
-rw-r--r--src/static/js/dashboard.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/static/js/dashboard.js b/src/static/js/dashboard.js
index dfbb157..6395df0 100644
--- a/src/static/js/dashboard.js
+++ b/src/static/js/dashboard.js
@@ -409,6 +409,7 @@ class MultipleSelectFilterWidget {
reserveResource(node){
const required_resources = JSON.parse(node['required_resources']);
let hostname = document.getElementById('id_hostname');
+ let image = document.getElementById('id_image');
let cnt = 0
@@ -417,8 +418,10 @@ class MultipleSelectFilterWidget {
cnt += required_resources[resource];
}
- if (cnt > 1)
+ if (cnt > 1) {
hostname.readOnly = true;
+ image.disabled = true;
+ }
this.updateAvailibility();
}
@@ -426,12 +429,14 @@ class MultipleSelectFilterWidget {
releaseResource(node){
const required_resources = JSON.parse(node['required_resources']);
let hostname = document.getElementById('id_hostname');
+ let image = document.getElementById('id_image');
for(let resource in required_resources){
this.available_resources[resource] += required_resources[resource];
}
hostname.readOnly = false;
+ image.readOnly = false;
this.updateAvailibility();
}