admin-analytics: add "site.users" "lastActivePeriod" query filter
Created by: erzhtor
Follow-up https://github.com/sourcegraph/sourcegraph/issues/39820.
Test plan
sg start
- Open API console http://localhost:3080/api/console
fragment SiteUsersFragment on SiteUsers {
totalCount
nodes {
id
username
email
createdAt
lastActiveAt
deletedAt
siteAdmin
eventsCount
}
}
{
site {
# last active today
activeTodayUsers: users(lastActivePeriod: TODAY) {
... SiteUsersFragment
}
# last active this week
activeThisWeekUsers: users(lastActivePeriod: THIS_WEEK) {
... SiteUsersFragment
}
# last active this month
activeThisMonthUsers: users(lastActivePeriod: THIS_MONTH) {
... SiteUsersFragment
}
# all time
allUsers: users {
... SiteUsersFragment
}
}
}