feat(kube): add Kubernetes management GUI components #71

Merged
sarman merged 10 commits from feature/kubernetes-management into master 2026-06-06 19:19:27 +00:00
3 changed files with 13 additions and 1 deletions
Showing only changes of commit a7a0f01674 - Show all commits

View File

@ -159,6 +159,17 @@ pub async fn list_port_forwards(
Ok(forwards)
}
#[tauri::command]
pub async fn delete_port_forward(id: String, state: State<'_, AppState>) -> Result<(), String> {
let mut port_forwards = state.port_forwards.lock().await;
if port_forwards.remove(&id).is_none() {
return Err(format!("Port forward session {id} not found"));
}
Ok(())
}
fn extract_context(_content: &str) -> Result<String, String> {
Ok("default".to_string())
}

View File

@ -181,6 +181,7 @@ pub fn run() {
commands::kube::start_port_forward,
commands::kube::stop_port_forward,
commands::kube::list_port_forwards,
commands::kube::delete_port_forward,
])
.run(tauri::generate_context!())
.expect("Error running Troubleshooting and RCA Assistant application");

View File

@ -783,7 +783,7 @@ export const stopPortForwardCmd = (id: string) =>
invoke<void>("stop_port_forward", { id });
export const deletePortForwardCmd = (id: string) =>
invoke<void>("stop_port_forward", { id });
invoke<void>("delete_port_forward", { id });
export const listPortForwardsCmd = () =>
invoke<PortForwardResponse[]>("list_port_forwards");