add create time for helm search repo

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
pull/11326/head
cleverhu 2 years ago
parent d79ae9f927
commit 1df4596bb5

@ -25,6 +25,7 @@ import (
"os"
"path/filepath"
"strings"
"time"
"github.com/Masterminds/semver/v3"
"github.com/gosuri/uitable"
@ -219,9 +220,9 @@ func (r *repoSearchWriter) WriteTable(out io.Writer) error {
}
table := uitable.New()
table.MaxColWidth = r.columnWidth
table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION")
table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION", "CREATED")
for _, r := range r.results {
table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description)
table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description, r.Chart.Created.Format(time.RFC3339))
}
return output.EncodeTable(out, table)
}

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod 2018-07-09T11:34:37Z

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod 2018-06-27T10:00:18Z

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.3.0-rc.1 3.0.0 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.3.0-rc.1 3.0.0 Deploy a basic Alpine Linux pod 2020-11-12T08:44:58Z

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod 2018-07-09T11:34:37Z

@ -1,3 +1,3 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod 2018-07-09T11:34:37Z
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod 2018-06-27T10:00:18Z

@ -1,3 +1,3 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod 2018-07-09T11:34:37Z
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod 2018-06-27T10:00:18Z

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.2.0 2.3.4 Deploy a basic Alpine Linux pod 2018-07-09T11:34:37Z

@ -1,2 +1,2 @@
NAME CHART VERSION APP VERSION DESCRIPTION
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod
NAME CHART VERSION APP VERSION DESCRIPTION CREATED
testing/alpine 0.1.0 1.2.3 Deploy a basic Alpine Linux pod 2018-06-27T10:00:18Z

Loading…
Cancel
Save