diff --git a/cmd/templaterender/render.go b/cmd/templaterender/render.go index 472f809..9544edc 100644 --- a/cmd/templaterender/render.go +++ b/cmd/templaterender/render.go @@ -56,7 +56,7 @@ func main() { Id: "myid", SshKeys: []string{"a", "b"}, ErrorMessages: []string{}, - RemoteShells: map[string]bool{templates2.POWERSHELL: true}, + RemoteShells: map[templates2.Shell]bool{templates2.POWERSHELL: true}, LocalShells: nil, } shellUsage := func() templ.Component { diff --git a/pkg/server/templates/constants.go b/pkg/server/templates/constants.go index 3decb2f..f5f63a7 100644 --- a/pkg/server/templates/constants.go +++ b/pkg/server/templates/constants.go @@ -1,13 +1,21 @@ package templates -const BASH = "*.sh" -const CMD = "cmd" -const POWERSHELL = "powershell" +type Shell string -const CURL = "curl" -const WGET = "wget" +const ( + BASH Shell = "bash" + CMD Shell = "cmd" + POWERSHELL Shell = "powershell" +) -var DOWNLOAD_COMMAND = map[string]string{ +type DownloadMethod string + +const ( + CURL DownloadMethod = "curl" + WGET DownloadMethod = "wget" +) + +var DOWNLOAD_COMMAND = map[DownloadMethod]string{ CURL: "curl -o", WGET: "wget -O", } diff --git a/pkg/server/templates/usage.templ b/pkg/server/templates/usage.templ index e87042f..8c87de9 100644 --- a/pkg/server/templates/usage.templ +++ b/pkg/server/templates/usage.templ @@ -206,9 +206,9 @@ templ Usage(access models.ConvergeAccess) { agent environment - - - + + + @@ -221,8 +221,8 @@ templ Usage(access models.ConvergeAccess) { - - + + @@ -241,7 +241,7 @@ templ Usage(access models.ConvergeAccess) {