add "Deleting" phase for restore display (#6604)

Signed-off-by: allenxu404 <qix2@vmware.com>
This commit is contained in:
Qi Xu
2023-08-08 17:16:53 -04:00
committed by GitHub
parent 81057b9983
commit 5f463c59ec
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -59,6 +59,13 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
cmd.CheckError(err)
}
// Append "(Deleting)" to phase if deletionTimestamp is marked.
for i := range restores.Items {
if !restores.Items[i].DeletionTimestamp.IsZero() {
restores.Items[i].Status.Phase += " (Deleting)"
}
}
if printed, err := output.PrintWithFormat(c, restores); printed || err != nil {
cmd.CheckError(err)
return