Remove service restart functionality and make R always rebuild host
All checks were successful
Build and Release / build-and-release (push) Successful in 2m6s
All checks were successful
Build and Release / build-and-release (push) Successful in 2m6s
Simplified keyboard controls by removing service restart functionality: - Removed 'r' key restart functionality from Services panel - Made 'R' key always trigger system rebuild regardless of focused panel - Updated context shortcuts to show 'R: Rebuild Host' globally - Removed all ServiceRestart enum variants and associated code: - UiCommand::ServiceRestart - CommandType::ServiceRestart - ServiceAction::Restart - Cleaned up pending transition logic to only handle Start/Stop commands The 'R' key now consistently rebuilds the current host from any panel, while 's' and 'S' continue to handle service start/stop in Services panel.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.29"
|
||||
version = "0.1.30"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -274,7 +274,6 @@ impl Agent {
|
||||
let action_str = match action {
|
||||
ServiceAction::Start => "start",
|
||||
ServiceAction::Stop => "stop",
|
||||
ServiceAction::Restart => "restart",
|
||||
ServiceAction::Status => "status",
|
||||
};
|
||||
|
||||
@@ -299,7 +298,7 @@ impl Agent {
|
||||
}
|
||||
|
||||
// Force refresh metrics after service control to update service status
|
||||
if matches!(action, ServiceAction::Start | ServiceAction::Stop | ServiceAction::Restart) {
|
||||
if matches!(action, ServiceAction::Start | ServiceAction::Stop) {
|
||||
info!("Triggering immediate metric refresh after service control");
|
||||
if let Err(e) = self.collect_metrics_only().await {
|
||||
error!("Failed to refresh metrics after service control: {}", e);
|
||||
|
||||
@@ -112,6 +112,5 @@ pub enum AgentCommand {
|
||||
pub enum ServiceAction {
|
||||
Start,
|
||||
Stop,
|
||||
Restart,
|
||||
Status,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user