containered launch empty web status

This commit is contained in:
Ivan I. Ovchinnikov
2026-11-16 17:37:16 +03:00
parent 84ca3d07f8
commit 5c3a1473e3
30 changed files with 4611 additions and 55 deletions
+14 -10
View File
@@ -1,17 +1,21 @@
use mm_core::{BridgeState, ServerSummary};
use serde_json::{json, Value};
use mm_core::BridgeStatus;
use serde_json::Value;
pub const BRIDGE_VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn status_result() -> Value {
let servers: Vec<ServerSummary> = Vec::new();
pub fn current_status() -> BridgeStatus {
BridgeStatus::running(BRIDGE_VERSION)
}
json!({
"bridge": {
"version": BRIDGE_VERSION,
"state": BridgeState::Running,
},
"servers": servers,
pub fn status_result() -> Value {
serde_json::to_value(current_status()).unwrap_or_else(|_| {
serde_json::json!({
"bridge": {
"version": BRIDGE_VERSION,
"state": "running"
},
"servers": []
})
})
}