-
Notifications
You must be signed in to change notification settings - Fork 123
refactor: Update Cadence IDLs to use latest active-active design changes #1048
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
Changes from 1 commit
4e7d5a6
56ca8ac
02ba40a
2e9d9d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| import SublistTable from '@/components/list-table-nested/sublist-table/sublist-table'; | ||
| import isActiveActiveDomain from '@/views/shared/active-active/helpers/is-active-active-domain'; | ||
|
|
||
| import { type DomainDescription } from '../domain-page.types'; | ||
|
|
@@ -7,22 +6,8 @@ export default function DomainPageMetadataFailoverVersion( | |
| domainDescription: DomainDescription | ||
| ) { | ||
| if (isActiveActiveDomain(domainDescription)) { | ||
| return ( | ||
| <SublistTable | ||
| items={Object.values(domainDescription.activeClusters.regionToCluster) | ||
| .sort( | ||
| ( | ||
| { activeClusterName: clusterA }, | ||
| { activeClusterName: clusterB } | ||
| ) => (clusterA > clusterB ? 1 : -1) | ||
| ) | ||
| .map(({ activeClusterName, failoverVersion }) => ({ | ||
| key: activeClusterName, | ||
| label: activeClusterName, | ||
| value: failoverVersion, | ||
| }))} | ||
| /> | ||
| ); | ||
| // TODO @adhitya.mamallan: add special rendering for failover versions for different cluster attributes | ||
| return domainDescription.failoverVersion; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is still under discussion but part of the planned changes correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, I've raised a follow-up for it already (#1052) |
||
| } | ||
|
|
||
| return domainDescription.failoverVersion; | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,12 @@ | ||
| import getDefaultClusterForActiveActiveDomain from '@/views/shared/active-active/helpers/get-default-cluster-for-active-active-domain'; | ||
| import isActiveActiveDomain from '@/views/shared/active-active/helpers/is-active-active-domain'; | ||
|
|
||
| import { type DomainData } from '../domains-page.types'; | ||
|
|
||
| export default function getUniqueDomains(domains: DomainData[]) { | ||
| const allUniqueDomains: Record<string, boolean> = {}; | ||
| return domains.filter((d: DomainData) => { | ||
| const defaultCluster = isActiveActiveDomain(d) | ||
| ? getDefaultClusterForActiveActiveDomain(d) | ||
| : d.activeClusterName; | ||
|
|
||
| if (allUniqueDomains[`${d.id}-${d.name}-${defaultCluster}`]) return false; | ||
| if (allUniqueDomains[`${d.id}-${d.name}-${d.activeClusterName}`]) | ||
| return false; | ||
|
|
||
| allUniqueDomains[`${d.id}-${d.name}-${defaultCluster}`] = true; | ||
| allUniqueDomains[`${d.id}-${d.name}-${d.activeClusterName}`] = true; | ||
| return true; | ||
| }); | ||
| } |
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.
nit: Don't see much value from adding
temp:to the test case name. We track todos in different ways and the name can keep describing what it tests only.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.
I completely delete the file in #1052 anyway 😅