mirror of
https://github.com/zrepl/zrepl.git
synced 2025-05-18 15:50:44 +02:00
client/status: improve hiding of data if current state makes it obsolete
This commit is contained in:
parent
d584e1ac54
commit
a85abe8bae
@ -264,7 +264,8 @@ func (t *tui) renderReplicationReport(rep *replication.Report) {
|
|||||||
t.printf("Problem: %s", rep.Problem)
|
t.printf("Problem: %s", rep.Problem)
|
||||||
t.newline()
|
t.newline()
|
||||||
}
|
}
|
||||||
if rep.SleepUntil.After(time.Now()) {
|
if rep.SleepUntil.After(time.Now()) &&
|
||||||
|
state & ^(replication.ContextDone|replication.Completed) != 0 {
|
||||||
t.printf("Sleeping until %s (%s left)\n", rep.SleepUntil, rep.SleepUntil.Sub(time.Now()))
|
t.printf("Sleeping until %s (%s left)\n", rep.SleepUntil, rep.SleepUntil.Sub(time.Now()))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +339,10 @@ func (t *tui) renderPrunerReport(r *pruner.Report) {
|
|||||||
all = append(all, commonFS{&r.Completed[i], true})
|
all = append(all, commonFS{&r.Completed[i], true})
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.State == pruner.Plan.String() {
|
switch state {
|
||||||
|
case pruner.Plan: fallthrough
|
||||||
|
case pruner.PlanWait: fallthrough
|
||||||
|
case pruner.ErrPerm:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user