From bb41de4caaa9f2e07e6e61830e420de82740287c Mon Sep 17 00:00:00 2001 From: Hanshal Mehta <122217807+hanshal101@users.noreply.github.com> Date: Tue, 19 Nov 2024 04:42:17 +0530 Subject: [PATCH] feat: add the date and time field to the search gui Signed-off-by: hanshal101 <122217807+hanshal101@users.noreply.github.com> --- cmd/search/versionList.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/search/versionList.go b/cmd/search/versionList.go index 8fafe41f..ac399167 100644 --- a/cmd/search/versionList.go +++ b/cmd/search/versionList.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "strings" + "time" "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/list" @@ -36,6 +37,7 @@ func convFPR2Rows(versions *buildsafev1.FetchPackagesResponse) []table.Row { pkg.SpdxId, free, pkg.Homepage, + time.Unix(int64(pkg.EpochSeconds), 0).Format("2006-01-02 15"), }) } return items @@ -50,6 +52,7 @@ func initVersionTable(searchList list.Model, versions *buildsafev1.FetchPackages {Title: "License", Width: frameWidth / cols}, {Title: "Free", Width: frameWidth / cols}, {Title: "Homepage", Width: frameWidth * 2 / cols}, + {Title: "Date", Width: frameWidth / cols}, } rows := convFPR2Rows(versions)