| 474 | } |
| 475 | |
| 476 | func (m statusModel) formatStatus(status string, width int) string { |
| 477 | var style lipgloss.Style |
| 478 | switch status { |
| 479 | case "RUNNING": |
| 480 | style = m.styles.running |
| 481 | case "STARTING", "SNAPPING": |
| 482 | style = m.styles.starting |
| 483 | case "RESTORING": |
| 484 | style = m.styles.restoring |
| 485 | case "MIGRATING": |
| 486 | style = m.styles.migrating |
| 487 | case "DELETING": |
| 488 | style = m.styles.deleting |
| 489 | case "PROVISIONING": |
| 490 | style = m.styles.provisioning |
| 491 | default: |
| 492 | style = lipgloss.NewStyle() |
| 493 | } |
| 494 | return style.Render(truncate(status, width)) |
| 495 | } |
| 496 | |
| 497 | func (m *statusModel) ensureProgressBar(gpuType string) { |
| 498 | if _, exists := m.progressBars[gpuType]; !exists { |