feat: add game server monitoring support

- Added a new `/games` route in `monitorRoute.js` to fetch all supported games.
- Implemented `getAllGames` method in `monitorController.js` using the `gamedig` library.
- Introduced `useFetchMonitorGames` hook in `monitorHooks.js` to fetch game data in the frontend.
- Updated `UptimeCreate` page to support game server monitoring:
  - Added a new monitor type `"game"`.
  - Dynamically fetches and displays game options using the new `/games` API.
- Removed hardcoded `GAMES` object and replaced it with dynamic fetching from the backend.
- Updated `NetworkService.js` with a new `getMonitorGames` method for API calls.

This update introduces game server monitoring functionality, allowing users to monitor game servers dynamically.
This commit is contained in:
Burak Arslan committed 2025-08-03 13:19:55 +03:00
1 parent b53650a50f
commit 281cbbc30f
6 files changed
+67 -3455

No files matched your search

+3
View File
@@ -25,6 +25,9 @@ class MonitorRoutes {
// Hardware routes
this.router.get("/hardware/details/:monitorId", this.monitorController.getHardwareDetailsById);
// Game routes
this.router.get("/games", this.monitorController.getAllGames);
// General monitor routes
this.router.post("/pause/:monitorId", isAllowed(["admin", "superadmin"]), this.monitorController.pauseMonitor);
this.router.get("/stats/:monitorId", this.monitorController.getMonitorStatsById);