fix: Implement Phase 2 major fixes
Database: - Add missing indexes for api_key_hash, status, metrics queries - New migration: 005_add_missing_indexes.sql Server: - Fix WebSocket Ping/Pong protocol (RFC 6455 compliance) - Use separate channel for Pong responses Agent: - Replace format!() path construction with PathBuf::join() - Replace todo!() macros with proper errors for macOS support Dashboard: - Fix duplicate filter values in Agents page (__unassigned__ sentinel) - Add onError handlers to all mutations in Agents, Clients, Sites pages All changes reviewed and approved. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ pub mod windows {
|
||||
.context("Failed to set StartPending status")?;
|
||||
|
||||
// Determine config path
|
||||
let config_path = PathBuf::from(format!(r"{}\\agent.toml", CONFIG_DIR));
|
||||
let config_path = PathBuf::from(CONFIG_DIR).join("agent.toml");
|
||||
|
||||
// Create the tokio runtime for the agent
|
||||
let runtime = tokio::runtime::Runtime::new().context("Failed to create tokio runtime")?;
|
||||
@@ -331,8 +331,8 @@ pub mod windows {
|
||||
let current_exe =
|
||||
std::env::current_exe().context("Failed to get current executable path")?;
|
||||
|
||||
let binary_dest = PathBuf::from(format!(r"{}\\gururmm-agent.exe", INSTALL_DIR));
|
||||
let config_dest = PathBuf::from(format!(r"{}\\agent.toml", CONFIG_DIR));
|
||||
let binary_dest = PathBuf::from(INSTALL_DIR).join("gururmm-agent.exe");
|
||||
let config_dest = PathBuf::from(CONFIG_DIR).join("agent.toml");
|
||||
|
||||
// Create directories
|
||||
info!("Creating directories...");
|
||||
@@ -490,7 +490,7 @@ pub mod windows {
|
||||
pub fn uninstall() -> Result<()> {
|
||||
info!("Uninstalling GuruRMM Agent...");
|
||||
|
||||
let binary_path = PathBuf::from(format!(r"{}\\gururmm-agent.exe", INSTALL_DIR));
|
||||
let binary_path = PathBuf::from(INSTALL_DIR).join("gururmm-agent.exe");
|
||||
|
||||
// Open the service manager
|
||||
let manager = ServiceManager::local_computer(
|
||||
@@ -685,8 +685,8 @@ pub mod windows {
|
||||
|
||||
// Get the current executable path
|
||||
let current_exe = std::env::current_exe()?;
|
||||
let binary_dest = PathBuf::from(format!(r"{}\\gururmm-agent.exe", INSTALL_DIR));
|
||||
let config_dest = PathBuf::from(format!(r"{}\\agent.toml", CONFIG_DIR));
|
||||
let binary_dest = PathBuf::from(INSTALL_DIR).join("gururmm-agent.exe");
|
||||
let config_dest = PathBuf::from(CONFIG_DIR).join("agent.toml");
|
||||
|
||||
// Create directories
|
||||
std::fs::create_dir_all(INSTALL_DIR)?;
|
||||
@@ -727,7 +727,7 @@ pub mod windows {
|
||||
pub fn uninstall() -> Result<()> {
|
||||
use std::path::PathBuf;
|
||||
|
||||
let binary_path = PathBuf::from(format!(r"{}\\gururmm-agent.exe", INSTALL_DIR));
|
||||
let binary_path = PathBuf::from(INSTALL_DIR).join("gururmm-agent.exe");
|
||||
|
||||
println!("** To uninstall legacy service, use NSSM:");
|
||||
println!(" nssm stop {}", SERVICE_NAME);
|
||||
|
||||
Reference in New Issue
Block a user