Skip to content

Commit

Permalink
Add shared costs to TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmdresser committed Feb 22, 2021
1 parent c07b747 commit 5bf6a73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/cmd/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ func populateDisplayOptionsList(displayOptionsList *tview.List, do *displayOptio
redrawTable()
}

showShared := func() {
do.showSharedCost = !do.showSharedCost
redrawTable()
}

displayOptionsList.ShowSecondaryText(false).
AddItem("Show CPU", "", 'c', showCPU).
AddItem("Show Memory", "", 'm', showMemory).
AddItem("Show PV", "", 'p', showPV).
AddItem("Show GPU", "", 'g', showGPU).
AddItem("Show Network", "", 'n', showNetwork).
AddItem("Show Shared", "", 's', showShared).
AddItem("Navigate Table", "", 't', navigateTable).
AddItem("ESC to change other options", "", '-', nil)
}
Expand Down Expand Up @@ -219,7 +225,7 @@ func runTUI(ko *KubeOptions, do displayOptions) error {

optionsFlex.AddItem(dropDownFlex, 0, 1, true)

fb := tview.NewFlex().AddItem(table, 0, 1, false).AddItem(optionsFlex, 7, 1, true)
fb := tview.NewFlex().AddItem(table, 0, 1, false).AddItem(optionsFlex, 8, 1, true)
fb.SetDirection(tview.FlexRow)

requeryData()
Expand Down

0 comments on commit 5bf6a73

Please sign in to comment.