-
Notifications
You must be signed in to change notification settings - Fork 125
fix: Various fixes for Domain Failover History #1117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Various fixes for Domain Failover History #1117
Conversation
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes several issues in the Domain Failover History feature. The primary changes include removing the "Type" column from the failovers table, allowing failover rendering when either source or destination cluster is missing, renaming "primary" terminology to "default" for clarity, and adding proper spacing to the table in active-passive domain views.
Key changes:
- Renamed
PRIMARY_CLUSTER_SCOPEtoDEFAULT_CLUSTER_SCOPEthroughout the codebase for clearer terminology - Removed the "Type" column from failover tables and adjusted column widths accordingly
- Updated cluster failover logic to display "None" placeholder when only one cluster is missing, instead of hiding the entire component
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/views/domain-page/helpers/get-cluster-replication-status-label.ts |
Updated to use DEFAULT_CLUSTER_SCOPE constant and return "default" label instead of "primary" |
src/views/domain-page/helpers/cluster-failover-matches-attribute.ts |
Replaced PRIMARY_CLUSTER_SCOPE with DEFAULT_CLUSTER_SCOPE in attribute matching logic |
src/views/domain-page/helpers/__tests__/get-cluster-replication-status-label.test.ts |
Updated test descriptions and assertions to reflect "default" terminology |
src/views/domain-page/helpers/__tests__/cluster-failover-matches-attribute.test.ts |
Updated import to use DEFAULT_CLUSTER_SCOPE |
src/views/domain-page/domain-page-failovers/domain-page-failovers.tsx |
Added conditional rendering for table top spacer in active-passive domains |
src/views/domain-page/domain-page-failovers/domain-page-failovers.styles.ts |
New file adding TableTopSpacer component for spacing consistency |
src/views/domain-page/domain-page-failovers/domain-page-failovers.constants.ts |
Replaced PRIMARY_CLUSTER_SCOPE with DEFAULT_CLUSTER_SCOPE and removed unused FAILOVER_TYPE_LABEL_MAP |
src/views/domain-page/domain-page-failovers-filters/domain-page-failovers-filters.tsx |
Updated all references from PRIMARY_CLUSTER_SCOPE to DEFAULT_CLUSTER_SCOPE |
src/views/domain-page/domain-page-failovers-filters/__tests__/domain-page-failovers-filters.test.tsx |
Updated constant imports and usage in tests |
src/views/domain-page/domain-page-failover-single-cluster/domain-page-failover-single-cluster.tsx |
Changed null check from OR to AND, allowing rendering with one missing cluster and showing "None" placeholder |
src/views/domain-page/domain-page-failover-single-cluster/domain-page-failover-single-cluster.styles.ts |
Added noClusterContainer style for "None" placeholder |
src/views/domain-page/domain-page-failover-single-cluster/__tests__/domain-page-failover-single-cluster.test.tsx |
Updated tests to verify "None" placeholder behavior and null rendering when both clusters missing |
src/views/domain-page/domain-page-failover-modal/domain-page-failover-modal.tsx |
Changed scope label from "Primary" to "Default" and removed 'use client' directive |
src/views/domain-page/domain-page-failover-modal/__tests__/domain-page-failover-modal.test.tsx |
Updated test assertions to expect "Default" instead of "Primary" |
src/views/domain-page/domain-page-failover-active-active/domain-page-failover-active-active.tsx |
Updated to use DEFAULT_CLUSTER_SCOPE and DEFAULT_CLUSTER_SCOPE_LABEL constants |
src/views/domain-page/domain-page-failover-active-active/__tests__/domain-page-failover-active-active.test.tsx |
Updated test descriptions and constant usage to reflect "default" terminology |
src/views/domain-page/config/domain-page-failovers-table.config.ts |
Removed "Type" column and adjusted "Failover Information" width from 40% to 50% |
src/views/domain-page/config/domain-page-failovers-table-active-active.config.ts |
Adjusted array slice indices to account for removed "Type" column |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/domain-page/domain-page-failovers-filters/__tests__/domain-page-failovers-filters.test.tsx
Outdated
Show resolved
Hide resolved
…domain-page-failovers-filters.test.tsx Co-authored-by: Copilot <[email protected]>
Summary
Test plan
Updated unit tests + ran locally.
Failovers Table
Failovers modal (with "none" fromCluster)
"default" cluster attribute
Active-Passive domain