mirror of
https://github.com/coder/coder.git
synced 2026-11-13 14:51:24 +08:00
* refactor: isWorkspaceOn utility Summary: A utility is function is added that answers the question if a workspace is on. Impact: This is a shared piece of logic in workspace scheduling presentations. In particular it unblocks work in 1779, or at least allows an implementation that shares details with the WorkspaceScheduleBanner. Notes: We could possibly instead return whether the workspace is "ON", "UNKNOWN", or "OFF". Maybe a future improvement for that could be made as the neds arrises. * fix: derive running ws stop time from deadline Summary: When a workspace is on, the remaining time until shutdown needs to be derived from the deadline timestamp, not implied from the TTL