Commit 827ffacc by Johannes Schill

Pass some panel props down as strings to trigger render #14333

parent ed034b42
......@@ -95,7 +95,16 @@ export class PanelChrome extends PureComponent<Props, State> {
return (
<div className="panel-container panel-container--absolute">
<PanelHeader panel={panel} dashboard={dashboard} timeInfo={timeInfo} />
<PanelHeader
panel={panel}
dashboard={dashboard}
timeInfo={timeInfo}
title={panel.title}
description={panel.description}
scopedVars={panel.scopedVars}
links={panel.links}
/>
<DataPanel
datasource={datasource}
queries={targets}
......
import React, { PureComponent } from 'react';
import React, { Component } from 'react';
import classNames from 'classnames';
import PanelHeaderCorner from './PanelHeaderCorner';
......@@ -12,13 +12,17 @@ export interface Props {
panel: PanelModel;
dashboard: DashboardModel;
timeInfo: string;
title?: string;
description?: string;
scopedVars?: string;
links?: [];
}
interface State {
panelMenuOpen: boolean;
}
export class PanelHeader extends PureComponent<Props, State> {
export class PanelHeader extends Component<Props, State> {
state = {
panelMenuOpen: false,
};
......@@ -44,7 +48,13 @@ export class PanelHeader extends PureComponent<Props, State> {
const { panel, dashboard, timeInfo } = this.props;
return (
<>
<PanelHeaderCorner panel={panel} />
<PanelHeaderCorner
panel={panel}
title={panel.title}
description={panel.description}
scopedVars={panel.scopedVars}
links={panel.links}
/>
<div className={panelHeaderClass}>
{isLoading && (
<span className="panel-loading">
......
......@@ -14,6 +14,10 @@ enum InfoModes {
interface Props {
panel: PanelModel;
title?: string;
description?: string;
scopedVars?: string;
links?: [];
}
export class PanelHeaderCorner extends PureComponent<Props> {
......
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