Skip to content

Add Active sessions.#322

Merged
Sean-Der merged 9 commits intoGlimesh:mainfrom
IIamaseconds:main
May 31, 2025
Merged

Add Active sessions.#322
Sean-Der merged 9 commits intoGlimesh:mainfrom
IIamaseconds:main

Conversation

@IIamaseconds
Copy link
Copy Markdown
Collaborator

Adding this shows all active session on a server.
Could be adjusted to have an environment variable to toggle it to be on or off.

@Sean-Der
Copy link
Copy Markdown
Collaborator

This is fantastic @IIamaseconds !

@Sean-Der
Copy link
Copy Markdown
Collaborator

Would it be possible to make it distinguish between

  • /api/status isn't available or returns an error (do not show the list at all)
  • /api/status is available, but empty (like you have today, say no streams available)
  • /api/status is available, and has streams (like you do today)

Lots of people turn off the status api, so want to not irritate them with UI that isn't useful. Great PR thank you :)

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

Good idea. I will look into a way to toggle it through the env variables later! :-)

@Sean-Der
Copy link
Copy Markdown
Collaborator

What do you think having streams be null | []?

Have it default to null and only set to an array when the status API succeeds

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

Hey @Sean-Der !
I made some updates to the PR.

Backend:

  • The StatusHandler method now returns 503 when the feature is disabled

Frontend:

  • Moved Available Stream to it's own component.
  • Set default value of Streams to 'undefined', to use before first call or in case of disabled service.
  • Handle status code that is not 'Ok' by setting Streams to 'undefined'.
  • Handle status code 503 from backend by setting Streams to 'undefined'.
  • Whenever status code is not 'Ok' or is 503, the component will not render.

Hope this is sufficient, and that the change to the backend is fine. :-)

@Sean-Der Sean-Der merged commit de7e6cc into Glimesh:main May 31, 2025
2 checks passed
@Sean-Der
Copy link
Copy Markdown
Collaborator

This is amazing. Merged and any other ideas you have would love to see :)

Any interest in helping me maintain and merge PRs/review issues?

@IIamaseconds
Copy link
Copy Markdown
Collaborator Author

If I get the time I could try and rewrite the frontend to typescript if you would like that? I can send a PR once ready. And if you could help test or review it, that would be nice! :-)

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 this pull request may close these issues.

2 participants