-
-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Multi Server Management #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…have persisted to database
…during get requests
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughAdds a full “Servers” feature across API, storage, validation, middleware, WebSocket, and UI. Introduces SSH/context-aware Docker and SSH services, per-request Docker usage, server-scoped realtime flows, migrations for servers table and status enforcement, file-manager context propagation, i18n strings, Redux slice and RTK Query APIs, and a Servers settings UI with selector. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant V as View: ServerSelector
participant R as RTK Query
participant API as ServersController
participant SVC as ServersService
participant ST as ServerStorage
participant DB as DB
U->>V: Select server (activate/deactivate)
V->>R: PATCH /v1/server/status
R->>API: UpdateServerStatus
API->>SVC: UpdateServerStatus(req, userID)
SVC->>ST: BeginTx / GetServer / UpdateStatus
ST->>DB: Update status (trigger ensures single active)
DB-->>ST: OK
ST-->>SVC: Commit
SVC-->>API: Updated server
API-->>R: Response
R-->>V: Updated server
V-->>U: UI reflects active/inactive
sequenceDiagram
autonumber
actor C as Client (WebSocket)
participant WS as SocketServer
participant ST as ServerStorage
participant API as Handlers
participant D as DashboardMonitor/Terminal
C->>WS: GET /ws?token=...&server=SERVER_ID
WS->>ST: Validate server ownership
ST-->>WS: Server or error
WS->>API: readLoop(conn, server)
API->>D: New...(conn, logger, server)
D-->>API: Start using server-scoped SSH/Docker
sequenceDiagram
autonumber
participant Ctrl as ContainerController
participant DS as DockerService
participant DK as Docker Daemon
Ctrl->>Ctrl: getDockerService(ctx)
Ctrl->>DS: NewDockerServiceWithContext(ctx)
DS->>DS: (optional) Setup SSH tunnel
Ctrl->>DS: Perform operation (e.g., ListAllContainers)
DS->>DK: API call
DK-->>DS: Result
DS-->>Ctrl: Result
Ctrl->>DS: Close()
Estimated code review effort🎯 5 (Critical) | ⏱️ ~150 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai pause |
✅ Actions performedReviews paused. |
Summary by CodeRabbit