add scan duration label

This commit is contained in:
Jeff Carr 2024-02-20 14:45:09 -06:00
parent 24b13e7ea4
commit f3a30ed95b
6 changed files with 10 additions and 1 deletions

View File

@ -204,5 +204,6 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
grid.NextRow() grid.NextRow()
r.allrepos[path] = newRepo r.allrepos[path] = newRepo
newRepo.NewScan()
return nil, newRepo return nil, newRepo
} }

View File

@ -156,3 +156,7 @@ func (r *Repo) DeleteTag(t *repostatus.Tag) bool {
func (rl *RepoList) MirrorShownCount() *gui.Node { func (rl *RepoList) MirrorShownCount() *gui.Node {
return gui.RawMirror(rl.shownCount) return gui.RawMirror(rl.shownCount)
} }
func (rl *RepoList) MirrorScanDuration() *gui.Node {
return gui.RawMirror(rl.duration)
}

View File

@ -42,6 +42,7 @@ func (r *RepoList) ScanRepositories() (int, string) {
tmp := strconv.Itoa(shown) + " repos shown" tmp := strconv.Itoa(shown) + " repos shown"
log.Info("Setting shownCount to", tmp) log.Info("Setting shownCount to", tmp)
me.shownCount.SetText(tmp) me.shownCount.SetText(tmp)
me.duration.SetText(s)
log.Info("Scanned", i, "repositories. todo: count/show changes in", s) log.Info("Scanned", i, "repositories. todo: count/show changes in", s)
return i, s return i, s
@ -54,7 +55,7 @@ func (r *Repo) NewScan() bool {
} }
// run the repostatus update // run the repostatus update
r.Status.UpdateNew() r.Status.Update()
// print out whatever changes have happened // print out whatever changes have happened
if c, ok := r.Status.Changed(); ok { if c, ok := r.Status.Changed(); ok {

View File

@ -33,6 +33,7 @@ type RepoList struct {
shownCount *gui.Node shownCount *gui.Node
hideFunction func(*Repo) hideFunction func(*Repo)
duration *gui.Node
} }
type Repo struct { type Repo struct {

View File

@ -30,5 +30,6 @@ func AutotypistView(parent *gui.Node) *RepoList {
me.blind = gui.RawBox() me.blind = gui.RawBox()
me.shownCount = me.blind.NewLabel("showCount") me.shownCount = me.blind.NewLabel("showCount")
me.duration = me.blind.NewLabel("duration")
return me return me
} }

View File

@ -29,5 +29,6 @@ func GuireleaserView(parent *gui.Node) *RepoList {
me.blind = gui.RawBox() me.blind = gui.RawBox()
me.shownCount = me.blind.NewLabel("showCount") me.shownCount = me.blind.NewLabel("showCount")
me.duration = me.blind.NewLabel("duration")
return me return me
} }