mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PluginPages: Support plugin pages that don't belong to a section (#55904)
* Fixing pages that don't exist in navtree * Fix test * fix lint warning * Fixes
This commit is contained in:
@@ -50,7 +50,7 @@ export const Page: PageType = ({
|
||||
<div className={cx(styles.wrapper, className)} {...otherProps}>
|
||||
{layout === PageLayoutType.Standard && (
|
||||
<div className={styles.panes}>
|
||||
{navModel && navModel.main.children && <SectionNav model={navModel} />}
|
||||
{navModel && <SectionNav model={navModel} />}
|
||||
<div className={styles.pageContent}>
|
||||
<CustomScrollbar autoHeightMin={'100%'} scrollTop={scrollTop} scrollRefCallback={scrollRef}>
|
||||
<div className={styles.pageInner}>
|
||||
|
@@ -13,6 +13,10 @@ export interface Props {
|
||||
export function SectionNav({ model }: Props) {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
if (!Boolean(model.main?.children?.length)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<nav className={styles.nav}>
|
||||
<CustomScrollbar showScrollIndicators>
|
||||
|
Reference in New Issue
Block a user