Skip to content

Commit

Permalink
Add comma separation in stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
ddworken committed Oct 3, 2022
1 parent a85315d commit 9d95b4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ func usageStatsHandler(w http.ResponseWriter, r *http.Request) {
COUNT(DISTINCT devices.device_id) as num_devices,
SUM(usage_data.num_entries_handled) as num_history_entries,
MAX(usage_data.last_used) as last_active,
COALESCE(STRING_AGG(DISTINCT usage_data.last_ip, ' ') FILTER (WHERE usage_data.last_ip != 'Unknown'), 'Unknown') as ip_addresses,
COALESCE(STRING_AGG(DISTINCT usage_data.last_ip, ', ') FILTER (WHERE usage_data.last_ip != 'Unknown'), 'Unknown') as ip_addresses,
COALESCE(SUM(usage_data.num_queries), 0) as num_queries,
COALESCE(MAX(usage_data.last_queried), 'January 1, 1970') as last_queried,
STRING_AGG(DISTINCT usage_data.version, ' ') as versions
STRING_AGG(DISTINCT usage_data.version, ', ') as versions
FROM devices
INNER JOIN usage_data ON devices.device_id = usage_data.device_id
GROUP BY devices.user_id
Expand Down

0 comments on commit 9d95b4c

Please sign in to comment.