Skip to content

Show only running workspaces #3655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ammario opened this issue Aug 24, 2022 · 4 comments · Fixed by #4157
Closed

Show only running workspaces #3655

ammario opened this issue Aug 24, 2022 · 4 comments · Fixed by #4157
Assignees
Milestone

Comments

@ammario
Copy link
Member

ammario commented Aug 24, 2022

As the cloud budget holder and admin, I want to quickly find all running workspaces to see if any should be shut down.

Screen Shot 2022-08-23 at 11 43 28 PM

I naturally reach for a filter.
image

@BrunoQuaresma
Copy link
Collaborator

Some thoughts:

  • We can make it in the FE only
  • I think making this in the BE can be tricky since the status is not a "well computed" value, and we are doing that in the FE. To make this happen in the BE, we should refactor the BE to compute the status and after, use it to filter the workspaces. Not sure how this could happen with the DB.

@ammario ammario added this to the EE milestone Sep 7, 2022
@presleyp presleyp self-assigned this Sep 21, 2022
@presleyp
Copy link
Contributor

presleyp commented Sep 21, 2022

@f0ssel this is where we translate from api values to workspace status (and then there's another translation to the actual wording used in various places, so like the status started displays as Running) https://github.com/coder/coder/blob/main/site/src/util/workspace.ts#L55

If we move this logic (transition + job status -> workspace status, that is; we can handle display labels on the frontend) to the backend, then adding a filter for running workspaces will be simple on the frontend.

Alternatively, if there is some way for the frontend to send a query that the backend can already understand (like transition=start&status=succeeded or something), that's also okay for the frontend.

@f0ssel
Copy link
Contributor

f0ssel commented Sep 21, 2022

Sounds good, I'll see what looks easier, will probably ping @coadler for some heavy lifting on the DB side.

@ammario
Copy link
Member Author

ammario commented Sep 22, 2022

Some thoughts:

  • We can make it in the FE only
  • I think making this in the BE can be tricky since the status is not a "well computed" value, and we are doing that in the FE. To make this happen in the BE, we should refactor the BE to compute the status and after, use it to filter the workspaces. Not sure how this could happen with the DB.

I think we need to approach these search and filtering features as backend ones, as they're most relevant to larger deployments where our current one-page solution presents poorly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants