logs: context: removed unused code (#69392)

This commit is contained in:
Gábor Farkas 2023-06-01 17:23:30 +02:00 committed by GitHub
parent 28bb960e42
commit 4cbe20ca5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 19 deletions

View File

@ -537,7 +537,6 @@ class UnthemedLogs extends PureComponent<Props, State> {
logRows={logRows} logRows={logRows}
deduplicatedRows={dedupedRows} deduplicatedRows={dedupedRows}
dedupStrategy={dedupStrategy} dedupStrategy={dedupStrategy}
getRowContext={getRowContext}
onClickFilterLabel={onClickFilterLabel} onClickFilterLabel={onClickFilterLabel}
onClickFilterOutLabel={onClickFilterOutLabel} onClickFilterOutLabel={onClickFilterOutLabel}
showContextToggle={showContextToggle} showContextToggle={showContextToggle}

View File

@ -2,17 +2,7 @@ import { cx } from '@emotion/css';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { import { Field, LinkModel, LogRowModel, LogsSortOrder, dateTimeFormat, CoreApp, DataFrame } from '@grafana/data';
Field,
LinkModel,
LogRowModel,
LogsSortOrder,
DataQueryResponse,
dateTimeFormat,
CoreApp,
DataFrame,
LogRowContextOptions,
} from '@grafana/data';
import { reportInteraction } from '@grafana/runtime'; import { reportInteraction } from '@grafana/runtime';
import { TimeZone } from '@grafana/schema'; import { TimeZone } from '@grafana/schema';
import { withTheme2, Themeable2, Icon, Tooltip } from '@grafana/ui'; import { withTheme2, Themeable2, Icon, Tooltip } from '@grafana/ui';
@ -42,7 +32,6 @@ interface Props extends Themeable2 {
onClickFilterLabel?: (key: string, value: string) => void; onClickFilterLabel?: (key: string, value: string) => void;
onClickFilterOutLabel?: (key: string, value: string) => void; onClickFilterOutLabel?: (key: string, value: string) => void;
onContextClick?: () => void; onContextClick?: () => void;
getRowContext: (row: LogRowModel, options?: LogRowContextOptions) => Promise<DataQueryResponse>;
getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>; getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>;
showContextToggle?: (row?: LogRowModel) => boolean; showContextToggle?: (row?: LogRowModel) => boolean;
onClickShowField?: (key: string) => void; onClickShowField?: (key: string) => void;

View File

@ -10,8 +10,6 @@ import {
LogsSortOrder, LogsSortOrder,
CoreApp, CoreApp,
DataFrame, DataFrame,
DataQueryResponse,
LogRowContextOptions,
} from '@grafana/data'; } from '@grafana/data';
import { withTheme2, Themeable2 } from '@grafana/ui'; import { withTheme2, Themeable2 } from '@grafana/ui';
@ -41,7 +39,6 @@ export interface Props extends Themeable2 {
showContextToggle?: (row?: LogRowModel) => boolean; showContextToggle?: (row?: LogRowModel) => boolean;
onClickFilterLabel?: (key: string, value: string) => void; onClickFilterLabel?: (key: string, value: string) => void;
onClickFilterOutLabel?: (key: string, value: string) => void; onClickFilterOutLabel?: (key: string, value: string) => void;
getRowContext?: (row: LogRowModel, options?: LogRowContextOptions) => Promise<DataQueryResponse>;
getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>; getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>;
onClickShowField?: (key: string) => void; onClickShowField?: (key: string) => void;
onClickHideField?: (key: string) => void; onClickHideField?: (key: string) => void;
@ -141,7 +138,6 @@ class UnThemedLogRows extends PureComponent<Props, State> {
// React profiler becomes unusable if we pass all rows to all rows and their labels, using getter instead // React profiler becomes unusable if we pass all rows to all rows and their labels, using getter instead
const getRows = this.makeGetRows(orderedRows); const getRows = this.makeGetRows(orderedRows);
const getRowContext = this.props.getRowContext ? this.props.getRowContext : () => Promise.resolve({ data: [] });
return ( return (
<table className={styles.logsRowsTable}> <table className={styles.logsRowsTable}>
@ -151,7 +147,6 @@ class UnThemedLogRows extends PureComponent<Props, State> {
<LogRow <LogRow
key={row.uid} key={row.uid}
getRows={getRows} getRows={getRows}
getRowContext={getRowContext}
row={row} row={row}
showContextToggle={showContextToggle} showContextToggle={showContextToggle}
showDuplicates={showDuplicates} showDuplicates={showDuplicates}
@ -181,7 +176,6 @@ class UnThemedLogRows extends PureComponent<Props, State> {
<LogRow <LogRow
key={row.uid} key={row.uid}
getRows={getRows} getRows={getRows}
getRowContext={getRowContext}
row={row} row={row}
showContextToggle={showContextToggle} showContextToggle={showContextToggle}
showDuplicates={showDuplicates} showDuplicates={showDuplicates}