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> {
}
render() {
const { panel, dashboard, getMenuAdditional } = this.props;
const { panel, dashboard } = this.props;
const { refreshCounter, timeRange, renderCounter } = this.state;
const { datasource, targets } = panel;
const PanelComponent = this.props.component;
const panelSpecificMenuOptions = getMenuAdditional(panel);
const additionalMenuItems = panelSpecificMenuOptions.additionalMenuItems || undefined;
const additionalSubMenuItems = panelSpecificMenuOptions.additionalSubMenuItems || undefined;
console.log('panelChrome render');
return (
<div className="panel-container">
<PanelHeader title={panel.title}>
<PanelHeaderMenu
panel={panel}
dashboard={dashboard}
additionalMenuItems={additionalMenuItems}
additionalSubMenuItems={additionalSubMenuItems}
/>
<PanelHeaderMenu panel={panel} dashboard={dashboard} />
</PanelHeader>
<div className="panel-content">
<DataPanel
......
......@@ -19,7 +19,7 @@ export class PanelHeaderMenu extends PureComponent<PanelHeaderMenuProps, any> {
{menu.map((menuItem, idx: number) => {
return (
<PanelHeaderMenuItem
key={idx} // TODO: Fix proper key
key={`${menuItem.text}${idx}`}
type={menuItem.type}
text={menuItem.text}
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