feat: allow configuring display apps from template (#9100)

This commit is contained in:
Jon Ayers
2023-08-30 14:53:42 -05:00
committed by GitHub
parent 9c9d035354
commit ee24260614
68 changed files with 1975 additions and 564 deletions
+14
View File
@@ -4,6 +4,8 @@ import (
_ "embed"
"fmt"
"strings"
"github.com/coder/coder/v2/provisionersdk/proto"
)
var (
@@ -50,3 +52,15 @@ func AgentScriptEnv() map[string]string {
}
return env
}
// DefaultDisplayApps returns the default display applications to enable
// if none are specified in a template.
func DefaultDisplayApps() *proto.DisplayApps {
return &proto.DisplayApps{
Vscode: true,
VscodeInsiders: false,
WebTerminal: true,
PortForwardingHelper: true,
SshHelper: true,
}
}
+451 -334
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -119,6 +119,7 @@ message Agent {
int32 shutdown_script_timeout_seconds = 17;
repeated Metadata metadata = 18;
string startup_script_behavior = 19;
DisplayApps display_apps = 20;
}
enum AppSharingLevel {
@@ -127,6 +128,14 @@ enum AppSharingLevel {
PUBLIC = 2;
}
message DisplayApps {
bool vscode = 1;
bool vscode_insiders = 2;
bool web_terminal = 3;
bool ssh_helper = 4;
bool port_forwarding_helper = 5;
}
// App represents a dev-accessible application on the workspace.
message App {
// slug is the unique identifier for the app, usually the name from the