Commit db21551d by Torkel Ödegaard Committed by GitHub

Merge pull request #15481 from grafana/react-panel-header-issue

Fixed issue with PanelHeader and grid-drag-handle in fullscreen
parents 2d5fd7fd 89ad5259
......@@ -131,10 +131,10 @@ export class DashboardPanel extends PureComponent<Props, State> {
};
renderReactPanel() {
const { dashboard, panel } = this.props;
const { dashboard, panel, isFullscreen } = this.props;
const { plugin } = this.state;
return <PanelChrome plugin={plugin} panel={panel} dashboard={dashboard} />;
return <PanelChrome plugin={plugin} panel={panel} dashboard={dashboard} isFullscreen={isFullscreen} />;
}
renderAngularPanel() {
......
......@@ -29,6 +29,7 @@ export interface Props {
panel: PanelModel;
dashboard: DashboardModel;
plugin: PanelPlugin;
isFullscreen: boolean;
}
export interface State {
......@@ -193,7 +194,7 @@ export class PanelChrome extends PureComponent<Props, State> {
};
render() {
const { dashboard, panel } = this.props;
const { dashboard, panel, isFullscreen } = this.props;
const { errorMessage, timeInfo } = this.state;
const { transparent } = panel;
......@@ -216,6 +217,7 @@ export class PanelChrome extends PureComponent<Props, State> {
scopedVars={panel.scopedVars}
links={panel.links}
error={errorMessage}
isFullscreen={isFullscreen}
/>
<ErrorBoundary>
{({ error, errorInfo }) => {
......
......@@ -19,6 +19,7 @@ export interface Props {
scopedVars?: string;
links?: [];
error?: string;
isFullscreen: boolean;
}
interface ClickCoordinates {
......@@ -69,10 +70,9 @@ export class PanelHeader extends Component<Props, State> {
};
render() {
const isFullscreen = false;
const isLoading = false;
const { panel, dashboard, timeInfo, scopedVars, error, isFullscreen } = this.props;
const panelHeaderClass = classNames({ 'panel-header': true, 'grid-drag-handle': !isFullscreen });
const { panel, dashboard, timeInfo, scopedVars, error } = this.props;
const title = templateSrv.replaceWithText(panel.title, scopedVars);
return (
......@@ -86,11 +86,6 @@ export class PanelHeader extends Component<Props, State> {
error={error}
/>
<div className={panelHeaderClass}>
{isLoading && (
<span className="panel-loading">
<i className="fa fa-spinner fa-spin" />
</span>
)}
<div className="panel-title-container" onClick={this.onMenuToggle} onMouseDown={this.onMouseDown}>
<div className="panel-title">
<span className="icon-gf panel-alert-icon" />
......
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