feat: Make template name editable (#3538)

This commit is contained in:
Bruno Quaresma
2022-08-17 19:04:00 +00:00
committed by GitHub
parent 4b646cc4fa
commit 546157b63e
9 changed files with 30 additions and 3 deletions
+3
View File
@@ -13,6 +13,7 @@ import (
func templateEdit() *cobra.Command {
var (
name string
description string
maxTTL time.Duration
minAutostartInterval time.Duration
@@ -38,6 +39,7 @@ func templateEdit() *cobra.Command {
// NOTE: coderd will ignore empty fields.
req := codersdk.UpdateTemplateMeta{
Name: name,
Description: description,
MaxTTLMillis: maxTTL.Milliseconds(),
MinAutostartIntervalMillis: minAutostartInterval.Milliseconds(),
@@ -52,6 +54,7 @@ func templateEdit() *cobra.Command {
},
}
cmd.Flags().StringVarP(&name, "name", "", "", "Edit the template name")
cmd.Flags().StringVarP(&description, "description", "", "", "Edit the template description")
cmd.Flags().DurationVarP(&maxTTL, "max-ttl", "", 0, "Edit the template maximum time before shutdown")
cmd.Flags().DurationVarP(&minAutostartInterval, "min-autostart-interval", "", 0, "Edit the template minimum autostart interval")