mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #13803 from grafana/davkal/explore-fix-resize
Explore: fix graph resize on window resize
This commit is contained in:
commit
a6fc74e35b
@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
|
|||||||
const data = this.getGraphData();
|
const data = this.getGraphData();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="panel-container">
|
||||||
|
{loading && <div className="explore-graph__loader" />}
|
||||||
{this.props.data &&
|
{this.props.data &&
|
||||||
this.props.data.length > MAX_NUMBER_OF_TIME_SERIES &&
|
this.props.data.length > MAX_NUMBER_OF_TIME_SERIES &&
|
||||||
!this.state.showAllTimeSeries && (
|
!this.state.showAllTimeSeries && (
|
||||||
@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
|
|||||||
}`}</span>
|
}`}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="panel-container">
|
|
||||||
{loading && <div className="explore-graph__loader" />}
|
|
||||||
<div id={id} className="explore-graph" style={{ height }} />
|
<div id={id} className="explore-graph" style={{ height }} />
|
||||||
<Legend data={data} />
|
<Legend data={data} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Render should render component 1`] = `
|
exports[`Render should render component 1`] = `
|
||||||
<Fragment>
|
|
||||||
<div
|
<div
|
||||||
className="panel-container"
|
className="panel-container"
|
||||||
>
|
>
|
||||||
@ -458,11 +457,12 @@ exports[`Render should render component 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Render should render component with disclaimer 1`] = `
|
exports[`Render should render component with disclaimer 1`] = `
|
||||||
<Fragment>
|
<div
|
||||||
|
className="panel-container"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="time-series-disclaimer"
|
className="time-series-disclaimer"
|
||||||
>
|
>
|
||||||
@ -477,9 +477,6 @@ exports[`Render should render component with disclaimer 1`] = `
|
|||||||
Show all 27
|
Show all 27
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
className="panel-container"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
className="explore-graph"
|
className="explore-graph"
|
||||||
id="graph"
|
id="graph"
|
||||||
@ -956,11 +953,9 @@ exports[`Render should render component with disclaimer 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Render should show query return no time series 1`] = `
|
exports[`Render should show query return no time series 1`] = `
|
||||||
<Fragment>
|
|
||||||
<div
|
<div
|
||||||
className="panel-container"
|
className="panel-container"
|
||||||
>
|
>
|
||||||
@ -977,5 +972,4 @@ exports[`Render should show query return no time series 1`] = `
|
|||||||
data={Array []}
|
data={Array []}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user