aboutsummaryrefslogtreecommitdiffstats
path: root/src/static/js/dashboard.js
diff options
context:
space:
mode:
authorSean Smith <ssmith@iol.unh.edu>2021-02-24 12:18:45 -0500
committerSean Smith <ssmith@iol.unh.edu>2021-03-23 18:09:39 -0400
commite817c3203fde0ca9bfb66a00919050cbdd1179e8 (patch)
tree2c1d08b7371c5245b407a334cc44e1490e674a65 /src/static/js/dashboard.js
parentdb4c2dc4c4f0d86e0a00e8409eed74a0bcffb20b (diff)
Front end fixes for enforcing hostname
Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: I0a077307a2e1bcfef5b31acdaf4ecb73be64fff9
Diffstat (limited to 'src/static/js/dashboard.js')
-rw-r--r--src/static/js/dashboard.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/static/js/dashboard.js b/src/static/js/dashboard.js
index efc0542..12d8ee6 100644
--- a/src/static/js/dashboard.js
+++ b/src/static/js/dashboard.js
@@ -388,21 +388,30 @@ class MultipleSelectFilterWidget {
reserveResource(node){
const required_resources = JSON.parse(node['required_resources']);
+ let hostname = document.getElementById('id_hostname');
+ let cnt = 0
+
for(let resource in required_resources){
this.available_resources[resource] -= required_resources[resource];
+ cnt += required_resources[resource];
}
+ if (cnt > 1)
+ hostname.readOnly = true;
+
this.updateAvailibility();
}
releaseResource(node){
const required_resources = JSON.parse(node['required_resources']);
+ let hostname = document.getElementById('id_hostname');
for(let resource in required_resources){
this.available_resources[resource] += required_resources[resource];
}
+ hostname.readOnly = false;
this.updateAvailibility();
}