add scan duration label
This commit is contained in:
parent
24b13e7ea4
commit
f3a30ed95b
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
}
|
||||||
|
|
3
scan.go
3
scan.go
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue