Convert a sandbox phase integer to a human-readable string.
(phase: i32)
| 114 | |
| 115 | /// Convert a sandbox phase integer to a human-readable string. |
| 116 | fn phase_name(phase: i32) -> &'static str { |
| 117 | match SandboxPhase::try_from(phase) { |
| 118 | Ok(SandboxPhase::Unspecified) => "Unspecified", |
| 119 | Ok(SandboxPhase::Provisioning) => "Provisioning", |
| 120 | Ok(SandboxPhase::Ready) => "Ready", |
| 121 | Ok(SandboxPhase::Error) => "Error", |
| 122 | Ok(SandboxPhase::Deleting) => "Deleting", |
| 123 | Ok(SandboxPhase::Unknown) | Err(_) => "Unknown", |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | fn ready_false_condition_message( |
| 128 | status: Option<&openshell_core::proto::SandboxStatus>, |