mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: allow configuring display apps from template (#9100)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+451
-334
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user