-
Notifications
You must be signed in to change notification settings - Fork 43
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
chore: remove multiorg phase2 feat flag #6643
base: master
Are you sure you want to change the base?
Changes from 1 commit
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 |
---|---|---|
|
@@ -8,7 +8,9 @@ import {ComponentSize, Orientation, Tabs} from '@influxdata/clockface' | |
|
||
// Utils | ||
import {getOrg} from 'src/organizations/selectors' | ||
import {isFlagEnabled} from 'src/shared/utils/featureFlag' | ||
|
||
// Constants | ||
import {CLOUD} from 'src/shared/constants' | ||
|
||
interface Props { | ||
activeTab: string | ||
|
@@ -35,7 +37,7 @@ const AccountTabs: FC<Props> = ({activeTab}) => { | |
}, | ||
{ | ||
id: 'organizations', | ||
enabled: isFlagEnabled('createDeleteOrgs'), | ||
enabled: CLOUD, | ||
link: `/orgs/${orgID}/accounts/orglist`, | ||
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. The organization tab cannot be accessed from OSS, where there is no multi-org or access to quartz APIs. |
||
testID: 'accounts-orglist-tab', | ||
text: 'Organizations', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,9 +34,6 @@ import { | |
// Constants | ||
import {CLOUD_URL} from 'src/shared/constants' | ||
|
||
// Utils | ||
import {isFlagEnabled} from 'src/shared/utils/featureFlag' | ||
|
||
export const AccountDropdown: FC<Props> = ({ | ||
accountsList, | ||
activeAccount, | ||
|
@@ -47,31 +44,25 @@ export const AccountDropdown: FC<Props> = ({ | |
name: activeAccount.name, | ||
} | ||
|
||
const isCreateDeleteFlagOn = isFlagEnabled('createDeleteOrgs') | ||
|
||
const accountMainMenu = useMemo( | ||
() => | ||
[ | ||
{ | ||
name: 'Settings', | ||
iconFont: IconFont.CogSolid_New, | ||
href: `/orgs/${activeOrg.id}/accounts/settings`, | ||
enabled: true, | ||
}, | ||
{ | ||
name: 'Organizations', | ||
iconFont: IconFont.OrganizationChart, | ||
href: `/orgs/${activeOrg.id}/accounts/orglist`, | ||
enabled: isCreateDeleteFlagOn, | ||
}, | ||
{ | ||
name: 'Billing', | ||
iconFont: IconFont.Bill, | ||
href: `/orgs/${activeOrg.id}/billing`, | ||
enabled: true, | ||
}, | ||
].filter(menuOption => menuOption.enabled), | ||
[activeOrg.id, isCreateDeleteFlagOn] | ||
() => [ | ||
{ | ||
name: 'Settings', | ||
iconFont: IconFont.CogSolid_New, | ||
href: `/orgs/${activeOrg.id}/accounts/settings`, | ||
}, | ||
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. There's no need for the 'enabled' distinction here, as all of these tabs are accessible without condition. The global header only exists in cloud, so there's no need for a CLOUD guard either. |
||
{ | ||
name: 'Organizations', | ||
iconFont: IconFont.OrganizationChart, | ||
href: `/orgs/${activeOrg.id}/accounts/orglist`, | ||
}, | ||
{ | ||
name: 'Billing', | ||
iconFont: IconFont.Bill, | ||
href: `/orgs/${activeOrg.id}/billing`, | ||
}, | ||
], | ||
[activeOrg.id] | ||
) | ||
|
||
// Quartz handles switching accounts by having the user hit this URL. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,6 @@ import {RemoteDataState} from 'src/types' | |
// Constants | ||
import {CLOUD} from 'src/shared/constants' | ||
|
||
// Utils | ||
import {isFlagEnabled} from 'src/shared/utils/featureFlag' | ||
|
||
// Styles | ||
import 'src/organizations/components/OrgProfileTab/style.scss' | ||
|
||
|
@@ -81,7 +78,6 @@ const OrgProfileTab: FC = () => { | |
}, [dispatch, orgDetailsStatus, quartzOrg.id]) | ||
|
||
const allowSelfRemoval = users.length > 1 | ||
const showLeaveOrgButton = isFlagEnabled('createDeleteOrgs') | ||
const hasFetchedOrgDetails = orgDetailsStatus === RemoteDataState.Done | ||
const hasFetchedStorageType = Boolean(storageType) | ||
|
||
|
@@ -175,7 +171,7 @@ const OrgProfileTab: FC = () => { | |
stretchToFitWidth={true} | ||
> | ||
<> | ||
{allowSelfRemoval && showLeaveOrgButton && <LeaveOrgButton />} | ||
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 is already subordinate to a |
||
{allowSelfRemoval && <LeaveOrgButton />} | ||
<DeletePanel /> | ||
</> | ||
</FlexBox> | ||
|
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.
The "Leave Org" button was only here for backwards compatibility for situations where the feature flag was turned off. It now lives on the org settings page.