Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ type Keybindings struct {
Terminal string `yaml:"terminal"`
PortForward string `yaml:"port_forward"`
Scale string `yaml:"scale"`
RolloutRestart string `yaml:"rollout_restart"`
YAMLView string `yaml:"yaml_view"`
JSONView string `yaml:"json_view"`
SwitchNamespace string `yaml:"switch_namespace"`
Expand Down
1 change: 0 additions & 1 deletion internal/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func DefaultConfig() *Config {
Terminal: "T",
PortForward: "p",
Scale: "s",
RolloutRestart: "R",
YAMLView: "Y",
JSONView: "J",
SwitchNamespace: "n",
Expand Down
5 changes: 1 addition & 4 deletions internal/tui/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
detail *detail.Model
confirm *dialog.ConfirmModel
selector *dialog.SelectorModel
input *dialog.InputModel

Check failure on line 154 in internal/tui/app.go

View workflow job for this annotation

GitHub Actions / Lint

field `input` is unused (unused)
copySelector *dialog.MultiSelectorModel

// Pending action state
Expand All @@ -164,7 +164,7 @@
currentContext string
currentNamespace string
resources *kubectl.TableData
selectedIndex int

Check failure on line 167 in internal/tui/app.go

View workflow job for this annotation

GitHub Actions / Lint

field `selectedIndex` is unused (unused)

// Search tab state
searchInput *dialog.InputModel
Expand Down Expand Up @@ -647,9 +647,6 @@
case m.config.Keybindings.Terminal:
// Open system terminal
return m, m.openTerminal()
case "R":
// Rollout restart
return m, m.startLoading(m.rolloutRestart())
case "c":
// Open copy-data column selector
m.openCopySelector()
Expand Down Expand Up @@ -869,7 +866,7 @@
} else if m.currentTab == SearchTabIndex {
b.WriteString(wrapAtWidth(fmt.Sprintf("[Enter] enter command [/]filter results [r]efresh [q]uit [+]new tab [%s]delete tab", deleteTabKey), m.width))
} else {
b.WriteString(wrapAtWidth(fmt.Sprintf("[d]escribe [L]ogs [Y]aml [D]elete [e]dit [T]erminal [R]estart [c]ontext [n]amespace [s]ort [/]search [r]efresh [?]help [+]new tab [%s]delete tab", deleteTabKey), m.width))
b.WriteString(wrapAtWidth(fmt.Sprintf("[d]escribe [L]ogs [Y]aml [D]elete [e]dit [T]erminal [c]ontext [n]amespace [s]ort [/]search [r]efresh [?]help [+]new tab [%s]delete tab", deleteTabKey), m.width))
}

return b.String()
Expand Down Expand Up @@ -973,7 +970,7 @@
func (m *Model) loadResourceDetail(format detail.Format) tea.Cmd {
return func() tea.Msg {
selected := m.list.SelectedItem()
if selected == nil || len(selected) == 0 {

Check failure on line 973 in internal/tui/app.go

View workflow job for this annotation

GitHub Actions / Lint

S1009: should omit nil check; len() for nil slices is defined as zero (gosimple)
return ErrorMsg{Err: nil}
}

Expand Down Expand Up @@ -1490,7 +1487,7 @@
}

// rolloutRestart triggers a rollout restart
func (m *Model) rolloutRestart() tea.Cmd {

Check failure on line 1490 in internal/tui/app.go

View workflow job for this annotation

GitHub Actions / Lint

func `(*Model).rolloutRestart` is unused (unused)
return func() tea.Msg {
names, namespace := m.getSelectedResourceInfo()
if len(names) == 0 {
Expand Down
7 changes: 1 addition & 6 deletions internal/tui/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type KeyMap struct {
Terminal key.Binding
PortForward key.Binding
Scale key.Binding
RolloutRestart key.Binding
YAMLView key.Binding
JSONView key.Binding
SwitchNamespace key.Binding
Expand Down Expand Up @@ -109,10 +108,6 @@ func NewKeyMap(cfg config.Keybindings) *KeyMap {
key.WithKeys(cfg.Scale),
key.WithHelp(cfg.Scale, "scale"),
),
RolloutRestart: key.NewBinding(
key.WithKeys(cfg.RolloutRestart),
key.WithHelp(cfg.RolloutRestart, "rollout restart"),
),
YAMLView: key.NewBinding(
key.WithKeys(cfg.YAMLView),
key.WithHelp(cfg.YAMLView, "yaml"),
Expand Down Expand Up @@ -156,7 +151,7 @@ func (k KeyMap) FullHelp() [][]key.Binding {
{k.Up, k.Down, k.Enter, k.Escape},
{k.TabNext, k.TabPrev, k.Search, k.Refresh},
{k.Describe, k.Logs, k.Delete, k.Edit},
{k.Terminal, k.PortForward, k.Scale, k.RolloutRestart},
{k.Terminal, k.PortForward, k.Scale},
{k.YAMLView, k.JSONView, k.SwitchNamespace, k.SwitchContext},
{k.CopyData},
{k.Help, k.Quit},
Expand Down
Loading