feat(connections): add ConnectionsRouterClassBase for pluggable connection routing#27662
Conversation
🟡 Playwright Results — all passed (17 flaky)✅ 3956 passed · ❌ 0 failed · 🟡 17 flaky · ⏭️ 86 skipped
🟡 17 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ Approved 1 resolved / 1 findingsIntroduces ConnectionsRouterClassBase to enable pluggable connection routing while resolving the incorrect cancel navigation path to settings. ✅ 1 resolved✅ Bug: Cancel navigates to generic /settings/services instead of service-type tab
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Describe your changes:
Fixes 3502
Summary
ConnectionsRouterClassBase— centralizes all connection-related route generation into a singleton class, mirroring theObservabilityRouterClassBasepatternEditConnectionFormPageandAddServicePageto useconnectionsRouterClassBasefor allnavigate()calls so Collate can override paths without touching OSS componentsConnectionsRouterClassBase.test.tswith full unit coverageMotivation
Collate embeds connection pages inside
/askCollate/connections/. When OSS pages callnavigate(getEditConnectionPath(...))directly, navigation escapes the embedded context. This class provides a seam for Collate's build-time class replacement plugin to swap in path-prefixed variants.Changes
utils/ConnectionsRouterClassBase.ts— new singleton with methods:getSettingsServicesPath,getServiceDetailsPath,getEditConnectionPath,getAddServicePath,getPathByServiceFQN,getLogsViewerPathpages/EditConnectionFormPage/EditConnectionFormPage.component.tsx—navigate(getPathByServiceFQN(...))→connectionsRouterClassBase.getPathByServiceFQN(...)pages/AddServicePage/AddServicePage.component.tsx— all navigation calls migrated to router classType of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
getEditIngestionPathmethod toConnectionsRouterClassBaseto support pluggable ingestion route generation.This will update automatically on new commits.