mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat(coderd/database): use template_usage_stats
in GetTemplateInsights
query (#12666)
This PR updates the `GetTemplateInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
This commit is contained in:
committed by
GitHub
parent
f34592f45d
commit
35d08434a9
@ -18,9 +18,7 @@
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
|
@ -18,9 +18,7 @@
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
|
@ -12,8 +12,7 @@
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "Visual Studio Code",
|
||||
@ -23,9 +22,7 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
@ -35,8 +32,6 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"type": "builtin",
|
||||
|
@ -12,8 +12,7 @@
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "Visual Studio Code",
|
||||
@ -23,9 +22,7 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
@ -35,8 +32,6 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"type": "builtin",
|
||||
|
@ -28,9 +28,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
@ -30,9 +30,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
@ -18,9 +18,7 @@
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
@ -28,9 +26,7 @@
|
||||
"seconds": 0
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
@ -8,9 +8,7 @@
|
||||
"active_users": 1,
|
||||
"apps_usage": [
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Visual Studio Code",
|
||||
"slug": "vscode",
|
||||
@ -18,9 +16,7 @@
|
||||
"seconds": 0
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
|
@ -12,8 +12,7 @@
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "Visual Studio Code",
|
||||
@ -23,9 +22,7 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
@ -35,8 +32,6 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"type": "builtin",
|
||||
|
@ -28,9 +28,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
@ -12,8 +12,7 @@
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "Visual Studio Code",
|
||||
@ -23,9 +22,7 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
@ -35,8 +32,6 @@
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001",
|
||||
"00000000-0000-0000-0000-000000000002",
|
||||
"00000000-0000-0000-0000-000000000003"
|
||||
],
|
||||
"type": "builtin",
|
||||
|
Reference in New Issue
Block a user