feat: Add icon to templates (#3561)

This commit is contained in:
Bruno Quaresma
2022-08-19 13:17:35 +00:00
committed by GitHub
parent 57f3410009
commit 80f042f01b
17 changed files with 66 additions and 12 deletions
+3
View File
@@ -15,6 +15,7 @@ func templateEdit() *cobra.Command {
var (
name string
description string
icon string
maxTTL time.Duration
minAutostartInterval time.Duration
)
@@ -41,6 +42,7 @@ func templateEdit() *cobra.Command {
req := codersdk.UpdateTemplateMeta{
Name: name,
Description: description,
Icon: icon,
MaxTTLMillis: maxTTL.Milliseconds(),
MinAutostartIntervalMillis: minAutostartInterval.Milliseconds(),
}
@@ -56,6 +58,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().StringVarP(&icon, "icon", "", "", "Edit the template icon path")
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")
cliui.AllowSkipPrompt(cmd)