feat(ws): Notebooks 2.0 // Frontend // Rename settings to debug (#184)
Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
This commit is contained in:
parent
d84621aac1
commit
9a91f66972
|
@ -1,7 +1,7 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Route, Routes } from 'react-router-dom';
|
import { Route, Routes } from 'react-router-dom';
|
||||||
import { NotFound } from './pages/notFound/NotFound';
|
import { NotFound } from './pages/notFound/NotFound';
|
||||||
import { Settings } from './pages/Settings/Settings';
|
import { Debug } from './pages/Debug/Debug';
|
||||||
import { Workspaces } from './pages/Workspaces/Workspaces';
|
import { Workspaces } from './pages/Workspaces/Workspaces';
|
||||||
|
|
||||||
export const isNavDataGroup = (navItem: NavDataItem): navItem is NavDataGroup =>
|
export const isNavDataGroup = (navItem: NavDataItem): navItem is NavDataGroup =>
|
||||||
|
@ -21,7 +21,7 @@ export type NavDataGroup = NavDataCommon & {
|
||||||
|
|
||||||
type NavDataItem = NavDataHref | NavDataGroup;
|
type NavDataItem = NavDataHref | NavDataGroup;
|
||||||
|
|
||||||
export const useAdminSettings = (): NavDataItem[] => {
|
export const useAdminDebugSettings = (): NavDataItem[] => {
|
||||||
// get auth access for example set admin as true
|
// get auth access for example set admin as true
|
||||||
const isAdmin = true; //this should be a call to getting auth / role access
|
const isAdmin = true; //this should be a call to getting auth / role access
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ export const useAdminSettings = (): NavDataItem[] => {
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: 'Settings',
|
label: 'Debug',
|
||||||
children: [{ label: 'Notebooks', path: '/notebookSettings' }],
|
children: [{ label: 'Notebooks', path: '/notebookDebugSettings' }],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@ export const useNavData = (): NavDataItem[] => [
|
||||||
label: 'Notebooks',
|
label: 'Notebooks',
|
||||||
path: '/',
|
path: '/',
|
||||||
},
|
},
|
||||||
...useAdminSettings(),
|
...useAdminDebugSettings(),
|
||||||
];
|
];
|
||||||
|
|
||||||
const AppRoutes: React.FC = () => {
|
const AppRoutes: React.FC = () => {
|
||||||
|
@ -57,7 +57,7 @@ const AppRoutes: React.FC = () => {
|
||||||
{
|
{
|
||||||
// TODO: Remove the linter skip when we implement authentication
|
// TODO: Remove the linter skip when we implement authentication
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
isAdmin && <Route path="/notebookSettings/*" element={<Settings />} />
|
isAdmin && <Route path="/notebookDebugSettings/*" element={<Debug />} />
|
||||||
}
|
}
|
||||||
</Routes>
|
</Routes>
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,11 +9,11 @@ import {
|
||||||
PageSection,
|
PageSection,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
|
|
||||||
const Settings: React.FunctionComponent = () => (
|
const Debug: React.FunctionComponent = () => (
|
||||||
<PageSection>
|
<PageSection>
|
||||||
<EmptyState
|
<EmptyState
|
||||||
variant={EmptyStateVariant.full}
|
variant={EmptyStateVariant.full}
|
||||||
titleText="Empty State (Stub Settings Module)"
|
titleText="Debug page (for development only)"
|
||||||
icon={CubesIcon}
|
icon={CubesIcon}
|
||||||
>
|
>
|
||||||
<EmptyStateBody>
|
<EmptyStateBody>
|
||||||
|
@ -27,4 +27,4 @@ const Settings: React.FunctionComponent = () => (
|
||||||
</PageSection>
|
</PageSection>
|
||||||
);
|
);
|
||||||
|
|
||||||
export { Settings };
|
export { Debug };
|
Loading…
Reference in New Issue