Skip to content

Commit

Permalink
LeftSidebar and routing check snippetService
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikMatiasko committed Aug 21, 2024
1 parent 33b9abd commit c3c260e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 43 deletions.
88 changes: 46 additions & 42 deletions http-gateway/web/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,52 +491,56 @@ export const Routes = (props: { mainSidebar: MenuConfigType }) => {
</Route>

{/* ***** DPS ***** */}
<Route path='/device-provisioning'>
{/* ***** LINKED HUBS ***** */}
<Route path='linked-hubs'>
<Route element={withSuspense(<LinkedHubsDetailPage />)} path=':hubId/:tab' />
<Route element={withSuspense(<LinkedHubsDetailPage />)} path=':hubId' />
<Route element={withSuspense(<LinkedHubsListPage />)} path='' />
{mainSidebar.deviceProvisioning === true && (
<Route path='/device-provisioning'>
{/* ***** LINKED HUBS ***** */}
<Route path='linked-hubs'>
<Route element={withSuspense(<LinkedHubsDetailPage />)} path=':hubId/:tab' />
<Route element={withSuspense(<LinkedHubsDetailPage />)} path=':hubId' />
<Route element={withSuspense(<LinkedHubsListPage />)} path='' />
</Route>

{/* ***** ENROLLMENT GROUPS ***** */}
<Route path='enrollment-groups'>
<Route element={withSuspense(<EnrollmentGroupsDetailPage />)} path=':enrollmentId' />
<Route element={withSuspense(<EnrollmentGroupsListPage />)} path='' />
</Route>

{/* ***** PROVISIONING RECORDS ***** */}
<Route path='provisioning-records'>
<Route element={withSuspense(<ProvisioningRecordsDetailPage />)} path=':recordId/:tab' />
<Route element={withSuspense(<ProvisioningRecordsDetailPage />)} path=':recordId' />
<Route element={withSuspense(<ProvisioningRecordsListPage />)} path='' />
</Route>
</Route>

{/* ***** ENROLLMENT GROUPS ***** */}
<Route path='enrollment-groups'>
<Route element={withSuspense(<EnrollmentGroupsDetailPage />)} path=':enrollmentId' />
<Route element={withSuspense(<EnrollmentGroupsListPage />)} path='' />
</Route>

{/* ***** PROVISIONING RECORDS ***** */}
<Route path='provisioning-records'>
<Route element={withSuspense(<ProvisioningRecordsDetailPage />)} path=':recordId/:tab' />
<Route element={withSuspense(<ProvisioningRecordsDetailPage />)} path=':recordId' />
<Route element={withSuspense(<ProvisioningRecordsListPage />)} path='' />
</Route>
</Route>
)}

{/* ***** SNIPPET SERVICE ***** */}
<Route path='snippet-service'>
{/* ***** RESOURCES CONFIGURATION ***** */}
<Route path='configurations'>
<Route element={withSuspense(<ConfigurationAddPage />)} path='add' />
<Route element={withSuspense(<ConfigurationDetailPage />)} path=':configurationId/:tab' />
<Route element={withSuspense(<ConfigurationDetailPage />)} path=':configurationId' />
<Route element={withSuspense(<ConfigurationListPage />)} path='' />
{mainSidebar.snippetService === true && (
<Route path='snippet-service'>
{/* ***** RESOURCES CONFIGURATION ***** */}
<Route path='configurations'>
<Route element={withSuspense(<ConfigurationAddPage />)} path='add' />
<Route element={withSuspense(<ConfigurationDetailPage />)} path=':configurationId/:tab' />
<Route element={withSuspense(<ConfigurationDetailPage />)} path=':configurationId' />
<Route element={withSuspense(<ConfigurationListPage />)} path='' />
</Route>

{/* ***** CONDITIONS ***** */}
<Route path='conditions'>
<Route element={withSuspense(<ConditionsDetailPage />)} path=':conditionId/:tab' />
<Route element={withSuspense(<ConditionsDetailPage />)} path=':conditionId' />
<Route element={withSuspense(<ConditionsListPage />)} path='' />
</Route>

{/* ***** APPLIED RESOURCES CONFIGURATION ***** */}
<Route path='applied-configurations'>
<Route element={withSuspense(<AppliedConfigurationDetailPage />)} path=':appliedConfigurationId/:tab' />
<Route element={withSuspense(<AppliedConfigurationDetailPage />)} path=':appliedConfigurationId' />
<Route element={withSuspense(<AppliedConfigurationListPage />)} path='' />
</Route>
</Route>

{/* ***** CONDITIONS ***** */}
<Route path='conditions'>
<Route element={withSuspense(<ConditionsDetailPage />)} path=':conditionId/:tab' />
<Route element={withSuspense(<ConditionsDetailPage />)} path=':conditionId' />
<Route element={withSuspense(<ConditionsListPage />)} path='' />
</Route>

{/* ***** APPLIED RESOURCES CONFIGURATION ***** */}
<Route path='applied-configurations'>
<Route element={withSuspense(<AppliedConfigurationDetailPage />)} path=':appliedConfigurationId/:tab' />
<Route element={withSuspense(<AppliedConfigurationDetailPage />)} path=':appliedConfigurationId' />
<Route element={withSuspense(<AppliedConfigurationListPage />)} path='' />
</Route>
</Route>
)}

{/* ***** API TOKENS ***** */}
{mainSidebar.apiTokens === true && (
Expand Down

0 comments on commit c3c260e

Please sign in to comment.