mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
ee73d41d24
commit
8f7e1f36ab
@ -121,7 +121,6 @@ export function TraceView(props: Props) {
|
||||
childrenHiddenIDs,
|
||||
detailStates,
|
||||
hoverIndentGuideIds,
|
||||
shouldScrollToFirstUiFindMatch: false,
|
||||
spanNameColumnWidth,
|
||||
traceID: props.traceProp?.traceID,
|
||||
}),
|
||||
@ -191,7 +190,6 @@ export function TraceView(props: Props) {
|
||||
)}
|
||||
<TraceTimelineViewer
|
||||
registerAccessors={noop}
|
||||
scrollToFirstVisibleSpan={noop}
|
||||
findMatchesIDs={config.featureToggles.newTraceViewHeader ? spanFilterMatches : spanFindMatches}
|
||||
trace={traceProp}
|
||||
datasourceType={datasourceType}
|
||||
@ -207,7 +205,6 @@ export function TraceView(props: Props) {
|
||||
expandAll={expandAll}
|
||||
expandOne={expandOne}
|
||||
childrenToggle={childrenToggle}
|
||||
clearShouldScrollToFirstUiFindMatch={noop}
|
||||
detailLogItemToggle={detailLogItemToggle}
|
||||
detailLogsToggle={detailLogsToggle}
|
||||
detailWarningsToggle={detailWarningsToggle}
|
||||
|
@ -29,7 +29,6 @@ const topOfExploreViewRef = jest.fn();
|
||||
let props = {
|
||||
childrenHiddenIDs: new Set(),
|
||||
childrenToggle: jest.fn(),
|
||||
clearShouldScrollToFirstUiFindMatch: jest.fn(),
|
||||
currentViewRangeTime: [0.25, 0.75],
|
||||
detailLogItemToggle: jest.fn(),
|
||||
detailLogsToggle: jest.fn(),
|
||||
@ -39,10 +38,8 @@ let props = {
|
||||
detailToggle: jest.fn(),
|
||||
findMatchesIDs: null,
|
||||
registerAccessors: jest.fn(),
|
||||
scrollToFirstVisibleSpan: jest.fn(),
|
||||
setSpanNameColumnWidth: jest.fn(),
|
||||
setTrace: jest.fn(),
|
||||
shouldScrollToFirstUiFindMatch: false,
|
||||
spanNameColumnWidth: 0.5,
|
||||
trace,
|
||||
uiFind: 'uiFind',
|
||||
|
@ -87,13 +87,11 @@ type TVirtualizedTraceViewOwnProps = {
|
||||
currentViewRangeTime: [number, number];
|
||||
timeZone: TimeZone;
|
||||
findMatchesIDs: Set<string> | TNil;
|
||||
scrollToFirstVisibleSpan: () => void;
|
||||
registerAccessors: (accesors: Accessors) => void;
|
||||
trace: Trace;
|
||||
spanBarOptions: SpanBarOptions | undefined;
|
||||
linksGetter: (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => TraceLink[];
|
||||
childrenToggle: (spanID: string) => void;
|
||||
clearShouldScrollToFirstUiFindMatch: () => void;
|
||||
detailLogItemToggle: (spanID: string, log: TraceLog) => void;
|
||||
detailLogsToggle: (spanID: string) => void;
|
||||
detailWarningsToggle: (spanID: string) => void;
|
||||
@ -224,14 +222,7 @@ export class UnthemedVirtualizedTraceView extends React.Component<VirtualizedTra
|
||||
let key: keyof VirtualizedTraceViewProps;
|
||||
for (key in nextProps) {
|
||||
if (nextProps[key] !== this.props[key]) {
|
||||
// Unless the only change was props.shouldScrollToFirstUiFindMatch changing to false.
|
||||
if (key === 'shouldScrollToFirstUiFindMatch') {
|
||||
if (nextProps[key]) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -240,9 +231,6 @@ export class UnthemedVirtualizedTraceView extends React.Component<VirtualizedTra
|
||||
componentDidUpdate(prevProps: Readonly<VirtualizedTraceViewProps>) {
|
||||
const { registerAccessors, trace, headerHeight } = prevProps;
|
||||
const {
|
||||
shouldScrollToFirstUiFindMatch,
|
||||
clearShouldScrollToFirstUiFindMatch,
|
||||
scrollToFirstVisibleSpan,
|
||||
registerAccessors: nextRegisterAccessors,
|
||||
setTrace,
|
||||
trace: nextTrace,
|
||||
@ -259,11 +247,6 @@ export class UnthemedVirtualizedTraceView extends React.Component<VirtualizedTra
|
||||
nextRegisterAccessors(this.getAccessors());
|
||||
}
|
||||
|
||||
if (shouldScrollToFirstUiFindMatch) {
|
||||
scrollToFirstVisibleSpan();
|
||||
clearShouldScrollToFirstUiFindMatch();
|
||||
}
|
||||
|
||||
if (focusedSpanId !== prevProps.focusedSpanId) {
|
||||
this.scrollToSpan(headerHeight, focusedSpanId);
|
||||
}
|
||||
|
@ -74,7 +74,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme2) => {
|
||||
export type TProps = TExtractUiFindFromStateReturn & {
|
||||
registerAccessors: (accessors: Accessors) => void;
|
||||
findMatchesIDs: Set<string> | TNil;
|
||||
scrollToFirstVisibleSpan: () => void;
|
||||
traceTimeline: TTraceTimeline;
|
||||
trace: Trace;
|
||||
datasourceType: string;
|
||||
@ -91,7 +90,6 @@ export type TProps = TExtractUiFindFromStateReturn & {
|
||||
expandOne: (spans: TraceSpan[]) => void;
|
||||
|
||||
childrenToggle: (spanID: string) => void;
|
||||
clearShouldScrollToFirstUiFindMatch: () => void;
|
||||
detailLogItemToggle: (spanID: string, log: TraceLog) => void;
|
||||
detailLogsToggle: (spanID: string) => void;
|
||||
detailWarningsToggle: (spanID: string) => void;
|
||||
|
@ -20,7 +20,6 @@ type TTraceTimeline = {
|
||||
childrenHiddenIDs: Set<string>;
|
||||
detailStates: Map<string, DetailState>;
|
||||
hoverIndentGuideIds: Set<string>;
|
||||
shouldScrollToFirstUiFindMatch: boolean;
|
||||
spanNameColumnWidth: number;
|
||||
traceID: string | TNil;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user