mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/database): use template_usage_stats in *ByTemplate insights queries (#12668)
This PR updates the `*ByTempalte` insights queries used for generating Prometheus metrics to behave the same way as the new rollup query and re-written insights queries that utilize the rolled up data.
This commit is contained in:
@@ -3280,7 +3280,7 @@ func (q *FakeQuerier) GetTemplateAppInsightsByTemplate(ctx context.Context, arg
|
||||
for _, usageKey := range usageKeys {
|
||||
r := database.GetTemplateAppInsightsByTemplateRow{
|
||||
TemplateID: usageKey.TemplateID,
|
||||
DisplayName: sql.NullString{String: usageKey.DisplayName, Valid: true},
|
||||
DisplayName: usageKey.DisplayName,
|
||||
SlugOrPort: usageKey.Slug,
|
||||
}
|
||||
for _, mUserUsage := range usageByTemplateAppUser[usageKey] {
|
||||
|
||||
Reference in New Issue
Block a user