deweb plugin use the node used by station#342
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request enables the DeWeb plugin to use the same Massa node as Station, creating a unified network configuration. The implementation involves refactoring configuration dependencies from Station to DeWeb-server and introducing a NetworkManager that polls Station's network endpoint to synchronize network settings.
- Decoupled DeWeb-server configuration from Station by moving
NetworkInfosstruct todeweb-server/pkg/config - Implemented a NetworkManager that polls Station every 3 seconds to detect network changes and automatically restart the DeWeb server when needed
- Introduced ServerConfigManager to centralize configuration management with caching
Reviewed changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| server/pkg/config/network.go | Moved NetworkInfos struct from Station, changed field name from Network to Name |
| server/pkg/website/read.go | Updated import to use deweb-server config instead of station config |
| server/pkg/webmanager/manager.go | Updated import to use deweb-server config instead of station config |
| server/pkg/mns/mns.go | Updated import to use deweb-server config instead of station config |
| server/pkg/mns/mns_test.go | Updated import to use deweb-server config instead of station config |
| server/int/api/handlers.go | Updated to use NetworkInfos.Name instead of Network field |
| server/int/api/config/config.go | Changed NetworkInfos type to use deweb-server config |
| server/int/api/middlewares.go | Updated import to use deweb-server config instead of station config |
| plugin/int/station/networkManager.go | New file implementing network polling and synchronization with Station |
| plugin/int/server/manager.go | Removed GetConfig method, added debug logs, added 10s sleep in Restart |
| plugin/int/server/config.go | Added ServerConfigManager for centralized config management with caching |
| plugin/int/api/server/handlers.go | Updated handlers to use ServerConfigManager, changed network response structure |
| plugin/int/api/middleware/middleware.go | Moved and reorganized middleware from api package, added domain restriction |
| plugin/int/api/middleware.go | Deleted file, moved to middleware package |
| plugin/int/api/api.go | Integrated NetworkManager, added network sync on startup |
| plugin/home/src/types/server.ts | Changed network field to name, added url field to NetworkInfo |
| plugin/home/src/Status.tsx | New component for displaying server status with network details |
| plugin/home/src/App.tsx | Refactored to use Status component, optimized state updates to reduce re-renders |
| plugin/api/pluginAPI-V0.yml | Added NetworkInfoItem definition, updated ServerStatus to reference it |
| plugin/api/models/*.go | Generated model changes reflecting API spec updates |
| plugin/api/restapi/operations/*.go | Generated operation changes with improved error handling patterns |
| plugin/api/restapi/server.go | Code quality improvements (interface{} to any, better error handling) |
| plugin/api/restapi/embedded_spec.go | Generated spec embedding reflecting API changes |
| plugin/api/restapi/configure_deweb_plugin.go | Added CORS and domain restriction middleware setup |
| plugin/go.mod | Updated station dependency from v0.6.9 to v0.8.3, added rs/cors v1.8.3 |
| plugin/go.sum | Updated checksums for dependency changes |
| plugin/Taskfile.yml | Split build task into build-frontend and build-backend |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 45 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…in deweb server config
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 45 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…itial config node is down
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.