From: Sean Smith Date: Wed, 7 Apr 2021 19:16:29 +0000 (-0400) Subject: Check if hostname null in resource filter X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F72357%2F2;p=laas.git Check if hostname null in resource filter Signed-off-by: Sean Smith Change-Id: Ie28c83109faf529f0a3bd4c61b1f96e064c1577c --- 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(); }