Skip to content

feat(site): display user status history as an indication of license usage #16020

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
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ensure we use the same time zone as the start_time param
  • Loading branch information
SasSwart committed Jan 3, 2025
commit 737e63ef96e1f8fe8a841648161b410563fa55fd
4 changes: 2 additions & 2 deletions coderd/database/queries/insights.sql
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,11 @@ GROUP BY utp.num, utp.template_ids, utp.name, utp.type, utp.display_name, utp.de

-- name: GetUserStatusChanges :many
WITH dates AS (
SELECT generate_series(
SELECT (generate_series(
date_trunc('day', @start_time::timestamptz),
date_trunc('day', @end_time::timestamptz),
'1 day'::interval
)::timestamptz AS date
) AT TIME ZONE (extract(timezone FROM @start_time::timestamptz)::text || ' minutes'))::timestamptz AS date
),
latest_status_before_range AS (
-- Get the last status change for each user before our date range
Expand Down