Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

feat: Remove autostart ed notice #319

Merged
merged 1 commit into from
Apr 19, 2021
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: Remove autostart ed notice
  • Loading branch information
greyscaled committed Apr 19, 2021
commit 56ae92cc91c564d54e1d2e24d6c595a6e9bc9bdf
22 changes: 0 additions & 22 deletions internal/cmd/envs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"cdr.dev/coder-cli/coder-sdk"
"cdr.dev/coder-cli/internal/coderutil"
"cdr.dev/coder-cli/internal/config"
"cdr.dev/coder-cli/internal/x/xcobra"
"cdr.dev/coder-cli/pkg/clog"
"cdr.dev/coder-cli/pkg/tablewriter"
Expand Down Expand Up @@ -184,9 +183,6 @@ func createEnvCmd() *cobra.Command {
Example: `# create a new environment using default resource amounts
coder envs create my-new-env --image ubuntu
coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ubuntu`,
PreRun: func(cmd *cobra.Command, args []string) {
autoStartInfo()
},
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
if img == "" {
Expand Down Expand Up @@ -440,9 +436,6 @@ func editEnvCmd() *cobra.Command {
Example: `coder envs edit back-end-env --cpu 4

coder envs edit back-end-env --disk 20`,
PreRun: func(cmd *cobra.Command, args []string) {
autoStartInfo()
},
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
client, err := newClient(ctx)
Expand Down Expand Up @@ -684,18 +677,3 @@ func buildUpdateReq(ctx context.Context, client coder.Client, conf updateConf) (
}
return &updateReq, nil
}

// TODO (Grey): Remove education in a future non-patch release.
func autoStartInfo() {
var preferencesURI string

accessURI, err := config.URL.Read()
if err != nil {
// Error is fairly benign in this case, fallback to relative URI
preferencesURI = "/preferences"
} else {
preferencesURI = fmt.Sprintf("%s%s", accessURI, "/preferences?tab=autostart")
}

clog.LogInfo("⚡NEW: Automate daily environment startup", "Visit "+preferencesURI+" to configure your preferred time")
}
3 changes: 0 additions & 3 deletions internal/cmd/rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ func rebuildEnvCommand() *cobra.Command {
Args: xcobra.ExactArgs(1),
Example: `coder envs rebuild front-end-env --follow
coder envs rebuild backend-env --force`,
PreRun: func(cmd *cobra.Command, args []string) {
autoStartInfo()
},
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
client, err := newClient(ctx)
Expand Down