Don't show agents over quota in the Workspace agent dropdown
MR: Pending
Description
In #426512 (closed) we implemented limits on workspaces imposed at a per-agent level. By enforcing these limits, we put the user in a position to encounter errors during the creation of their workspace.
If the total number of workspaces currently running on an agent has reached the quota, or I have reached my per_user quota, I can't create a workspace on that agent.
It's important to note that I may have access to multiple agents, so we can't resolve this by preventing access to the New workspace
view entirely.
Current experience
Validation doesn't occur until after the user tries to create a workspace, at which point we display an error.
Proposal A
Hide or otherwise prevent agents that can't accept new workspace from the current user from the dropdown in the UI.
Proposal B
Allow a user to select any properly configured agent, but perform the validation before the form has been submitted. Disable the button and display a clear error message that indicates why the user can't create one at this point.
Acceptance Criteria
-
TBD
Design Requirements
Impact Assessment
TODO: Fill out or delete [Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole.]
User Story
TODO: Fill out or delete [Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality.]