Consolidate log viewing to use service-manage logs action
All checks were successful
Build and Release / build-and-release (push) Successful in 1m31s
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:
parent
2384f7f9b9
commit
a6be7a4788
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.92"
|
version = "0.1.93"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -301,7 +301,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.92"
|
version = "0.1.93"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -324,7 +324,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.92"
|
version = "0.1.93"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.93"
|
version = "0.1.94"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.93"
|
version = "0.1.94"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -57,7 +57,6 @@ pub struct SshConfig {
|
|||||||
pub rebuild_user: String,
|
pub rebuild_user: String,
|
||||||
pub rebuild_cmd: String,
|
pub rebuild_cmd: String,
|
||||||
pub service_manage_cmd: String,
|
pub service_manage_cmd: String,
|
||||||
pub service_logs_cmd: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Service log file configuration per host
|
/// Service log file configuration per host
|
||||||
|
|||||||
@ -311,14 +311,14 @@ impl TuiApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyCode::Char('L') => {
|
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()) {
|
if let (Some(service_name), Some(hostname)) = (self.get_selected_service(), self.current_host.clone()) {
|
||||||
let connection_ip = self.get_connection_ip(&hostname);
|
let connection_ip = self.get_connection_ip(&hostname);
|
||||||
let logs_command = format!(
|
let logs_command = format!(
|
||||||
"ssh -tt {}@{} '{} {}'",
|
"ssh -tt {}@{} '{} logs {}'",
|
||||||
self.config.ssh.rebuild_user,
|
self.config.ssh.rebuild_user,
|
||||||
connection_ip,
|
connection_ip,
|
||||||
self.config.ssh.service_logs_cmd,
|
self.config.ssh.service_manage_cmd,
|
||||||
service_name
|
service_name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.93"
|
version = "0.1.94"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user