Commit b780b637 by Torkel Ödegaard

Fixed missing time axis on graph due to width not being passed

parent 58e57a16
...@@ -220,6 +220,7 @@ export class Explore extends React.PureComponent<ExploreProps> { ...@@ -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) { ...@@ -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> { ...@@ -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> { ...@@ -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 { ...@@ -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> { ...@@ -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> { ...@@ -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>
); );
......
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