From 4f12ae24d0de22f526d6dd59dbc437bdaa1874f1 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Wed, 7 Apr 2021 15:16:29 -0400 Subject: Check if hostname null in resource filter Signed-off-by: Sean Smith Change-Id: Ie28c83109faf529f0a3bd4c61b1f96e064c1577c --- src/static/js/dashboard.js | 9 ++++++--- 1 file 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(); } -- cgit 1.2.3-korg