Add handlers to handle time range changes to Explore graphs (#39142)

This commit is contained in:
Piotr Jamróz 2021-09-13 18:04:46 +02:00 committed by GitHub
parent ca53f5c8da
commit 0026162845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,7 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
height={400} height={400}
width={width - spacing} width={width - spacing}
absoluteRange={absoluteRange} absoluteRange={absoluteRange}
onChangeTime={this.onUpdateTimeRange}
timeZone={timeZone} timeZone={timeZone}
annotations={queryResponse.annotations} annotations={queryResponse.annotations}
splitOpenFn={splitOpen} splitOpenFn={splitOpen}

View File

@ -46,6 +46,7 @@ interface Props {
onHiddenSeriesChanged?: (hiddenSeries: string[]) => void; onHiddenSeriesChanged?: (hiddenSeries: string[]) => void;
tooltipDisplayMode?: TooltipDisplayMode; tooltipDisplayMode?: TooltipDisplayMode;
splitOpenFn?: SplitOpen; splitOpenFn?: SplitOpen;
onChangeTime: (timeRange: AbsoluteTimeRange) => void;
} }
export function ExploreGraph({ export function ExploreGraph({
@ -54,6 +55,7 @@ export function ExploreGraph({
width, width,
timeZone, timeZone,
absoluteRange, absoluteRange,
onChangeTime,
loadingState, loadingState,
annotations, annotations,
onHiddenSeriesChanged, onHiddenSeriesChanged,
@ -154,6 +156,7 @@ export function ExploreGraph({
title="" title=""
width={width} width={width}
height={height} height={height}
onChangeTimeRange={onChangeTime}
options={ options={
{ {
tooltip: { mode: tooltipDisplayMode }, tooltip: { mode: tooltipDisplayMode },

View File

@ -308,6 +308,7 @@ export class UnthemedLogs extends PureComponent<Props, State> {
absoluteRange={visibleRange || absoluteRange} absoluteRange={visibleRange || absoluteRange}
timeZone={timeZone} timeZone={timeZone}
loadingState={loadingState} loadingState={loadingState}
onChangeTime={onChangeTime}
onHiddenSeriesChanged={this.onToggleLogLevel} onHiddenSeriesChanged={this.onToggleLogLevel}
/> />
) : undefined} ) : undefined}