Add kernel version to statusbar
All checks were successful
Build and Release / build-and-release (push) Successful in 1m37s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m37s
This commit is contained in:
@@ -688,7 +688,7 @@ impl TuiApp {
|
||||
use ratatui::widgets::Paragraph;
|
||||
|
||||
// Get current host info
|
||||
let (hostname_str, host_ip, build_version, agent_version) = if let Some(hostname) = &self.current_host {
|
||||
let (hostname_str, host_ip, kernel_version, build_version, agent_version) = if let Some(hostname) = &self.current_host {
|
||||
// Get the connection IP (the IP dashboard uses to connect to the agent)
|
||||
let ip = if let Some(host_details) = self.config.hosts.get(hostname) {
|
||||
host_details.get_connection_ip(hostname)
|
||||
@@ -696,21 +696,22 @@ impl TuiApp {
|
||||
hostname.clone()
|
||||
};
|
||||
|
||||
// Get build and agent versions from system widget
|
||||
let (build, agent) = if let Some(host_widgets) = self.host_widgets.get(hostname) {
|
||||
// Get kernel, build and agent versions from system widget
|
||||
let (kernel, build, agent) = if let Some(host_widgets) = self.host_widgets.get(hostname) {
|
||||
let kernel = host_widgets.system_widget.get_kernel_version().unwrap_or("N/A".to_string());
|
||||
let build = host_widgets.system_widget.get_build_version().unwrap_or("N/A".to_string());
|
||||
let agent = host_widgets.system_widget.get_agent_version().unwrap_or("N/A".to_string());
|
||||
(build, agent)
|
||||
(kernel, build, agent)
|
||||
} else {
|
||||
("N/A".to_string(), "N/A".to_string())
|
||||
("N/A".to_string(), "N/A".to_string(), "N/A".to_string())
|
||||
};
|
||||
|
||||
(hostname.clone(), ip, build, agent)
|
||||
(hostname.clone(), ip, kernel, build, agent)
|
||||
} else {
|
||||
("None".to_string(), "N/A".to_string(), "N/A".to_string(), "N/A".to_string())
|
||||
("None".to_string(), "N/A".to_string(), "N/A".to_string(), "N/A".to_string(), "N/A".to_string())
|
||||
};
|
||||
|
||||
let left_text = format!(" Host: {} | {}", hostname_str, host_ip);
|
||||
let left_text = format!(" Host: {} | {} | {}", hostname_str, host_ip, kernel_version);
|
||||
let right_text = format!("Build:{} | Agent:{} ", build_version, agent_version);
|
||||
|
||||
// Calculate spacing to push right text to the right
|
||||
|
||||
Reference in New Issue
Block a user