diff --git a/ui/src/pageLayout/components/UserWidget.tsx b/ui/src/pageLayout/components/UserWidget.tsx index 37ff4528dcf..d263b3c8cf3 100644 --- a/ui/src/pageLayout/components/UserWidget.tsx +++ b/ui/src/pageLayout/components/UserWidget.tsx @@ -16,6 +16,7 @@ import { CLOUD_URL, CLOUD_USAGE_PATH, CLOUD_BILLING_PATH, + CLOUD_USERS_PATH, } from 'src/shared/constants' // Types @@ -24,6 +25,7 @@ import {MeState} from 'src/shared/reducers/me' // Selectors import {getOrg} from 'src/organizations/selectors' +import {getNavItemActivation} from '../utils' interface StateProps { org: Organization @@ -51,6 +53,8 @@ const UserWidget: FC = ({ handleShowOverlay('switch-organizations', {}, handleDismissOverlay) } + const orgPrefix = `/orgs/${org.id}` + return ( @@ -71,8 +75,41 @@ const UserWidget: FC = ({ /> )} /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> { }, activeKeywords: ['data-explorer'], }, - { - id: 'org', - testID: 'nav-item-org', - icon: IconFont.UsersTrio, - label: 'Organization', - shortLabel: 'Org', - link: { - type: 'link', - location: `${orgPrefix}/members`, - }, - cloudExclude: true, - activeKeywords: ['members', 'about'], - menu: [ - { - id: 'members', - testID: 'nav-subitem-members', - label: 'Members', - link: { - type: 'link', - location: `${orgPrefix}/members`, - }, - }, - { - id: 'about', - testID: 'nav-subitem-about', - label: 'About', - link: { - type: 'link', - location: `${orgPrefix}/about`, - }, - }, - ], - }, - { - id: 'org-quartz', - testID: 'nav-item-quartz-org', - icon: IconFont.UsersTrio, - label: 'Organization', - shortLabel: 'Org', - cloudOnly: true, - link: quartzMembersHeaderLink, - activeKeywords: ['members', 'about'], - menu: [ - { - id: 'users', - testID: 'nav-subitem-users', - label: 'Members', - featureFlag: 'multiUser', - link: { - type: 'href', - location: `${CLOUD_URL}/organizations/${orgID}${CLOUD_USERS_PATH}`, - }, - }, - { - id: 'about', - testID: 'nav-subitem-about', - label: 'About', - link: { - type: 'link', - location: `${orgPrefix}/about`, - }, - }, - ], - }, { id: 'dashboards', testID: 'nav-item-dashboards',