show target version in the stdout report
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9a1cc5839f
commit
44d221697f
13
human.go
13
human.go
|
@ -18,12 +18,16 @@ func (r *RepoRow) StandardHeader() string {
|
||||||
gitAge, _ := tag.GetDate()
|
gitAge, _ := tag.GetDate()
|
||||||
dur := time.Since(gitAge)
|
dur := time.Since(gitAge)
|
||||||
|
|
||||||
|
target := r.Status.GetTargetVersion()
|
||||||
master := r.Status.GetMasterVersion()
|
master := r.Status.GetMasterVersion()
|
||||||
devel := r.Status.GetDevelVersion()
|
devel := r.Status.GetDevelVersion()
|
||||||
user := r.Status.GetUserVersion()
|
user := r.Status.GetUserVersion()
|
||||||
|
|
||||||
header := fmt.Sprintf("%-35s %5s %-20s %-20s %-20s %-20s %-15s",
|
header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s",
|
||||||
r.Name(), shell.FormatDuration(dur), lastTag, master, devel, user, r.State())
|
r.Name(), shell.FormatDuration(dur),
|
||||||
|
lastTag, target,
|
||||||
|
master, devel, user,
|
||||||
|
r.State())
|
||||||
return header
|
return header
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,9 +40,10 @@ func msg(w http.ResponseWriter, s string) {
|
||||||
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
|
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
header := fmt.Sprintf("%-35s %5s %-20s %-20s %-20s %-20s %-15s",
|
header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s",
|
||||||
"REPO", "AGE",
|
"REPO", "AGE",
|
||||||
"LAST", "MASTER", "DEVEL", "USER",
|
"LAST", "TARGET",
|
||||||
|
"MASTER", "DEVEL", "USER",
|
||||||
"STATE")
|
"STATE")
|
||||||
msg(w, header)
|
msg(w, header)
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,9 @@ func (r *RepoList) selectUnmergedRepos() []*RepoRow {
|
||||||
if repo.State() == "PERFECT" {
|
if repo.State() == "PERFECT" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if repo.Status.Whitelist {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if repo.Status.IsReleased() {
|
if repo.Status.IsReleased() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@ type RepoList struct {
|
||||||
shownCount *gui.Node
|
shownCount *gui.Node
|
||||||
hideFunction func(*RepoRow)
|
hideFunction func(*RepoRow)
|
||||||
duration *gui.Node
|
duration *gui.Node
|
||||||
|
|
||||||
|
rows []*RepoRow
|
||||||
}
|
}
|
||||||
|
|
||||||
type RepoRow struct {
|
type RepoRow struct {
|
||||||
|
|
|
@ -32,6 +32,13 @@ func TempWindowView(parent *gui.Node) *RepoList {
|
||||||
return tmp
|
return tmp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *RepoList) ListRows() {
|
||||||
|
for i, row := range r.rows {
|
||||||
|
log.Warn("i, row:", i, row.Status.Name(), "curname", row.Status.GetCurrentBranchName())
|
||||||
|
row.currentName.SetLabel(row.Status.GetCurrentBranchName())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (r *RepoList) ShowRepo(repo *RepoRow) error {
|
func (r *RepoList) ShowRepo(repo *RepoRow) error {
|
||||||
// this is the gui grid. all the widgets get added here
|
// this is the gui grid. all the widgets get added here
|
||||||
// at the end we tell the grid go to NextRow()
|
// at the end we tell the grid go to NextRow()
|
||||||
|
@ -84,5 +91,6 @@ func (r *RepoList) ShowRepo(repo *RepoRow) error {
|
||||||
|
|
||||||
newRow.hidden = false
|
newRow.hidden = false
|
||||||
r.reposgrid.NextRow()
|
r.reposgrid.NextRow()
|
||||||
|
r.rows = append(r.rows, newRow)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue