feat: pass controlplane and userattributes to get links #3074
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3073
greptile-review
Greptile Overview
Greptile Summary
Extended the monitoring link generator to accept
ControlPlaneandUserAttributesfrom tenant data, enabling external implementations to customize monitoring URLs based on these additional database properties.Key Changes:
controlPlaneanduserAttributesparameters toGetMonitoringLinkPropsinterface insrc/utils/monitoring.ts:4-11Header.tsx:102-103to passdatabaseData.ControlPlaneanddatabaseData.UserAttributestouiFactory.getMonitoringLinkTTenantfor proper typing of new parametersIssue Found:
getMonitoringLinkfunction signature accepts the new parameters but doesn't use them in the implementation (src/utils/monitoring.ts:15-20). This suggests the PR provides the interface extension for external implementations (viauiFactory.getMonitoringLink) but the default implementation doesn't need these values yet.Confidence Score: 3/5
controlPlaneanduserAttributesare added to the function signature but never used in the function body. This could be intentional (for external implementations) but suggests either incomplete work or missing documentation explaining the intended usage pattern.src/utils/monitoring.ts- ensure the unused parameters are intentional or complete the implementationImportant Files Changed
File Analysis
controlPlaneanduserAttributesfrom database data to monitoring link generatorcontrolPlaneanduserAttributes, but function doesn't use themSequence Diagram
sequenceDiagram participant Header as Header Component participant TenantAPI as Tenant API participant UIFactory as UI Factory participant MonitoringUtil as getMonitoringLink Header->>TenantAPI: getTenantInfo(database, clusterName) TenantAPI-->>Header: databaseData (TTenant) Note over Header: Extract fields from databaseData:<br/>Name, Type, ControlPlane, UserAttributes Header->>UIFactory: uiFactory.getMonitoringLink({<br/>monitoring, clusterName, dbName,<br/>dbType, controlPlane, userAttributes}) UIFactory->>MonitoringUtil: getMonitoringLink(params) Note over MonitoringUtil: ⚠️ controlPlane and userAttributes<br/>parameters accepted but unused MonitoringUtil->>MonitoringUtil: parseMonitoringData(monitoring) MonitoringUtil->>MonitoringUtil: Build URL with dbName,<br/>dbType, clusterName MonitoringUtil-->>UIFactory: monitoringUrl (string) UIFactory-->>Header: monitoringUrl Header->>Header: Render monitoring button<br/>with external linkCI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 66.08 MB | Main: 66.08 MB
Diff: +0.36 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information