mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 08:23:50 +01:00
status: user-visible replication step number should start at 1
fixes https://github.com/zrepl/zrepl/issues/538
This commit is contained in:
parent
ac147b5a6f
commit
b00b61e967
@ -227,9 +227,13 @@ func printFilesystemStatus(t *stringbuilder.B, rep *report.FilesystemReport, max
|
|||||||
sizeEstimationImpreciseNotice = " (step lacks size estimation)"
|
sizeEstimationImpreciseNotice = " (step lacks size estimation)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userVisisbleCurrentStep, userVisibleTotalSteps := rep.CurrentStep, len(rep.Steps)
|
||||||
|
if len(rep.Steps) > 0 {
|
||||||
|
userVisisbleCurrentStep = rep.CurrentStep + 1 // CurrentStep is an index that starts at 0
|
||||||
|
}
|
||||||
status := fmt.Sprintf("%s (step %d/%d, %s/%s)%s",
|
status := fmt.Sprintf("%s (step %d/%d, %s/%s)%s",
|
||||||
strings.ToUpper(string(rep.State)),
|
strings.ToUpper(string(rep.State)),
|
||||||
rep.CurrentStep, len(rep.Steps),
|
userVisisbleCurrentStep, userVisibleTotalSteps,
|
||||||
ByteCountBinaryUint(replicated), ByteCountBinaryUint(expected),
|
ByteCountBinaryUint(replicated), ByteCountBinaryUint(expected),
|
||||||
sizeEstimationImpreciseNotice,
|
sizeEstimationImpreciseNotice,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user