Loki: Update log context UI (#66730)

* fix logrowcontext scrolling behavior

* Loki: Update loki context ui menu

* Update

* Add test, update

* Use escapeLabelValueInSelector when displaying labels

* Update test for new appliedContextFilters

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
This commit is contained in:
Ivana Huckova
2023-04-18 15:59:22 +02:00
committed by GitHub
co-authored by Sven Grossmann
parent 0741f47876
commit f612a72f96
9 changed files with 226 additions and 152 deletions
@@ -10,7 +10,6 @@ import {
LogsSortOrder,
CoreApp,
DataFrame,
DataSourceWithLogsContextSupport,
DataQueryResponse,
LogRowContextOptions,
} from '@grafana/data';
@@ -43,7 +42,7 @@ export interface Props extends Themeable2 {
onClickFilterLabel?: (key: string, value: string) => void;
onClickFilterOutLabel?: (key: string, value: string) => void;
getRowContext?: (row: LogRowModel, options?: LogRowContextOptions) => Promise<DataQueryResponse>;
getLogRowContextUi?: DataSourceWithLogsContextSupport['getLogRowContextUi'];
getLogRowContextUi?: (row: LogRowModel, runContextQuery?: () => void) => React.ReactNode;
getFieldLinks?: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>;
onClickShowField?: (key: string) => void;
onClickHideField?: (key: string) => void;