Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add total users insight#15486

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
BrunoQuaresma wants to merge23 commits intomainfrombq/add-registered-users-endpoint
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
23 commits
Select commitHold shift + click to select a range
a20be9f
feat: add registered users insights
BrunoQuaresmaNov 12, 2024
4e43cc0
Merge branch 'main' of https://github.com/coder/coder into bq/add-reg…
BrunoQuaresmaNov 12, 2024
24baca9
Add tests
BrunoQuaresmaNov 12, 2024
da5f1b8
Fix make gen
BrunoQuaresmaNov 12, 2024
e77cf67
Fix query
BrunoQuaresmaNov 13, 2024
7cd2d86
Fix in memory repro
BrunoQuaresmaNov 13, 2024
442c75a
Fix policy
BrunoQuaresmaNov 13, 2024
bcf91f9
Fix roles test
BrunoQuaresmaNov 13, 2024
70e66a8
Fix dbauthz test
BrunoQuaresmaNov 13, 2024
3da408e
Fix dbauthz test 2
BrunoQuaresmaNov 13, 2024
639777f
Fix return at dbauthz
BrunoQuaresmaNov 13, 2024
520790d
Fix args
BrunoQuaresmaNov 13, 2024
c011a05
Gen golden files
BrunoQuaresmaNov 13, 2024
eaac6c1
Merge branch 'main' of https://github.com/coder/coder into bq/add-reg…
BrunoQuaresmaNov 14, 2024
0e94c74
Pass the zone into the query
BrunoQuaresmaNov 14, 2024
186a951
Fix tests
BrunoQuaresmaNov 14, 2024
d340e2d
Use offset instead of zone
BrunoQuaresmaNov 14, 2024
82b6c36
Fix offset to str
BrunoQuaresmaNov 14, 2024
81c8038
Merge branch 'main' of https://github.com/coder/coder into bq/add-reg…
BrunoQuaresmaNov 22, 2024
fac0c68
Fix tests with expected value correctly
BrunoQuaresmaNov 22, 2024
9ba203c
Remove GetAccumulatedUsersInsights for now
SasSwartNov 26, 2024
a85e3f9
Merge remote-tracking branch 'origin/main' into bq/add-registered-use…
SasSwartNov 26, 2024
6fb880c
Remove temporarily defunct sdk functions
SasSwartNov 26, 2024
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
3,097 changes: 1,549 additions & 1,548 deletionscoderd/database/dbmock/dbmock.go
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletioncoderd/database/models.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

2 changes: 1 addition & 1 deletioncoderd/database/querier.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

2 changes: 1 addition & 1 deletioncoderd/database/queries.sql.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

4 changes: 2 additions & 2 deletionscoderd/insights_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1212,7 +1212,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
},
},
{
name: "twodays ago, no data",
name: "twodates ago, no data",
ignoreTimes: true,
makeRequest: func(_ []*testTemplate) codersdk.TemplateInsightsRequest {
twoDaysAgo := time.Now().UTC().Truncate(24*time.Hour).AddDate(0, 0, -2)
Expand DownExpand Up@@ -2110,7 +2110,7 @@ func TestTemplateInsights_BadRequest(t *testing.T) {
EndTime: today,
Interval: codersdk.InsightsReportIntervalWeek,
})
assert.Error(t, err, "last report interval must have at least 6days")
assert.Error(t, err, "last report interval must have at least 6dates")

_, err = client.TemplateInsights(ctx, codersdk.TemplateInsightsRequest{
StartTime: today.AddDate(0, 0, -1),
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
{
"report": {
"start_time": "0001-01-01T00:00:00Z",
"end_time": "0001-01-01T00:00:00Z",
"template_ids": [],
"active_users": 0,
"apps_usage": [
{
"template_ids": [],
"type": "builtin",
"display_name": "Visual Studio Code",
"slug": "vscode",
"icon": "/icon/code.svg",
"seconds": 0,
"times_used": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "JetBrains",
"slug": "jetbrains",
"icon": "/icon/intellij.svg",
"seconds": 0,
"times_used": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "Web Terminal",
"slug": "reconnecting-pty",
"icon": "/icon/terminal.svg",
"seconds": 0,
"times_used": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SSH",
"slug": "ssh",
"icon": "/icon/terminal.svg",
"seconds": 0,
"times_used": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0,
"times_used": 0
}
],
"parameters_usage": []
}
}
2 changes: 2 additions & 0 deletionscoderd/workspaces.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -517,6 +517,8 @@ func createWorkspace(
// Update audit log's organization
auditReq.UpdateOrganizationID(template.OrganizationID)

// TODO (SasSwart): api.Authorize below is already done above. This seems redundant.
// Should we remove this?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yep, that does look redundant. Let's remove it in a separate PR.

// Do this upfront to save work. If this fails, the rest of the work
// would be wasted.
if !api.Authorize(r, policy.ActionCreate,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp