From 7c2b8ec6b6e868c9f1a0e5b3e093b3cae14dfb7c Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 30 Nov 2023 14:40:20 +0800 Subject: [PATCH] Add create timestamp output for show alias (#219) /kind improvement Signed-off-by: Congqi Xia --- states/etcd/show/alias.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/states/etcd/show/alias.go b/states/etcd/show/alias.go index 0d760ce..7a9e2c3 100644 --- a/states/etcd/show/alias.go +++ b/states/etcd/show/alias.go @@ -10,6 +10,7 @@ import ( "github.com/milvus-io/birdwatcher/models" "github.com/milvus-io/birdwatcher/states/etcd/common" etcdversion "github.com/milvus-io/birdwatcher/states/etcd/version" + "github.com/milvus-io/birdwatcher/utils" "github.com/samber/lo" ) @@ -53,5 +54,6 @@ func (rs *Aliases) PrintAs(format framework.Format) string { } func (rs *Aliases) PrintAlias(sb *strings.Builder, a *models.Alias) { - fmt.Printf("Collection ID: %d\tAlias Name: %s\tState: %s\n", a.CollectionID, a.Name, a.State.String()) + t, _ := utils.ParseTS(a.CreateTS) + fmt.Printf("Collection ID: %d\tAlias Name: %s\tState: %s\tCreateTimestamp: %v\n", a.CollectionID, a.Name, a.State.String(), t) }