More consistent output
This commit is contained in:
parent
53f26e6bd7
commit
f2110b5a4e
|
@ -250,6 +250,6 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo
|
|||
}
|
||||
}
|
||||
|
||||
ui.Output(tableOutput(out, nil))
|
||||
ui.Output(columnOutput(out, nil))
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -567,11 +567,12 @@ func (c *OperatorRekeyCommand) backupDelete(client *api.Client) int {
|
|||
// printStatus dumps the status to output
|
||||
func (c *OperatorRekeyCommand) printStatus(status *api.RekeyStatusResponse) int {
|
||||
out := []string{}
|
||||
out = append(out, "Key | Value")
|
||||
out = append(out, fmt.Sprintf("Nonce | %s", status.Nonce))
|
||||
out = append(out, fmt.Sprintf("Started | %t", status.Started))
|
||||
|
||||
if status.Started {
|
||||
out = append(out, fmt.Sprintf("Progress | %d/%d", status.Progress, status.Required))
|
||||
out = append(out, fmt.Sprintf("Rekey Progress | %d/%d", status.Progress, status.Required))
|
||||
out = append(out, fmt.Sprintf("New Shares | %d", status.N))
|
||||
out = append(out, fmt.Sprintf("New Threshold | %d", status.T))
|
||||
}
|
||||
|
@ -581,8 +582,7 @@ func (c *OperatorRekeyCommand) printStatus(status *api.RekeyStatusResponse) int
|
|||
out = append(out, fmt.Sprintf("Backup | %t", status.Backup))
|
||||
}
|
||||
|
||||
output := columnOutput(out, nil)
|
||||
c.UI.Output(output)
|
||||
c.UI.Output(tableOutput(out, nil))
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue