Integrate Docker support into Archipelago and Neode UI
- Added StateManager and data_model modules to manage application state. - Updated ApiHandler to utilize StateManager for WebSocket connections. - Enhanced Server initialization to include StateManager. - Implemented Docker container querying in Neode UI to populate app data dynamically. - Removed temporary dummy app configurations in favor of real Docker-based applications. - Improved WebSocket reconnection logic and error handling in the UI. - Updated package.json and package-lock.json to include dockerode dependency.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::api::ApiHandler;
|
||||
use crate::config::Config;
|
||||
use crate::state::StateManager;
|
||||
use anyhow::Result;
|
||||
use hyper::server::conn::Http;
|
||||
use hyper::service::service_fn;
|
||||
@@ -15,7 +16,8 @@ pub struct Server {
|
||||
|
||||
impl Server {
|
||||
pub async fn new(config: Config) -> Result<Self> {
|
||||
let api_handler = Arc::new(ApiHandler::new(config.clone()).await?);
|
||||
let state_manager = Arc::new(StateManager::new());
|
||||
let api_handler = Arc::new(ApiHandler::new(config.clone(), state_manager).await?);
|
||||
|
||||
Ok(Self {
|
||||
_config: config,
|
||||
|
||||
Reference in New Issue
Block a user