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 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:
+1
-3
@@ -18,9 +18,7 @@
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
|
||||
+1
-3
@@ -18,9 +18,7 @@
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000002"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "JetBrains",
|
||||
"slug": "jetbrains",
|
||||
|
||||
Vendored
+2
-7
@@ -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",
|
||||
|
||||
Vendored
+2
-7
@@ -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",
|
||||
|
||||
Vendored
+1
-3
@@ -28,9 +28,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
||||
+1
-3
@@ -30,9 +30,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
||||
Vendored
+2
-6
@@ -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",
|
||||
|
||||
Vendored
+2
-6
@@ -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",
|
||||
|
||||
+2
-7
@@ -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",
|
||||
|
||||
+1
-3
@@ -28,9 +28,7 @@
|
||||
"seconds": 120
|
||||
},
|
||||
{
|
||||
"template_ids": [
|
||||
"00000000-0000-0000-0000-000000000001"
|
||||
],
|
||||
"template_ids": [],
|
||||
"type": "builtin",
|
||||
"display_name": "Web Terminal",
|
||||
"slug": "reconnecting-pty",
|
||||
|
||||
+2
-7
@@ -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