mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Bring back import menu (#11007)
This commit is contained in:
parent
0d1f6119a6
commit
d992c306c2
@ -277,11 +277,6 @@ export default function MenuWrapper({ data }: MenuProps) {
|
|||||||
Manage: true,
|
Manage: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Menu items that should be ignored
|
|
||||||
const ignore = {
|
|
||||||
'Import Dashboards': true,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Cycle through menu.menu to build out cleanedMenu and settings
|
// Cycle through menu.menu to build out cleanedMenu and settings
|
||||||
const cleanedMenu: MenuObjectProps[] = [];
|
const cleanedMenu: MenuObjectProps[] = [];
|
||||||
const settings: MenuObjectProps[] = [];
|
const settings: MenuObjectProps[] = [];
|
||||||
@ -301,10 +296,7 @@ export default function MenuWrapper({ data }: MenuProps) {
|
|||||||
item.childs.forEach((child: MenuObjectChildProps | string) => {
|
item.childs.forEach((child: MenuObjectChildProps | string) => {
|
||||||
if (typeof child === 'string') {
|
if (typeof child === 'string') {
|
||||||
children.push(child);
|
children.push(child);
|
||||||
} else if (
|
} else if ((child as MenuObjectChildProps).label) {
|
||||||
(child as MenuObjectChildProps).label &&
|
|
||||||
!ignore.hasOwnProperty(child.label)
|
|
||||||
) {
|
|
||||||
children.push(child);
|
children.push(child);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user