@@ -77,13 +77,6 @@ func (u *UIModel) View() string {
7777 b := strings.Builder {}
7878
7979 stats := u .cluster .Stats ()
80- if stats .NumNodes == 0 {
81- fmt .Fprintln (& b , "Waiting for update or no nodes found..." )
82- fmt .Fprintln (& b , u .paginator .View ())
83- fmt .Fprintln (& b , helpStyle ("←/→ page • q: quit" ))
84-
85- return b .String ()
86- }
8780
8881 ctw := text .NewColorTabWriter (& b , 0 , 8 , 1 )
8982 u .writeClusterSummary (u .cluster .resources , stats , ctw )
@@ -93,6 +86,14 @@ func (u *UIModel) View() string {
9386 fmt .Fprintf (& b , "%d pods (%d pending %d running %d bound)\n " , stats .TotalPods ,
9487 stats .PodsByPhase [v1 .PodPending ], stats .PodsByPhase [v1 .PodRunning ], stats .BoundPodCount )
9588
89+ if stats .NumNodes == 0 {
90+ fmt .Fprintln (& b )
91+ fmt .Fprintln (& b , "Waiting for update or no nodes found..." )
92+ fmt .Fprintln (& b , u .paginator .View ())
93+ fmt .Fprintln (& b , helpStyle ("←/→ page • q: quit" ))
94+ return b .String ()
95+ }
96+
9697 fmt .Fprintln (& b )
9798 u .paginator .PerPage = u .computeItemsPerPage (stats .Nodes , & b )
9899 u .paginator .SetTotalPages (stats .NumNodes )
0 commit comments