(client *api.Client, monitoring bool, instances []api.Instance, verbose bool)
| 760 | } |
| 761 | |
| 762 | func RunStatus(client *api.Client, monitoring bool, instances []api.Instance, verbose bool) error { |
| 763 | ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) |
| 764 | defer stop() |
| 765 | |
| 766 | InitCommonStyles(os.Stdout) |
| 767 | |
| 768 | m := newStatusModel(client, monitoring, instances, verbose) |
| 769 | p := tea.NewProgram( |
| 770 | m, |
| 771 | tea.WithContext(ctx), |
| 772 | tea.WithOutput(os.Stdout), |
| 773 | ) |
| 774 | |
| 775 | if monitoring { |
| 776 | disableResizeSignal() |
| 777 | } |
| 778 | |
| 779 | if _, err := p.Run(); err != nil { |
| 780 | return fmt.Errorf("error running status TUI: %w", err) |
| 781 | } |
| 782 | |
| 783 | return nil |
| 784 | } |
no test coverage detected