mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15352 from grafana/fixed-missing-graph-time-axis
Fixed missing time axis on graph due to width not being passed
This commit is contained in:
commit
ba2f698b81
@ -220,6 +220,7 @@ export class Explore extends React.PureComponent<ExploreProps> {
|
|||||||
{supportsTable && <TableContainer exploreId={exploreId} onClickCell={this.onClickLabel} />}
|
{supportsTable && <TableContainer exploreId={exploreId} onClickCell={this.onClickLabel} />}
|
||||||
{supportsLogs && (
|
{supportsLogs && (
|
||||||
<LogsContainer
|
<LogsContainer
|
||||||
|
width={width}
|
||||||
exploreId={exploreId}
|
exploreId={exploreId}
|
||||||
onChangeTime={this.onChangeTime}
|
onChangeTime={this.onChangeTime}
|
||||||
onClickLabel={this.onClickLabel}
|
onClickLabel={this.onClickLabel}
|
||||||
|
@ -51,6 +51,7 @@ function renderMetaItem(value: any, kind: LogsMetaKind) {
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data?: LogsModel;
|
data?: LogsModel;
|
||||||
|
width: number;
|
||||||
exploreId: string;
|
exploreId: string;
|
||||||
highlighterExpressions: string[];
|
highlighterExpressions: string[];
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
@ -165,6 +166,7 @@ export default class Logs extends PureComponent<Props, State> {
|
|||||||
range,
|
range,
|
||||||
scanning,
|
scanning,
|
||||||
scanRange,
|
scanRange,
|
||||||
|
width,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@ -215,6 +217,7 @@ export default class Logs extends PureComponent<Props, State> {
|
|||||||
<Graph
|
<Graph
|
||||||
data={timeSeries}
|
data={timeSeries}
|
||||||
height={100}
|
height={100}
|
||||||
|
width={width}
|
||||||
range={range}
|
range={range}
|
||||||
id={`explore-logs-graph-${exploreId}`}
|
id={`explore-logs-graph-${exploreId}`}
|
||||||
onChangeTime={this.props.onChangeTime}
|
onChangeTime={this.props.onChangeTime}
|
||||||
|
@ -25,6 +25,7 @@ interface LogsContainerProps {
|
|||||||
scanRange?: RawTimeRange;
|
scanRange?: RawTimeRange;
|
||||||
showingLogs: boolean;
|
showingLogs: boolean;
|
||||||
toggleLogs: typeof toggleLogs;
|
toggleLogs: typeof toggleLogs;
|
||||||
|
width: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LogsContainer extends PureComponent<LogsContainerProps> {
|
export class LogsContainer extends PureComponent<LogsContainerProps> {
|
||||||
@ -46,6 +47,7 @@ export class LogsContainer extends PureComponent<LogsContainerProps> {
|
|||||||
showingLogs,
|
showingLogs,
|
||||||
scanning,
|
scanning,
|
||||||
scanRange,
|
scanRange,
|
||||||
|
width,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -63,6 +65,7 @@ export class LogsContainer extends PureComponent<LogsContainerProps> {
|
|||||||
range={range}
|
range={range}
|
||||||
scanning={scanning}
|
scanning={scanning}
|
||||||
scanRange={scanRange}
|
scanRange={scanRange}
|
||||||
|
width={width}
|
||||||
/>
|
/>
|
||||||
</Panel>
|
</Panel>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user