From 4cae2fdfd138234bc711c6301397e3887e696544 Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Thu, 28 Sep 2023 11:19:03 -0400 Subject: [PATCH] node eligibilty taken into consideration when clients list filtered to 'ready' --- ui/app/controllers/clients/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/app/controllers/clients/index.js b/ui/app/controllers/clients/index.js index b7f38375f57..596a2357638 100644 --- a/ui/app/controllers/clients/index.js +++ b/ui/app/controllers/clients/index.js @@ -237,6 +237,14 @@ export default class IndexController extends Controller.extend( return false; } + // Our state dropdown here is an amalgamation of "Status", "Eligibility", + // and "Drain Status" in order to simplify filtering options. + // While technically an ineligible node may have a state of "ready", + // the user's intent when selecting "ready" is probably to see nodes + // that are eligible to run jobs. As such, we filter out ineligible nodes + // when the user selects "ready". + if (statuses?.includes('ready') && !node.get('isEligible')) return false; + if (onlyIneligible && node.get('isEligible')) return false; if (onlyDraining && !node.get('isDraining')) return false;