Implement Tab key host switching functionality

- Add KeyCode::Tab support to main dashboard event loop
- Add Tab key handling to TuiApp handle_input method
- Tab key now cycles to next host using existing navigate_host logic
- Host switching infrastructure was already implemented, just needed Tab key support
- Current host displayed in bold in title bar, other hosts shown normally
- Metrics filtered by selected host, full navigation working
This commit is contained in:
Christoffer Martinsson 2025-10-18 19:26:58 +02:00
parent 5d52c5b1aa
commit 46cc813a68
2 changed files with 11 additions and 0 deletions

View File

@ -186,6 +186,14 @@ impl Dashboard {
}
}
}
KeyCode::Tab => {
debug!("Tab pressed - next host");
if let Some(ref mut tui_app) = self.tui_app {
if let Err(e) = tui_app.handle_input(Event::Key(key)) {
error!("Error handling tab navigation: {}", e);
}
}
}
_ => {}
}
}

View File

@ -112,6 +112,9 @@ impl TuiApp {
info!("Manual refresh requested");
// Refresh will be handled by main loop
}
KeyCode::Tab => {
self.navigate_host(1); // Tab cycles to next host
}
_ => {}
}
}