update routing

This commit is contained in:
Nate Kelley 2025-02-28 16:01:31 -07:00
parent d19de14304
commit a0355afb84
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
34 changed files with 143 additions and 186 deletions

View File

@ -1,31 +1,11 @@
import type { BusterSocketRequestBase } from '../base_interfaces';
import type {
UserColorsCreatePayload,
UserColorsUpdatePayload,
UserColorsDeletePayload,
UsersFavoritePostPayload,
UserFavoriteDeletePayload,
UserUpdateFavoritesPayload,
UserRequestUserListPayload
} from '@/api/request_interfaces/user/interfaces';
export type UserColorsList = BusterSocketRequestBase<'/users/colors/list', {}>;
export type UserColorsCreate = BusterSocketRequestBase<
'/users/colors/post',
UserColorsCreatePayload
>;
export type UserColorsUpdate = BusterSocketRequestBase<
'/users/colors/update',
UserColorsUpdatePayload
>;
export type UserColorsDelete = BusterSocketRequestBase<
'/users/colors/delete',
UserColorsDeletePayload
>;
export type UsersFavoritePost = BusterSocketRequestBase<
'/users/favorites/post',
UsersFavoritePostPayload
@ -49,10 +29,6 @@ export type UserRequestUserList = BusterSocketRequestBase<
>;
export type UserEmits =
| UserColorsList
| UserColorsCreate
| UserColorsUpdate
| UserColorsDelete
| UsersFavoritePost
| UsersFavoriteList
| UserFavoriteDelete

View File

@ -6,8 +6,6 @@ import type {
} from '@/api/asset_interfaces';
export enum UserResponses {
'/users/colors/list:listUserColorPalettes' = '/users/colors/list:listUserColorPalettes',
'/users/colors/post:createUserColorPalette' = '/users/colors/post:createUserColorPalette',
'/users/favorites/list:listFavorites' = '/users/favorites/list:listFavorites',
'/users/favorites/post:createFavorite' = '/users/favorites/post:createFavorite',
'/users/get:getUser' = '/users/get:getUser',
@ -16,12 +14,6 @@ export enum UserResponses {
'/users/list:listUsers' = '/users/list:listUsers'
}
export type UserColorsList_listUserColorPalettes = {
route: '/users/colors/list:listUserColorPalettes';
callback: (d: BusterUserPalette[]) => void;
onError?: (d: unknown) => void;
};
export type UserColorsPost_createUserColorPalette = {
route: '/users/colors/post:createUserColorPalette';
callback: (d: BusterUserPalette[]) => void;
@ -59,7 +51,6 @@ export type UserList_getUserList = {
};
export type UserResponsesTypes =
| UserColorsList_listUserColorPalettes
| UserColorsPost_createUserColorPalette
| UserFavoriteList_listFavorites
| UserFavoritesPost_createFavorite

View File

@ -1,18 +1,5 @@
import type { ShareAssetType } from '@/api/asset_interfaces';
export interface UserColorsCreatePayload {
color_palette: string[];
}
export interface UserColorsUpdatePayload {
id: string;
color_palette: string[];
}
export interface UserColorsDeletePayload {
id: string;
}
export interface UsersFavoritePostPayload {
id: string;
asset_type: ShareAssetType;

View File

@ -0,0 +1,5 @@
import React from 'react';
export default function HomePage() {
return <div>HomePage TODO:</div>;
}

View File

@ -1,13 +1,13 @@
import { AppLayout } from '@/components/ui/layouts/AppLayout';
import { getAppSplitterLayout } from '@/components/ui/layouts/AppSplitter';
import { SettingsSidebar } from '@/controllers/Sidebars/SettingsSidebar';
import { SidebarSettings } from '@/components/features/sidebars/SidebarSettings';
import React from 'react';
export default async function Layout({ children }: { children: React.ReactNode }) {
const defaultLayout = await getAppSplitterLayout('app-layout', ['230px', 'auto']);
return (
<AppLayout defaultLayout={defaultLayout} sidebar={<SettingsSidebar />}>
<AppLayout defaultLayout={defaultLayout} sidebar={<SidebarSettings />}>
{children}
</AppLayout>
);

View File

@ -9,7 +9,7 @@ export default async function Layout({ children }: { children: React.ReactNode }
if (!isAdmin) {
return redirect(
createBusterRoute({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})
);
}

View File

@ -29,7 +29,7 @@ export const ListPermissionGroupsComponent: React.FC<{
id: permissionGroup.id,
data: permissionGroup,
link: createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_USERS,
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_USERS,
permissionGroupId: permissionGroup.id
})
};

View File

@ -14,10 +14,10 @@ export enum PermissionSegmentsApps {
}
const RouteToAppSegment: Record<string, PermissionSegmentsApps> = {
[BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_USERS]: PermissionSegmentsApps.USERS,
[BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS]:
[BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_USERS]: PermissionSegmentsApps.USERS,
[BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS]:
PermissionSegmentsApps.DATASET_GROUPS,
[BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS]: PermissionSegmentsApps.DATASETS
[BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS]: PermissionSegmentsApps.DATASETS
};
export const PermissionAppSegments: React.FC<{
@ -33,7 +33,7 @@ export const PermissionAppSegments: React.FC<{
label: 'Users',
value: PermissionSegmentsApps.USERS,
link: createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_USERS,
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_USERS,
permissionGroupId
})
},
@ -41,7 +41,7 @@ export const PermissionAppSegments: React.FC<{
label: 'Dataset groups',
value: PermissionSegmentsApps.DATASET_GROUPS,
link: createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS,
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS,
permissionGroupId
})
},
@ -49,7 +49,7 @@ export const PermissionAppSegments: React.FC<{
label: 'Datasets',
value: PermissionSegmentsApps.DATASETS,
link: createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS,
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS,
permissionGroupId
})
}

View File

@ -2,8 +2,7 @@ import { BackButton } from '@/components/ui/buttons/BackButton';
import { createBusterRoute, BusterRoutes } from '@/routes/busterRoutes';
export const PermissionGroupBackButton = ({}: {}) => {
const route = createBusterRoute({ route: BusterRoutes.SETTINGS_PERMISSION_GROUPS });
const route = createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS });
const text = 'Permission groups';
return <BackButton text={text} linkUrl={route} />;
};

View File

@ -72,7 +72,7 @@ export const UserPermissionGroupsListContainer: React.FC<{
id: permissionGroup.id,
data: permissionGroup,
link: createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS,
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS,
permissionGroupId: permissionGroup.id
})
};

View File

@ -10,7 +10,7 @@ export default async function Page() {
if (!isAdmin) {
return redirect(
createBusterRoute({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})
);
}

View File

@ -82,7 +82,7 @@ export const DataSourceFormContent: React.FC<{
content: 'You can now use this data source to create data sets.',
onOk: () => {
onChangePage({
route: BusterRoutes.SETTINGS_DATASOURCES_ID,
route: BusterRoutes.APP_SETTINGS_DATASOURCES_ID,
datasourceId: res.id
});
},

View File

@ -14,7 +14,7 @@ export default function Page({
<HeaderContainer
buttonText="Datasources"
linkUrl={createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES
route: BusterRoutes.APP_SETTINGS_DATASOURCES
})}
/>
<DatasourceForm datasourceId={datasourceId} />

View File

@ -20,7 +20,7 @@ export default function Page() {
const linkUrl = selectedDataSource
? ''
: createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES
route: BusterRoutes.APP_SETTINGS_DATASOURCES
});
return (

View File

@ -9,7 +9,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
if (!isAdmin) {
return redirect(
createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES
route: BusterRoutes.APP_SETTINGS_DATASOURCES
})
);
}

View File

@ -47,7 +47,7 @@ export const DatasourceList: React.FC = () => {
buttonIcon={<AppMaterialIcons icon="add" />}
buttonAction={() =>
onChangePage({
route: BusterRoutes.SETTINGS_DATASOURCES_ADD
route: BusterRoutes.APP_SETTINGS_DATASOURCES_ADD
})
}
/>
@ -62,7 +62,7 @@ const AddSourceHeader: React.FC<{ isAdmin: boolean }> = ({ isAdmin }) => {
<Text>Your data sources</Text>
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES_ADD
route: BusterRoutes.APP_SETTINGS_DATASOURCES_ADD
})}>
{isAdmin && (
<Button type="text" icon={<AppMaterialIcons icon="add" />}>
@ -116,7 +116,7 @@ const ListItem: React.FC<{
return (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES_ID,
route: BusterRoutes.APP_SETTINGS_DATASOURCES_ID,
datasourceId: source.id
})}
key={source.id}>

View File

@ -1,12 +0,0 @@
import { SettingsEmptyState } from '../../_components/SettingsEmptyState';
import { SettingsPageHeader } from '../../_components/SettingsPageHeader';
export default function Page() {
return (
<div>
<SettingsPageHeader title="General" description="Manage your workspace details & settings" />
<SettingsEmptyState />
</div>
);
}

View File

@ -4,7 +4,7 @@ import { permanentRedirect } from 'next/navigation';
export default function Page() {
return permanentRedirect(
createBusterRoute({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})
);
}

View File

@ -6,7 +6,7 @@ import { BusterRoutes, createBusterRoute } from '@/routes';
export default function SettingsPage() {
return permanentRedirect(
createBusterRoute({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})
);
}

View File

@ -2,8 +2,6 @@
import { useSupabaseServerContext } from '@/context/Supabase/useSupabaseContext';
import React from 'react';
import { getAppSplitterLayout } from '@/components/ui/layouts/AppSplitter';
import { useBusterSupabaseAuthMethods } from '@/hooks/useBusterSupabaseAuthMethods';
import { createBusterRoute } from '@/routes';
import { BusterAppRoutes } from '@/routes/busterRoutes/busterAppRoutes';
import { headers, cookies } from 'next/headers';

View File

@ -54,7 +54,7 @@ export const NewDatasetModal: React.FC<{
});
const onAddDataSourceClick = useMemoizedFn(() => {
router.push(createBusterRoute({ route: BusterRoutes.SETTINGS_DATASOURCES_ADD }));
router.push(createBusterRoute({ route: BusterRoutes.APP_SETTINGS_DATASOURCES_ADD }));
setTimeout(() => {
onClose();
}, 450);

View File

@ -134,12 +134,12 @@ const SidebarPrimaryHeader = React.memo(() => {
<BusterLogoWithText />
<div className="flex items-center gap-2">
<Tooltip title="Settings">
<Link href={createBusterRoute({ route: BusterRoutes.SETTINGS_GENERAL })}>
<Link href={createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PROFILE })}>
<Button prefix={<Gear />} variant="ghost" />
</Link>
</Tooltip>
<Tooltip title="Start a chat">
<Link href={createBusterRoute({ route: BusterRoutes.SETTINGS_GENERAL })}>
<Link href={createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PROFILE })}>
<Button
size="tall"
rounding={'large'}

View File

@ -1,8 +1,12 @@
'use client';
import { BackButton } from '@/components/ui/buttons';
import { type ISidebarGroup, Sidebar } from '@/components/ui/sidebar';
import { CircleUser, LockCircle } from '@/components/ui/icons';
import { CircleUser, LockCircle, ApartmentBuilding } from '@/components/ui/icons';
import { BusterRoutes, createBusterRoute } from '@/routes';
import React, { useMemo } from 'react';
import { useUserConfigContextSelector } from '@/context/Users';
import { useAppLayoutContextSelector } from '@/context/BusterAppLayout';
const accountItems: ISidebarGroup = {
label: 'Account',
@ -11,12 +15,25 @@ const accountItems: ISidebarGroup = {
items: [
{
label: 'Profile',
route: createBusterRoute({ route: BusterRoutes.SETTINGS_PROFILE }),
route: createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PROFILE }),
id: 'profile'
}
]
};
const workspaceItems: ISidebarGroup = {
label: 'Workspace',
variant: 'icon',
icon: <ApartmentBuilding />,
items: [
{
label: 'API Keys',
route: createBusterRoute({ route: BusterRoutes.APP_SETTINGS_API_KEYS }),
id: createBusterRoute({ route: BusterRoutes.APP_SETTINGS_API_KEYS })
}
]
};
const permissionAndSecurityItems: ISidebarGroup = {
label: 'Permission & Security',
variant: 'icon',
@ -34,25 +51,26 @@ const permissionAndSecurityItems: ISidebarGroup = {
},
{
label: 'Permission groups',
route: createBusterRoute({ route: BusterRoutes.SETTINGS_PERMISSION_GROUPS }),
id: createBusterRoute({ route: BusterRoutes.SETTINGS_PERMISSION_GROUPS })
route: createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS }),
id: createBusterRoute({ route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS })
}
]
};
export const SidebarSettings: React.FC<{
activePage: string;
isAdmin: boolean;
}> = React.memo(({ activePage, isAdmin }) => {
export const SidebarSettings: React.FC<{}> = React.memo(({}) => {
const isAdmin = useUserConfigContextSelector((x) => x.isAdmin);
const currentRoute = useAppLayoutContextSelector((x) => x.currentRoute);
const content = useMemo(() => {
const items = [accountItems];
if (isAdmin) {
items.push(workspaceItems);
items.push(permissionAndSecurityItems);
}
return items;
}, [isAdmin]);
return <Sidebar content={content} header={<SidebarSettingsHeader />} activeItem={activePage} />;
return <Sidebar content={content} header={<SidebarSettingsHeader />} activeItem={currentRoute} />;
});
SidebarSettings.displayName = 'SidebarSettings';

View File

@ -46,7 +46,7 @@ export const CustomActiveIndex: Story = {
items: [
{ label: 'Home', route: { route: BusterAppRoutes.APP_ROOT } },
{ label: 'Datasets', route: { route: BusterAppRoutes.APP_DATASETS } },
{ label: 'Settings', route: { route: BusterAppRoutes.SETTINGS_GENERAL } },
{ label: 'Settings', route: { route: BusterAppRoutes.APP_SETTINGS_PROFILE } },
{ label: 'Profile' }
],
activeIndex: 2

View File

@ -29,7 +29,7 @@ const mockItems = [
id: '2',
label: 'Profile',
icon: <WindowUser />,
route: BusterRoutes.SETTINGS_PROFILE
route: BusterRoutes.APP_SETTINGS_PROFILE
},
{
id: '3',
@ -46,13 +46,13 @@ const mockGroupedContent = [
id: '4',
label: 'Notifications',
icon: <WindowAlert width="1.25em" height="1.25em" />,
route: BusterRoutes.SETTINGS_NOTIFICATIONS
route: BusterRoutes.APP_SETTINGS_NOTIFICATIONS
},
{
id: '5',
label: 'Notifications',
icon: <WindowAlert width="1.25em" height="1.25em" />,
route: BusterRoutes.SETTINGS_NOTIFICATIONS
route: BusterRoutes.APP_SETTINGS_NOTIFICATIONS
}
]
},
@ -132,7 +132,7 @@ export const ScrollAndTruncationTest: Story = {
label:
'Another very long label that contains some technical terms like Implementation Documentation Requirements',
icon: <WindowUser width="1.25em" height="1.25em" />,
route: BusterRoutes.SETTINGS_PROFILE
route: BusterRoutes.APP_SETTINGS_PROFILE
},
...Array(30)
.fill(null)
@ -140,7 +140,7 @@ export const ScrollAndTruncationTest: Story = {
id: `long-${i + 3}`,
label: `Somewhat Long Menu Item ${i + 1} with Additional Description Text`,
icon: <WindowAlert width="1.25em" height="1.25em" />,
route: BusterRoutes.SETTINGS_NOTIFICATIONS
route: BusterRoutes.APP_SETTINGS_NOTIFICATIONS
}))
]
}

View File

@ -18,7 +18,7 @@ const SidebarTrigger: React.FC<SidebarTriggerProps> = React.memo(({ label, isOpe
return (
<div
className={cn(
'flex items-center gap-1 rounded px-1.5 py-1 text-sm transition-colors',
'flex items-center gap-1 rounded px-1.5 py-1 text-base transition-colors',
'text-text-secondary hover:bg-nav-item-hover',
'group cursor-pointer'
)}>
@ -54,14 +54,12 @@ export const SidebarCollapsible: React.FC<ISidebarGroup & { activeItem?: string
{variant === 'icon' && (
<div
className={cn(
'flex items-center gap-1 rounded px-1.5 py-1 text-sm',
'flex items-center space-x-2.5 px-1.5 py-1 text-base',
'text-text-secondary'
)}>
<div className="flex items-center space-x-2.5">
{icon && <span className="text-icon-color text-icon-size">{icon}</span>}
<span className="">{label}</span>
</div>
</div>
)}
<CollapsibleContent className="data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up pl-0">

View File

@ -24,7 +24,7 @@ export const BusterReactQueryProvider = ({ children }: { children: React.ReactEl
return (
<QueryClientProvider client={queryClient}>
{children}
<ReactQueryDevtoolsPanel />
{/* <ReactQueryDevtoolsPanel /> */}
</QueryClientProvider>
);
};

View File

@ -42,7 +42,7 @@ export const useDatasourceCreate = () => {
}).then(() => {
if (goToPage) {
onChangePage({
route: BusterRoutes.SETTINGS_DATASOURCES
route: BusterRoutes.APP_SETTINGS_DATASOURCES
});
}
});

View File

@ -10,7 +10,6 @@ const PRIORITY_ROUTES = [
BusterAppRoutes.APP_DASHBOARDS,
BusterAppRoutes.APP_METRIC,
BusterAppRoutes.APP_DATASETS,
BusterAppRoutes.SETTINGS_GENERAL,
BusterAppRoutes.APP_DASHBOARD_METRICS_ID,
BusterAppRoutes.APP_DASHBOARD_ID,
BusterAppRoutes.APP_CHAT_ID,

View File

@ -48,7 +48,7 @@ export const AppSidebar: React.FC<{
const onGoToSettingPage = useMemoizedFn(() => {
onChangePage({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
});
});

View File

@ -17,33 +17,33 @@ type MenuItem = Required<MenuProps>['items'][number];
const accountItems: MenuItem[] = [
{
key: BusterRoutes.SETTINGS_PROFILE,
key: BusterRoutes.APP_SETTINGS_PROFILE,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_PROFILE
route: BusterRoutes.APP_SETTINGS_PROFILE
})}>
Profile
</Link>
)
},
{
key: BusterRoutes.SETTINGS_PREFERENCES,
key: BusterRoutes.APP_SETTINGS_PREFERENCES,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_PREFERENCES
route: BusterRoutes.APP_SETTINGS_PREFERENCES
})}>
Preferences
</Link>
)
},
{
key: BusterRoutes.SETTINGS_NOTIFICATIONS,
key: BusterRoutes.APP_SETTINGS_NOTIFICATIONS,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_NOTIFICATIONS
route: BusterRoutes.APP_SETTINGS_NOTIFICATIONS
})}>
Notifications
</Link>
@ -86,11 +86,11 @@ const permissionsAndSecurityItems: MenuItem[] = [
)
},
{
key: BusterRoutes.SETTINGS_PERMISSION_GROUPS,
key: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_PERMISSION_GROUPS
route: BusterRoutes.APP_SETTINGS_PERMISSION_GROUPS
})}>
Permission Groups
</Link>
@ -152,13 +152,13 @@ export const AppSidebarSettings: React.FC<{
() => [
...userTeams.map((team) => ({
key: createBusterRoute({
route: BusterRoutes.SETTINGS_TEAM_ID,
route: BusterRoutes.APP_SETTINGS_TEAM_ID,
teamId: team.id
}),
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_TEAM_ID,
route: BusterRoutes.APP_SETTINGS_TEAM_ID,
teamId: team.id
})}>
{team.name}
@ -182,55 +182,55 @@ export const AppSidebarSettings: React.FC<{
() =>
[
{
key: BusterRoutes.SETTINGS_GENERAL,
key: BusterRoutes.APP_SETTINGS_PROFILE,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})}>
General
</Link>
)
},
{
key: BusterRoutes.SETTINGS_STORAGE,
key: BusterRoutes.APP_SETTINGS_STORAGE,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_STORAGE
route: BusterRoutes.APP_SETTINGS_STORAGE
})}>
Storage
</Link>
)
},
{
key: BusterRoutes.SETTINGS_DATASOURCES,
key: BusterRoutes.APP_SETTINGS_DATASOURCES,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_DATASOURCES
route: BusterRoutes.APP_SETTINGS_DATASOURCES
})}>
Data Sources
</Link>
)
},
{
key: BusterRoutes.SETTINGS_INTEGRATIONS,
key: BusterRoutes.APP_SETTINGS_INTEGRATIONS,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_INTEGRATIONS
route: BusterRoutes.APP_SETTINGS_INTEGRATIONS
})}>
Integrations
</Link>
)
},
{
key: BusterRoutes.SETTINGS_API_KEYS,
key: BusterRoutes.APP_SETTINGS_API_KEYS,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_API_KEYS
route: BusterRoutes.APP_SETTINGS_API_KEYS
})}>
API Keys
</Link>
@ -238,11 +238,11 @@ export const AppSidebarSettings: React.FC<{
hidden: !isAdmin
},
{
key: BusterRoutes.SETTINGS_EMBEDS,
key: BusterRoutes.APP_SETTINGS_EMBEDS,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_EMBEDS
route: BusterRoutes.APP_SETTINGS_EMBEDS
})}>
Embedded Analytics
</Link>
@ -250,11 +250,11 @@ export const AppSidebarSettings: React.FC<{
hidden: !isAdmin
},
{
key: BusterRoutes.SETTINGS_BILLING,
key: BusterRoutes.APP_SETTINGS_BILLING,
label: (
<Link
href={createBusterRoute({
route: BusterRoutes.SETTINGS_BILLING
route: BusterRoutes.APP_SETTINGS_BILLING
})}>
Billing
</Link>

View File

@ -79,7 +79,7 @@ const AppSidebarButton = React.memo(
<div className="flex items-center space-x-2.5">
<Link
href={createPageLink({
route: BusterRoutes.SETTINGS_GENERAL
route: BusterRoutes.APP_SETTINGS_PROFILE
})}>
<AppTooltip title="Settings" shortcuts={['G', 'S']}>
<Button

View File

@ -1,7 +0,0 @@
'use client';
import React from 'react';
export const SettingsSidebar: React.FC<{}> = () => {
return <div>SettingsSidebar</div>;
};

View File

@ -35,25 +35,24 @@ export enum BusterAppRoutes {
APP_CHAT_ID_VALUE_ID = '/app/chats/:chatId/value/:valueId',
APP_VALUE_ID = '/app/value/:valueId',
SETTINGS = '/app/settings',
SETTINGS_GENERAL = '/app/settings/general',
SETTINGS_PERMISSIONS = '/app/settings/permissions',
SETTINGS_STORAGE = '/app/settings/storage',
SETTINGS_DATASOURCES = '/app/settings/datasources',
SETTINGS_DATASOURCES_ID = '/app/settings/datasources/:datasourceId',
SETTINGS_DATASOURCES_ADD = '/app/settings/datasources/add',
SETTINGS_INTEGRATIONS = '/app/settings/integrations',
SETTINGS_PERMISSION_GROUPS = '/app/settings/permission-groups',
SETTINGS_PERMISSION_GROUPS_ID_USERS = '/app/settings/permission-groups/:permissionGroupId/users',
SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS = '/app/settings/permission-groups/:permissionGroupId/dataset-groups',
SETTINGS_PERMISSION_GROUPS_ID_DATASETS = '/app/settings/permission-groups/:permissionGroupId/datasets',
SETTINGS_API_KEYS = '/app/settings/api-keys',
SETTINGS_EMBEDS = '/app/settings/embeds',
SETTINGS_BILLING = '/app/settings/billing',
SETTINGS_PROFILE = '/app/settings/profile',
SETTINGS_PREFERENCES = '/app/settings/preferences',
SETTINGS_NOTIFICATIONS = '/app/settings/notifications',
SETTINGS_TEAM_ID = '/app/settings/team/:teamId',
APP_SETTINGS = '/app/settings',
APP_SETTINGS_PERMISSIONS = '/app/settings/permissions',
APP_SETTINGS_STORAGE = '/app/settings/storage',
APP_SETTINGS_DATASOURCES = '/app/settings/datasources',
APP_SETTINGS_DATASOURCES_ID = '/app/settings/datasources/:datasourceId',
APP_SETTINGS_DATASOURCES_ADD = '/app/settings/datasources/add',
APP_SETTINGS_INTEGRATIONS = '/app/settings/integrations',
APP_SETTINGS_PERMISSION_GROUPS = '/app/settings/permission-groups',
APP_SETTINGS_PERMISSION_GROUPS_ID_USERS = '/app/settings/permission-groups/:permissionGroupId/users',
APP_SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS = '/app/settings/permission-groups/:permissionGroupId/dataset-groups',
APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS = '/app/settings/permission-groups/:permissionGroupId/datasets',
APP_SETTINGS_API_KEYS = '/app/settings/api-keys',
APP_SETTINGS_EMBEDS = '/app/settings/embeds',
APP_SETTINGS_BILLING = '/app/settings/billing',
APP_SETTINGS_PROFILE = '/app/settings/profile',
APP_SETTINGS_PREFERENCES = '/app/settings/preferences',
APP_SETTINGS_NOTIFICATIONS = '/app/settings/notifications',
APP_SETTINGS_TEAM_ID = '/app/settings/team/:teamId',
APP_SETTINGS_USERS = '/app/settings/users',
APP_SETTINGS_USERS_ID = '/app/settings/users/:userId',
APP_SETTINGS_USERS_ID_PERMISSION_GROUPS = '/app/settings/users/:userId/permission-groups',
@ -97,39 +96,45 @@ export type BusterAppRoutesWithArgs = {
};
[BusterAppRoutes.APP_DATASETS]: { route: BusterAppRoutes.APP_DATASETS };
[BusterAppRoutes.APP_TERMS]: { route: BusterAppRoutes.APP_TERMS };
[BusterAppRoutes.SETTINGS]: { route: BusterAppRoutes.SETTINGS };
[BusterAppRoutes.SETTINGS_GENERAL]: { route: BusterAppRoutes.SETTINGS_GENERAL };
[BusterAppRoutes.SETTINGS_PERMISSIONS]: { route: BusterAppRoutes.SETTINGS_PERMISSIONS };
[BusterAppRoutes.SETTINGS_STORAGE]: { route: BusterAppRoutes.SETTINGS_STORAGE };
[BusterAppRoutes.SETTINGS_DATASOURCES]: { route: BusterAppRoutes.SETTINGS_DATASOURCES };
[BusterAppRoutes.SETTINGS_INTEGRATIONS]: { route: BusterAppRoutes.SETTINGS_INTEGRATIONS };
[BusterAppRoutes.SETTINGS_PERMISSION_GROUPS]: {
route: BusterAppRoutes.SETTINGS_PERMISSION_GROUPS;
[BusterAppRoutes.APP_SETTINGS]: { route: BusterAppRoutes.APP_SETTINGS };
[BusterAppRoutes.APP_SETTINGS_PERMISSIONS]: { route: BusterAppRoutes.APP_SETTINGS_PERMISSIONS };
[BusterAppRoutes.APP_SETTINGS_STORAGE]: { route: BusterAppRoutes.APP_SETTINGS_STORAGE };
[BusterAppRoutes.APP_SETTINGS_DATASOURCES]: { route: BusterAppRoutes.APP_SETTINGS_DATASOURCES };
[BusterAppRoutes.APP_SETTINGS_INTEGRATIONS]: { route: BusterAppRoutes.APP_SETTINGS_INTEGRATIONS };
[BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS]: {
route: BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS;
};
[BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_USERS]: {
route: BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_USERS;
[BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_USERS]: {
route: BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_USERS;
permissionGroupId: string;
};
[BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS]: {
route: BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS;
[BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS]: {
route: BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASET_GROUPS;
permissionGroupId: string;
};
[BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS]: {
route: BusterAppRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS;
[BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS]: {
route: BusterAppRoutes.APP_SETTINGS_PERMISSION_GROUPS_ID_DATASETS;
permissionGroupId: string;
};
[BusterAppRoutes.SETTINGS_API_KEYS]: { route: BusterAppRoutes.SETTINGS_API_KEYS };
[BusterAppRoutes.SETTINGS_EMBEDS]: { route: BusterAppRoutes.SETTINGS_EMBEDS };
[BusterAppRoutes.SETTINGS_BILLING]: { route: BusterAppRoutes.SETTINGS_BILLING };
[BusterAppRoutes.SETTINGS_PROFILE]: { route: BusterAppRoutes.SETTINGS_PROFILE };
[BusterAppRoutes.SETTINGS_PREFERENCES]: { route: BusterAppRoutes.SETTINGS_PREFERENCES };
[BusterAppRoutes.SETTINGS_NOTIFICATIONS]: { route: BusterAppRoutes.SETTINGS_NOTIFICATIONS };
[BusterAppRoutes.SETTINGS_TEAM_ID]: { route: BusterAppRoutes.SETTINGS_TEAM_ID; teamId: string };
[BusterAppRoutes.SETTINGS_DATASOURCES_ID]: {
route: BusterAppRoutes.SETTINGS_DATASOURCES_ID;
[BusterAppRoutes.APP_SETTINGS_API_KEYS]: { route: BusterAppRoutes.APP_SETTINGS_API_KEYS };
[BusterAppRoutes.APP_SETTINGS_EMBEDS]: { route: BusterAppRoutes.APP_SETTINGS_EMBEDS };
[BusterAppRoutes.APP_SETTINGS_BILLING]: { route: BusterAppRoutes.APP_SETTINGS_BILLING };
[BusterAppRoutes.APP_SETTINGS_PROFILE]: { route: BusterAppRoutes.APP_SETTINGS_PROFILE };
[BusterAppRoutes.APP_SETTINGS_PREFERENCES]: { route: BusterAppRoutes.APP_SETTINGS_PREFERENCES };
[BusterAppRoutes.APP_SETTINGS_NOTIFICATIONS]: {
route: BusterAppRoutes.APP_SETTINGS_NOTIFICATIONS;
};
[BusterAppRoutes.APP_SETTINGS_TEAM_ID]: {
route: BusterAppRoutes.APP_SETTINGS_TEAM_ID;
teamId: string;
};
[BusterAppRoutes.APP_SETTINGS_DATASOURCES_ID]: {
route: BusterAppRoutes.APP_SETTINGS_DATASOURCES_ID;
datasourceId: string;
};
[BusterAppRoutes.SETTINGS_DATASOURCES_ADD]: { route: BusterAppRoutes.SETTINGS_DATASOURCES_ADD };
[BusterAppRoutes.APP_SETTINGS_DATASOURCES_ADD]: {
route: BusterAppRoutes.APP_SETTINGS_DATASOURCES_ADD;
};
[BusterAppRoutes.APP_DATASETS_ID]: { route: BusterAppRoutes.APP_DATASETS_ID; datasetId: string };
[BusterAppRoutes.APP_LOGS]: { route: BusterAppRoutes.APP_LOGS };
[BusterAppRoutes.APP_TERMS_ID]: { route: BusterAppRoutes.APP_TERMS_ID; termId: string };