Skip to content

Commit

Permalink
Fixed up some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
sadjamz committed Oct 20, 2021
1 parent 23567c1 commit c0f85bb
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions cli/cmd/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package status
import (
"errors"
"fmt"
"strconv"
"sync"

"helm.sh/helm/v3/pkg/release"
Expand Down Expand Up @@ -99,9 +100,6 @@ func (c *Command) Run(args []string) int {
if err != nil {
c.UI.Output(err.Error(), terminal.WithErrorStyle())
return 1
} else {
//c.UI.Output("Installation name: %s", releaseName, terminal.WithInfoStyle())
//c.UI.Output("Namespace: %s", namespace, terminal.WithInfoStyle())
}

if err := c.checkHelmInstallation(settings, uiLogger, releaseName, namespace); err != nil {
Expand Down Expand Up @@ -150,13 +148,7 @@ func (c *Command) checkHelmInstallation(settings *helmCLI.EnvSettings, uiLogger
return fmt.Errorf("couldn't check for installations: %s", err)
}

//c.UI.Output("Status: %s", rel.Info.Status, terminal.WithInfoStyle())
//c.UI.Output("Chart Version: %s", rel.Chart.Metadata.Version, terminal.WithInfoStyle())
//c.UI.Output("App Version: %s", rel.Chart.Metadata.AppVersion, terminal.WithInfoStyle())
//c.UI.Output("Revision: %d", rel.Version, terminal.WithInfoStyle())
//c.UI.Output("Last Updated: %v", rel.Info.LastDeployed, terminal.WithInfoStyle())

tbl := terminal.NewTable([]string{"Name", "Namespace", "Status", "ChartVersion", "AppVersion", "Revision"}...)
tbl := terminal.NewTable([]string{"Name", "Namespace", "Status", "ChartVersion", "AppVersion", "Revision", "Last Updated"}...)
trow := []terminal.TableEntry{
{
Value: releaseName,
Expand All @@ -174,15 +166,16 @@ func (c *Command) checkHelmInstallation(settings *helmCLI.EnvSettings, uiLogger
Value: rel.Chart.Metadata.AppVersion,
},
{
Value: string(rel.Version),
Value: strconv.Itoa(rel.Version),
},
{
Value: rel.Info.LastDeployed.Format("YYYY/MM/DD HH:MM:SS"),
},
}
tbl.Rows = [][]terminal.TableEntry{}
tbl.Rows = append(tbl.Rows, trow)

c.UI.Table(tbl)
fmt.Println()
c.UI.Output("Last Updated: %v", rel.Info.LastDeployed, terminal.WithInfoStyle())

valuesYaml, err := yaml.Marshal(rel.Config)
c.UI.Output("Config:", terminal.WithHeaderStyle())
Expand Down

0 comments on commit c0f85bb

Please sign in to comment.