Commit 9c28ff8f by Johannes Schill

wip: panel-header: Remove custom menu items from panels completely

parent dd7437e9
...@@ -72,25 +72,17 @@ export class PanelChrome extends PureComponent<Props, State> { ...@@ -72,25 +72,17 @@ export class PanelChrome extends PureComponent<Props, State> {
} }
render() { render() {
const { panel, dashboard, getMenuAdditional } = this.props; const { panel, dashboard } = this.props;
const { refreshCounter, timeRange, renderCounter } = this.state; const { refreshCounter, timeRange, renderCounter } = this.state;
const { datasource, targets } = panel; const { datasource, targets } = panel;
const PanelComponent = this.props.component; const PanelComponent = this.props.component;
const panelSpecificMenuOptions = getMenuAdditional(panel);
const additionalMenuItems = panelSpecificMenuOptions.additionalMenuItems || undefined;
const additionalSubMenuItems = panelSpecificMenuOptions.additionalSubMenuItems || undefined;
console.log('panelChrome render'); console.log('panelChrome render');
return ( return (
<div className="panel-container"> <div className="panel-container">
<PanelHeader title={panel.title}> <PanelHeader title={panel.title}>
<PanelHeaderMenu <PanelHeaderMenu panel={panel} dashboard={dashboard} />
panel={panel}
dashboard={dashboard}
additionalMenuItems={additionalMenuItems}
additionalSubMenuItems={additionalSubMenuItems}
/>
</PanelHeader> </PanelHeader>
<div className="panel-content"> <div className="panel-content">
<DataPanel <DataPanel
......
...@@ -19,7 +19,7 @@ export class PanelHeaderMenu extends PureComponent<PanelHeaderMenuProps, any> { ...@@ -19,7 +19,7 @@ export class PanelHeaderMenu extends PureComponent<PanelHeaderMenuProps, any> {
{menu.map((menuItem, idx: number) => { {menu.map((menuItem, idx: number) => {
return ( return (
<PanelHeaderMenuItem <PanelHeaderMenuItem
key={idx} // TODO: Fix proper key key={`${menuItem.text}${idx}`}
type={menuItem.type} type={menuItem.type}
text={menuItem.text} text={menuItem.text}
iconClassName={menuItem.iconClassName} iconClassName={menuItem.iconClassName}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment