MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / formatStatus

Method formatStatus

tui/status.go:476–495  ·  view source on GitHub ↗
(status string, width int)

Source from the content-addressed store, hash-verified

474}
475
476func (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
497func (m *statusModel) ensureProgressBar(gpuType string) {
498 if _, exists := m.progressBars[gpuType]; !exists {

Callers 1

renderTableMethod · 0.95

Calls 1

truncateFunction · 0.70

Tested by

no test coverage detected