Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Getnodecount added and view updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Sep 13, 2020
1 parent 8aafd9b commit c5f5234
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/gui/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
clusterInfoView.Highlight = true
}

namespaceViewHeight := termHeight - unitHeight - 7
namespaceViewHeight := termHeight - unitHeight - 8
namespaceView, err := g.SetViewBeneath("namespace", "cluster-info", namespaceViewHeight)
if err != nil {
if err.Error() != "unknown view" {
Expand Down
6 changes: 5 additions & 1 deletion pkg/gui/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ func (gui *Gui) updateNodeData() error {
return nil
}

func (gui *Gui) getNodeCount() int {
return len(gui.data.NodeData) + 1
}

func (gui *Gui) reRenderNodeInfo() error {

nodeView := gui.getNodeInfoView()
if nodeView == nil {
return nil
}

if gui.getNSCount() == 0 {
if gui.getNodeCount() == 0 {
return nil
}

Expand Down

0 comments on commit c5f5234

Please sign in to comment.