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

Method formatStatus

tui/snapshot_list.go:291–304  ·  view source on GitHub ↗
(status string, width int)

Source from the content-addressed store, hash-verified

289}
290
291func (m snapshotListModel) formatStatus(status string, width int) string {
292 var style lipgloss.Style
293 switch status {
294 case "READY":
295 style = m.styles.ready
296 case "CREATING":
297 style = m.styles.creating
298 case "FAILED":
299 style = m.styles.failed
300 default:
301 style = lipgloss.NewStyle()
302 }
303 return style.Render(truncate(status, width))
304}
305
306func RunSnapshotList(client *api.Client, monitoring bool, snapshots api.ListSnapshotsResponse) error {
307 ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)

Callers 1

renderTableMethod · 0.95

Calls 1

truncateFunction · 0.70

Tested by

no test coverage detected