Consolidate log viewing to use service-manage logs action
All checks were successful
Build and Release / build-and-release (push) Successful in 1m31s

Replace separate service_logs_cmd with service-manage logs action
to unify service management through single script interface.
Dashboard now calls 'service-manage logs <service>' which provides
intelligent log viewing based on service state and configuration.
This commit is contained in:
2025-11-20 11:30:55 +01:00
parent 2384f7f9b9
commit a6be7a4788
6 changed files with 9 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "cm-dashboard"
version = "0.1.93"
version = "0.1.94"
edition = "2021"
[dependencies]

View File

@@ -57,7 +57,6 @@ pub struct SshConfig {
pub rebuild_user: String,
pub rebuild_cmd: String,
pub service_manage_cmd: String,
pub service_logs_cmd: String,
}
/// Service log file configuration per host

View File

@@ -311,14 +311,14 @@ impl TuiApp {
}
}
KeyCode::Char('L') => {
// Show service logs via script in tmux split window
// Show service logs via service-manage script in tmux split window
if let (Some(service_name), Some(hostname)) = (self.get_selected_service(), self.current_host.clone()) {
let connection_ip = self.get_connection_ip(&hostname);
let logs_command = format!(
"ssh -tt {}@{} '{} {}'",
"ssh -tt {}@{} '{} logs {}'",
self.config.ssh.rebuild_user,
connection_ip,
self.config.ssh.service_logs_cmd,
self.config.ssh.service_manage_cmd,
service_name
);