Update admin UI with real API integration and secret management

This commit is contained in:
Timur Gordon
2025-10-31 02:29:29 +01:00
parent e493085892
commit 49d36485d0
12 changed files with 827 additions and 115 deletions

View File

@@ -406,6 +406,10 @@ pub trait SupervisorRpc {
#[method(name = "delete_job")]
async fn delete_job(&self, job_id: String) -> RpcResult<()>;
/// Get logs for a specific job
#[method(name = "get_job_logs")]
async fn get_job_logs(&self, job_id: String, lines: Option<usize>) -> RpcResult<Vec<String>>;
/// Queue a job to a specific runner and wait for the result
#[method(name = "queue_and_wait")]
async fn queue_and_wait(&self, params: QueueAndWaitParams) -> RpcResult<Option<String>>;
@@ -748,6 +752,15 @@ impl SupervisorRpcServer for Arc<Mutex<Supervisor>> {
.map_err(runner_error_to_rpc_error)
}
async fn get_job_logs(&self, job_id: String, lines: Option<usize>) -> RpcResult<Vec<String>> {
debug!("OpenRPC request: get_job_logs with job_id: {}, lines: {:?}", job_id, lines);
let supervisor = self.lock().await;
supervisor
.get_job_logs(&job_id, lines)
.await
.map_err(runner_error_to_rpc_error)
}
async fn queue_and_wait(&self, params: QueueAndWaitParams) -> RpcResult<Option<String>> {
debug!("OpenRPC request: queue_and_wait with params: {:?}", params);
let mut supervisor = self.lock().await;