Skip to content

feat(coderd): add sftp to insights apps #12675

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
feat(coderd): WIP: add sftp to apps
  • Loading branch information
mafredri committed Mar 19, 2024
commit e720b91e371e0ec0c15a5dd8b49e17bbb6dd483b
8 changes: 8 additions & 0 deletions coderd/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ func convertTemplateInsightsApps(usage database.GetTemplateInsightsRow, appUsage
Icon: "/icon/terminal.svg",
Seconds: usage.UsageSshSeconds,
},
{
TemplateIDs: usage.SftpTemplateIds,
Type: codersdk.TemplateAppsTypeBuiltin,
DisplayName: codersdk.TemplateBuiltinAppDisplayNameSFTP,
Slug: "sftp",
Icon: "/icon/terminal.svg",
Seconds: usage.UsageSftpSeconds,
},
}

// Use a stable sort, similarly to how we would sort in the query, note that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
"icon": "/icon/terminal.svg",
"seconds": 10800
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000002"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
"icon": "/icon/terminal.svg",
"seconds": 10800
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000002"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
"icon": "/icon/terminal.svg",
"seconds": 11520
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
"icon": "/icon/terminal.svg",
"seconds": 11520
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
"icon": "/icon/terminal.svg",
"seconds": 7920
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
"icon": "/icon/terminal.svg",
"seconds": 4320
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
"icon": "/icon/terminal.svg",
"seconds": 3600
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000002"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
"icon": "/icon/terminal.svg",
"seconds": 3600
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000003"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
"icon": "/icon/terminal.svg",
"seconds": 15120
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
"icon": "/icon/terminal.svg",
"seconds": 7920
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
"icon": "/icon/terminal.svg",
"seconds": 15120
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [
"00000000-0000-0000-0000-000000000001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
"slug": "ssh",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
}
],
"parameters_usage": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
"slug": "ssh",
"icon": "/icon/terminal.svg",
"seconds": 0
},
{
"template_ids": [],
"type": "builtin",
"display_name": "SFTP",
"slug": "sftp",
"icon": "/icon/terminal.svg",
"seconds": 0
}
],
"parameters_usage": [
Expand Down
1 change: 1 addition & 0 deletions codersdk/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ const (
TemplateBuiltinAppDisplayNameJetBrains string = "JetBrains"
TemplateBuiltinAppDisplayNameWebTerminal string = "Web Terminal"
TemplateBuiltinAppDisplayNameSSH string = "SSH"
TemplateBuiltinAppDisplayNameSFTP string = "SFTP"
)

// TemplateAppUsage shows the usage of an app for one or more templates.
Expand Down