Skip to content

Commit 325148c

Browse files
committed
move out of deployment settings
1 parent f36f106 commit 325148c

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,25 @@ import {
1313
import { USERS_LINK } from "modules/navigation";
1414

1515
interface DeploymentDropdownProps {
16-
canViewAuditLog: boolean;
1716
canViewDeployment: boolean;
17+
canViewOrganizations: boolean;
1818
canViewAllUsers: boolean;
19+
canViewAuditLog: boolean;
1920
canViewHealth: boolean;
2021
}
2122

2223
export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
23-
canViewAuditLog,
2424
canViewDeployment,
25+
canViewOrganizations,
2526
canViewAllUsers,
27+
canViewAuditLog,
2628
canViewHealth,
2729
}) => {
2830
const theme = useTheme();
2931

3032
if (
3133
!canViewAuditLog &&
34+
!canViewOrganizations &&
3235
!canViewDeployment &&
3336
!canViewAllUsers &&
3437
!canViewHealth
@@ -64,9 +67,10 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
6467
}}
6568
>
6669
<DeploymentDropdownContent
67-
canViewAuditLog={canViewAuditLog}
6870
canViewDeployment={canViewDeployment}
71+
canViewOrganizations={canViewOrganizations}
6972
canViewAllUsers={canViewAllUsers}
73+
canViewAuditLog={canViewAuditLog}
7074
canViewHealth={canViewHealth}
7175
/>
7276
</PopoverContent>
@@ -75,9 +79,10 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
7579
};
7680

7781
const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
78-
canViewAuditLog,
7982
canViewDeployment,
83+
canViewOrganizations,
8084
canViewAllUsers,
85+
canViewAuditLog,
8186
canViewHealth,
8287
}) => {
8388
const popover = usePopover();
@@ -96,6 +101,16 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
96101
Settings
97102
</MenuItem>
98103
)}
104+
{canViewDeployment && (
105+
<MenuItem
106+
component={NavLink}
107+
to="/organizations"
108+
css={styles.menuItem}
109+
onClick={onPopoverClose}
110+
>
111+
Organizations
112+
</MenuItem>
113+
)}
99114
{canViewAllUsers && (
100115
<MenuItem
101116
component={NavLink}

site/src/modules/dashboard/Navbar/NavbarView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
144144

145145
<DeploymentDropdown
146146
canViewAuditLog={canViewAuditLog}
147+
canViewOrganizations
147148
canViewDeployment={canViewDeployment}
148149
canViewAllUsers={canViewAllUsers}
149150
canViewHealth={canViewHealth}

site/src/router.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,8 @@ const AddNewLicensePage = lazy(
220220
() =>
221221
import("./pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePage"),
222222
);
223-
const TeamsSettingsPage = lazy(
224-
() =>
225-
import("./pages/DeploySettingsPage/TeamsSettingsPage/TeamsSettingsPage"),
223+
const OrganizationSettingsPage = lazy(
224+
() => import("./pages/OrganizationSettingsPage/OrganizationSettingsPage"),
226225
);
227226
const TemplateEmbedPage = lazy(
228227
() => import("./pages/TemplatePage/TemplateEmbedPage/TemplateEmbedPage"),
@@ -329,11 +328,12 @@ export const router = createBrowserRouter(
329328

330329
<Route path="/audit" element={<AuditPage />} />
331330

331+
<Route path="/organizations" element={<OrganizationSettingsPage />} />
332+
332333
<Route path="/deployment" element={<DeploySettingsLayout />}>
333334
<Route path="general" element={<GeneralSettingsPage />} />
334335
<Route path="licenses" element={<LicensesSettingsPage />} />
335336
<Route path="licenses/add" element={<AddNewLicensePage />} />
336-
<Route path="teams" element={<TeamsSettingsPage />} />
337337
<Route path="security" element={<SecuritySettingsPage />} />
338338
<Route
339339
path="observability"

0 commit comments

Comments
 (0)