From 4cbe20ca5a5787f3f10b156d76c9ca3454cebdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Farkas?= Date: Thu, 1 Jun 2023 17:23:30 +0200 Subject: [PATCH] logs: context: removed unused code (#69392) --- public/app/features/explore/Logs/Logs.tsx | 1 - public/app/features/logs/components/LogRow.tsx | 13 +------------ public/app/features/logs/components/LogRows.tsx | 6 ------ 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/public/app/features/explore/Logs/Logs.tsx b/public/app/features/explore/Logs/Logs.tsx index 74cb143ffef..83139785915 100644 --- a/public/app/features/explore/Logs/Logs.tsx +++ b/public/app/features/explore/Logs/Logs.tsx @@ -537,7 +537,6 @@ class UnthemedLogs extends PureComponent { logRows={logRows} deduplicatedRows={dedupedRows} dedupStrategy={dedupStrategy} - getRowContext={getRowContext} onClickFilterLabel={onClickFilterLabel} onClickFilterOutLabel={onClickFilterOutLabel} showContextToggle={showContextToggle} diff --git a/public/app/features/logs/components/LogRow.tsx b/public/app/features/logs/components/LogRow.tsx index 0faafb44ee4..cd57a02aa00 100644 --- a/public/app/features/logs/components/LogRow.tsx +++ b/public/app/features/logs/components/LogRow.tsx @@ -2,17 +2,7 @@ import { cx } from '@emotion/css'; import { debounce } from 'lodash'; import React, { PureComponent } from 'react'; -import { - Field, - LinkModel, - LogRowModel, - LogsSortOrder, - DataQueryResponse, - dateTimeFormat, - CoreApp, - DataFrame, - LogRowContextOptions, -} from '@grafana/data'; +import { Field, LinkModel, LogRowModel, LogsSortOrder, dateTimeFormat, CoreApp, DataFrame } from '@grafana/data'; import { reportInteraction } from '@grafana/runtime'; import { TimeZone } from '@grafana/schema'; import { withTheme2, Themeable2, Icon, Tooltip } from '@grafana/ui'; @@ -42,7 +32,6 @@ interface Props extends Themeable2 { onClickFilterLabel?: (key: string, value: string) => void; onClickFilterOutLabel?: (key: string, value: string) => void; onContextClick?: () => void; - getRowContext: (row: LogRowModel, options?: LogRowContextOptions) => Promise; getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array>; showContextToggle?: (row?: LogRowModel) => boolean; onClickShowField?: (key: string) => void; diff --git a/public/app/features/logs/components/LogRows.tsx b/public/app/features/logs/components/LogRows.tsx index 5b825671184..9cc934fcd4e 100644 --- a/public/app/features/logs/components/LogRows.tsx +++ b/public/app/features/logs/components/LogRows.tsx @@ -10,8 +10,6 @@ import { LogsSortOrder, CoreApp, DataFrame, - DataQueryResponse, - LogRowContextOptions, } from '@grafana/data'; import { withTheme2, Themeable2 } from '@grafana/ui'; @@ -41,7 +39,6 @@ export interface Props extends Themeable2 { showContextToggle?: (row?: LogRowModel) => boolean; onClickFilterLabel?: (key: string, value: string) => void; onClickFilterOutLabel?: (key: string, value: string) => void; - getRowContext?: (row: LogRowModel, options?: LogRowContextOptions) => Promise; getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array>; onClickShowField?: (key: string) => void; onClickHideField?: (key: string) => void; @@ -141,7 +138,6 @@ class UnThemedLogRows extends PureComponent { // React profiler becomes unusable if we pass all rows to all rows and their labels, using getter instead const getRows = this.makeGetRows(orderedRows); - const getRowContext = this.props.getRowContext ? this.props.getRowContext : () => Promise.resolve({ data: [] }); return ( @@ -151,7 +147,6 @@ class UnThemedLogRows extends PureComponent { {