mirror of
https://github.com/grafana/grafana.git
synced 2024-12-24 16:10:22 -06:00
Bookmarks: Lazy loading page (#96455)
This commit is contained in:
parent
09fa80a7cb
commit
b820fc0111
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -472,6 +472,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/users/ @grafana/access-squad
|
||||
/public/app/features/variables/ @grafana/dashboards-squad
|
||||
/public/app/features/preferences/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/bookmarks/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/alertlist/ @grafana/alerting-frontend
|
||||
/public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/barchart/ @grafana/dataviz-squad
|
||||
|
@ -2,14 +2,13 @@ import { css } from '@emotion/css';
|
||||
|
||||
import { GrafanaTheme2, NavModelItem } from '@grafana/data';
|
||||
import { EmptyState, useStyles2 } from '@grafana/ui';
|
||||
import { usePinnedItems } from 'app/core/components/AppChrome/MegaMenu/hooks';
|
||||
import { findByUrl } from 'app/core/components/AppChrome/MegaMenu/utils';
|
||||
import { NavLandingPageCard } from 'app/core/components/NavLandingPage/NavLandingPageCard';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { useSelector } from 'app/types';
|
||||
|
||||
import { usePinnedItems } from '../AppChrome/MegaMenu/hooks';
|
||||
import { findByUrl } from '../AppChrome/MegaMenu/utils';
|
||||
import { NavLandingPageCard } from '../NavLandingPage/NavLandingPageCard';
|
||||
|
||||
export function BookmarksPage() {
|
||||
const styles = useStyles2(getStyles);
|
||||
const pinnedItems = usePinnedItems();
|
||||
@ -63,3 +62,5 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
||||
padding: theme.spacing(2, 0),
|
||||
}),
|
||||
});
|
||||
|
||||
export default BookmarksPage;
|
@ -19,7 +19,6 @@ import { getAppPluginRoutes } from 'app/features/plugins/routes';
|
||||
import { getProfileRoutes } from 'app/features/profile/routes';
|
||||
import { AccessControlAction, DashboardRoutes } from 'app/types';
|
||||
|
||||
import { BookmarksPage } from '../core/components/Bookmarks/BookmarksPage';
|
||||
import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport';
|
||||
import { RouteDescriptor } from '../core/navigation/types';
|
||||
import { getPublicDashboardRoutes } from '../features/dashboard/routes';
|
||||
@ -530,7 +529,9 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
},
|
||||
{
|
||||
path: '/bookmarks',
|
||||
component: () => <BookmarksPage />,
|
||||
component: SafeDynamicImport(
|
||||
() => import(/* webpackChunkName: "BookmarksPage"*/ 'app/features/bookmarks/BookmarksPage')
|
||||
),
|
||||
},
|
||||
...getPluginCatalogRoutes(),
|
||||
...getSupportBundleRoutes(),
|
||||
|
Loading…
Reference in New Issue
Block a user