refactor: switch Globalping to dynamic tier-based location lookup
## Changes - Remove per-monitor location selection — locations are now determined globally by the tier setting in admin settings (3, 6, or 15 locations) - GlobalpingService reads tier from settings on each check run, so changing the tier in settings immediately affects all HTTP/ping monitors - Add resolveLocationId() to map Globalping probe results back to configured location IDs for proper grouping - Export LOCATION_LABELS for human-readable location names on the client - Remove unused locations field from Zod schemas and form defaults - Remove per-monitor location ConfigBox from CreateMonitor page - Fix settingsController.updateAppSettings missing try/catch - Fix MongoSettingsRepository duplicate findOneAndUpdate call - Use typed LocationCheckData instead of Record<string, any> - Remove unused REVERSE_LOCATION_MAP from globalpingService ## Benefits - Changing the location tier in settings takes effect immediately for all monitors without needing to edit each one individually - Cleaner separation of concerns — location configuration lives in settings, not scattered across monitors - Human-readable location labels shown in uptime details tabs
This commit is contained in:
1 parent
7646d11ea0
commit
1966134647
10 files changed
+92
-113
No files matched your search
@@ -37,7 +37,6 @@ export const useMonitorForm = ({
|
||||
matchMethod: data?.matchMethod || "",
|
||||
expectedValue: data?.expectedValue || "",
|
||||
jsonPath: data?.jsonPath || "",
|
||||
locations: data?.locations || [],
|
||||
};
|
||||
break;
|
||||
case "ping":
|
||||
@@ -45,7 +44,6 @@ export const useMonitorForm = ({
|
||||
...base,
|
||||
type: "ping",
|
||||
url: data?.url || "",
|
||||
locations: data?.locations || [],
|
||||
};
|
||||
break;
|
||||
case "port":
|
||||
|
||||
Reference in new issue
Block a user