mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Generate log row uid (#18994)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Field, DataFrame, FieldType, guessFieldTypeForField } from '../index';
|
||||
|
||||
interface FieldWithIndex extends Field {
|
||||
export interface FieldWithIndex extends Field {
|
||||
index: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ export interface LogRowModel {
|
||||
timeEpochMs: number;
|
||||
timeLocal: string;
|
||||
timeUtc: string;
|
||||
uid: string;
|
||||
uniqueLabels?: Labels;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ describe('getRowContexts', () => {
|
||||
timeLocal: '',
|
||||
timeUtc: '',
|
||||
timestamp: '4',
|
||||
uid: '1',
|
||||
};
|
||||
|
||||
let called = false;
|
||||
@@ -65,6 +66,7 @@ describe('getRowContexts', () => {
|
||||
timeLocal: '',
|
||||
timeUtc: '',
|
||||
timestamp: '4',
|
||||
uid: '1',
|
||||
};
|
||||
|
||||
let called = false;
|
||||
|
||||
@@ -105,7 +105,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
|
||||
!deferLogs && // Only inject highlighterExpression in the first set for performance reasons
|
||||
firstRows.map((row, index) => (
|
||||
<LogRow
|
||||
key={index}
|
||||
key={row.uid}
|
||||
getRows={getRows}
|
||||
getRowContext={getRowContext}
|
||||
highlighterExpressions={highlighterExpressions}
|
||||
@@ -122,7 +122,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
|
||||
renderAll &&
|
||||
lastRows.map((row, index) => (
|
||||
<LogRow
|
||||
key={PREVIEW_LIMIT + index}
|
||||
key={row.uid}
|
||||
getRows={getRows}
|
||||
getRowContext={getRowContext}
|
||||
row={row}
|
||||
|
||||
Reference in New Issue
Block a user