Skip to content

Commit

Permalink
node eligibilty taken into consideration when clients list filtered t…
Browse files Browse the repository at this point in the history
…o 'ready'
  • Loading branch information
philrenaud committed Sep 28, 2023
1 parent 8590876 commit 4cae2fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/app/controllers/clients/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4cae2fd

Please sign in to comment.