-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
Developer Tools
Problem
The URL builder functions in packages/atlas-service/src/url-builders.ts generate incorrect URLs for Flex clusters. They use the generic {{#/host/
{metricsType}/
{metricsId}}} pattern, which produces broken URLs like:
https://cloud-dev.mongodb.com/v2/[projectId]#/host/flex/Cluster0
Flex clusters use a different URL format: #/flex/[section]/[clusterName].
Affected Functions
| Function | Incorrect URL | Correct URL | |
|---|---|---|---|
| buildPerformanceMetricsUrl | {{#/host/flex/
{id}/realtime/panel}} | #/flex/realtime/{clusterName} | | buildMonitoringUrl | {{#/host/flex/{id} }} |
{{#/flex/monitoring/
{clusterName}}} | | buildClusterOverviewUrl | {{#/clusters/detail/{clusterName} }} |
{{#/flex/detail/
{clusterName}}} | | buildQueryInsightsUrl | #/metrics/flex/{id}/queryInsights/shape | {{#/flex/queryInsights/{clusterName} }} |
Fix
Check metricsType === 'flex' and branch to the correct flex URL format using clusterName instead of metricsId.