diff options
author | Sean Smith <ssmith@iol.unh.edu> | 2021-04-07 15:16:29 -0400 |
---|---|---|
committer | Sean Smith <ssmith@iol.unh.edu> | 2021-04-07 15:39:39 -0400 |
commit | 4f12ae24d0de22f526d6dd59dbc437bdaa1874f1 (patch) | |
tree | d64ab79bc351e98b135cdc6ffc7674a1ce6335aa | |
parent | e9ed42e7ace16f36532a23d360300bb7f6b0387e (diff) |
Check if hostname null in resource filter
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Change-Id: Ie28c83109faf529f0a3bd4c61b1f96e064c1577c
-rw-r--r-- | src/static/js/dashboard.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/static/js/dashboard.js b/src/static/js/dashboard.js index 9bd20ef..85a337b 100644 --- a/src/static/js/dashboard.js +++ b/src/static/js/dashboard.js @@ -418,7 +418,7 @@ class MultipleSelectFilterWidget { cnt += required_resources[resource]; } - if (cnt > 1) { + if (cnt > 1 && hostname && image) { hostname.readOnly = true; image.disabled = true; } @@ -435,8 +435,11 @@ class MultipleSelectFilterWidget { this.available_resources[resource] += required_resources[resource]; } - hostname.readOnly = false; - image.disabled = false; + if (hostname && image) { + hostname.readOnly = false; + image.disabled = false; + } + this.updateAvailibility(); } |