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}
width={width - spacing}
absoluteRange={absoluteRange}
onChangeTime={this.onUpdateTimeRange}
timeZone={timeZone}
annotations={queryResponse.annotations}
splitOpenFn={splitOpen}

View File

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

View File

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