diff --git a/docs/sources/datasources/loki.md b/docs/sources/datasources/loki.md index f0d5051cee1..2ff4a5e4180 100644 --- a/docs/sources/datasources/loki.md +++ b/docs/sources/datasources/loki.md @@ -39,7 +39,7 @@ The Derived Fields configuration allows you to: - Add fields parsed from the log message. - Add a link that uses the value of the field. -You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details]({{< relref "../explore/#labels-and-parsed-fields" >}}). +You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details](/explore/#labels-and-detected-fields). {{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}} Each derived field consists of: diff --git a/docs/sources/developers/plugins/build-a-logs-data-source-plugin.md b/docs/sources/developers/plugins/build-a-logs-data-source-plugin.md index 478b484d83f..c21f171d829 100644 --- a/docs/sources/developers/plugins/build-a-logs-data-source-plugin.md +++ b/docs/sources/developers/plugins/build-a-logs-data-source-plugin.md @@ -71,11 +71,11 @@ frame.add({ time: 1589189388597, content: 'user registered' }); frame.add({ time: 1589189406480, content: 'user logged in' }); ``` -## Extract parsed fields from your logs +## Extract detected fields from your logs You can add additional information about each log line by adding more data frame fields. -If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [parsed fields]({{< relref "../../explore/index.md#labels-and-parsed-fields" >}}). +If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [detected fields]({{< relref "../../explore/index.md#labels-and-detected-fields" >}}). While you can add any number of custom fields to your data frame, Grafana comes with a couple of dedicated fields: `levels` and `id`. Let's have a closer look at each one. diff --git a/docs/sources/explore/index.md b/docs/sources/explore/index.md index 389be7dd3d5..c50dbafab5f 100644 --- a/docs/sources/explore/index.md +++ b/docs/sources/explore/index.md @@ -210,17 +210,17 @@ Log data can be very repetitive and Explore can help by hiding duplicate log lin You can change the order of received logs from the default descending order (newest first) to ascending order (oldest first). -### Labels and parsed fields +### Labels and detected fields -Each log row has an extendable area with its labels and parsed fields, for more robust interaction. For all labels we have added the ability to filter for (positive filter) and filter out (negative filter) selected labels. Each field or label also has a stats icon to display ad-hoc statistics in relation to all displayed logs. +Each log row has an extendable area with its labels and detected fields, for more robust interaction. For all labels we have added the ability to filter for (positive filter) and filter out (negative filter) selected labels. Each field or label also has a stats icon to display ad-hoc statistics in relation to all displayed logs. -### Toggle parsed fields +### Toggle detected fields > **Note:** This feature is only available in Grafana 7.2+. -If your logs are structured in `json` or `logfmt`, then you can show or hide parsed fields. Expand a log line and then click the eye icon to show or hide fields. +If your logs are structured in `json` or `logfmt`, then you can show or hide detected fields. Expand a log line and then click the eye icon to show or hide fields. -{{< docs-imagebox img="/img/docs/explore/parsed-fields-7-2.gif" max-width="800px" caption="Toggling parsed fields in Explore" >}} +{{< docs-imagebox img="/img/docs/explore/parsed-fields-7-2.gif" max-width="800px" caption="Toggling detected fields in Explore" >}} ### Loki-specific features diff --git a/docs/sources/whatsnew/whats-new-in-v7-2.md b/docs/sources/whatsnew/whats-new-in-v7-2.md index be10b98ccdd..b2f568fdc94 100644 --- a/docs/sources/whatsnew/whats-new-in-v7-2.md +++ b/docs/sources/whatsnew/whats-new-in-v7-2.md @@ -12,7 +12,6 @@ list = false This topic includes the release notes for the Grafana v7.2. For all details, read the full [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md). - The main highlights are: - [**New date formatting options added**]({{< relref "#new=date-formatting-options-added" >}}) @@ -108,7 +107,7 @@ With this awesome contribution from one of our community members, you can now to {{< docs-imagebox img="/img/docs/v72/explore-toggle-parsed-fields.gif" max-width="800px" caption="Toggling parsed fields in Explore" >}} -The [Toggle parsed fields]({{< relref "../explore/index.md#toggle-parsed-fields" >}}) section has been added to [Explore]({{< relref "../explore/index.md" >}}) as a result of this feature. +The [Toggle parsed fields]({{< relref "../explore/index.md#toggle-detected-fields" >}}) section has been added to [Explore]({{< relref "../explore/index.md" >}}) as a result of this feature. ## Sensitive alert channel settings are now encrypted diff --git a/packages/grafana-data/src/utils/logs.test.ts b/packages/grafana-data/src/utils/logs.test.ts index b712f38c914..d6569a3ca8e 100644 --- a/packages/grafana-data/src/utils/logs.test.ts +++ b/packages/grafana-data/src/utils/logs.test.ts @@ -116,7 +116,7 @@ describe('LogsParsers', () => { expect(parser.test('foo=bar')).toBeTruthy(); }); - test('should return parsed fields', () => { + test('should return detected fields', () => { expect( parser.getFields( 'foo=bar baz="42 + 1" msg="[resolver] received A record \\"127.0.0.1\\" for \\"localhost.\\" from udp:192.168.65.1" time(ms)=50 label{foo}=bar' @@ -168,11 +168,11 @@ describe('LogsParsers', () => { expect(parser.test('{"foo":"bar"}')).toBeTruthy(); }); - test('should return parsed fields', () => { + test('should return detected fields', () => { expect(parser.getFields('{ "foo" : "bar", "baz" : 42 }')).toEqual(['"foo":"bar"', '"baz":42']); }); - test('should return parsed fields for nested quotes', () => { + test('should return detected fields for nested quotes', () => { expect(parser.getFields(`{"foo":"bar: '[value=\\"42\\"]'"}`)).toEqual([`"foo":"bar: '[value=\\"42\\"]'"`]); }); diff --git a/packages/grafana-ui/src/components/Logs/LogDetails.test.tsx b/packages/grafana-ui/src/components/Logs/LogDetails.test.tsx index 767654554a1..c5e0996c638 100644 --- a/packages/grafana-ui/src/components/Logs/LogDetails.test.tsx +++ b/packages/grafana-ui/src/components/Logs/LogDetails.test.tsx @@ -38,7 +38,7 @@ describe('LogDetails', () => { describe('when labels are present', () => { it('should render heading', () => { const wrapper = setup(undefined, { labels: { key1: 'label1', key2: 'label2' } }); - expect(wrapper.find({ 'aria-label': 'Log Labels' }).hostNodes()).toHaveLength(1); + expect(wrapper.find({ 'aria-label': 'Log labels' }).hostNodes()).toHaveLength(1); }); it('should render labels', () => { const wrapper = setup(undefined, { labels: { key1: 'label1', key2: 'label2' } }); @@ -56,7 +56,7 @@ describe('LogDetails', () => { const wrapper = setup(undefined, { entry: 'test=successful' }); expect(wrapper.find({ title: 'Ad-hoc statistics' }).hostNodes()).toHaveLength(1); }); - it('should render parsed fields', () => { + it('should render detected fields', () => { const wrapper = setup(undefined, { entry: 'test=successful' }); expect(wrapper.text().includes('testsuccessful')).toBe(true); }); @@ -64,10 +64,10 @@ describe('LogDetails', () => { describe('when row entry have parsable fields and labels are present', () => { it('should render all headings', () => { const wrapper = setup(undefined, { entry: 'test=successful', labels: { key: 'label' } }); - expect(wrapper.find({ 'aria-label': 'Log Labels' })).toHaveLength(1); - expect(wrapper.find({ 'aria-label': 'Parsed Fields' })).toHaveLength(1); + expect(wrapper.find({ 'aria-label': 'Log labels' })).toHaveLength(1); + expect(wrapper.find({ 'aria-label': 'Detected fields' })).toHaveLength(1); }); - it('should render all labels and parsed fields', () => { + it('should render all labels and detected fields', () => { const wrapper = setup(undefined, { entry: 'test=successful', labels: { key: 'label' }, @@ -84,7 +84,7 @@ describe('LogDetails', () => { it('should not render headings', () => { const wrapper = setup(undefined, { entry: '' }); expect(wrapper.find({ 'aria-label': 'Log labels' })).toHaveLength(0); - expect(wrapper.find({ 'aria-label': 'Parsed fields' })).toHaveLength(0); + expect(wrapper.find({ 'aria-label': 'Detected fields' })).toHaveLength(0); }); }); diff --git a/packages/grafana-ui/src/components/Logs/LogDetails.tsx b/packages/grafana-ui/src/components/Logs/LogDetails.tsx index 2ef5a8c4b21..b1a8ad448cd 100644 --- a/packages/grafana-ui/src/components/Logs/LogDetails.tsx +++ b/packages/grafana-ui/src/components/Logs/LogDetails.tsx @@ -22,6 +22,8 @@ import { getAllFields } from './logParser'; //Components import { LogDetailsRow } from './LogDetailsRow'; +import { Tooltip } from '../Tooltip/Tooltip'; +import { Icon } from '../Icon/Icon'; export interface Props extends Themeable { row: LogRowModel; @@ -34,9 +36,9 @@ export interface Props extends Themeable { onClickFilterLabel?: (key: string, value: string) => void; onClickFilterOutLabel?: (key: string, value: string) => void; getFieldLinks?: (field: Field, rowIndex: number) => Array>; - showParsedFields?: string[]; - onClickShowParsedField?: (key: string) => void; - onClickHideParsedField?: (key: string) => void; + showDetectedFields?: string[]; + onClickShowDetectedField?: (key: string) => void; + onClickHideDetectedField?: (key: string) => void; } const getStyles = stylesFactory((theme: GrafanaTheme) => { @@ -62,7 +64,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { class UnThemedLogDetails extends PureComponent { getParser = memoizeOne(getParser); - getStatsForParsedField = (key: string) => { + getStatsForDetectedField = (key: string) => { const matcher = this.getParser(this.props.row.entry)!.buildMatcher(key); return calculateFieldStats(this.props.getRows(), matcher); }; @@ -79,9 +81,9 @@ class UnThemedLogDetails extends PureComponent { className, onMouseEnter, onMouseLeave, - onClickShowParsedField, - onClickHideParsedField, - showParsedFields, + onClickShowDetectedField, + onClickHideDetectedField, + showDetectedFields, getFieldLinks, } = this.props; const style = getLogRowStyles(theme, row.logLevel); @@ -89,7 +91,7 @@ class UnThemedLogDetails extends PureComponent { const labels = row.labels ? row.labels : {}; const labelsAvailable = Object.keys(labels).length > 0; const fields = getAllFields(row, getFieldLinks); - const parsedFieldsAvailable = fields && fields.length > 0; + const detectedFieldsAvailable = fields && fields.length > 0; // If logs with error, we are not showing the level color const levelClassName = cx(!hasError && [style.logsRowLevel, styles.logsRowLevelDetails]); @@ -107,8 +109,8 @@ class UnThemedLogDetails extends PureComponent { {labelsAvailable && ( - - Log Labels: + + Log labels )} @@ -129,10 +131,19 @@ class UnThemedLogDetails extends PureComponent { ); })} - {parsedFieldsAvailable && ( + {detectedFieldsAvailable && ( - - Parsed Fields: + + Detected fields + + + )} @@ -144,18 +155,18 @@ class UnThemedLogDetails extends PureComponent { parsedKey={key} parsedValue={value} links={links} - onClickShowParsedField={onClickShowParsedField} - onClickHideParsedField={onClickHideParsedField} + onClickShowDetectedField={onClickShowDetectedField} + onClickHideDetectedField={onClickHideDetectedField} getStats={() => fieldIndex === undefined - ? this.getStatsForParsedField(key) + ? this.getStatsForDetectedField(key) : calculateStats(row.dataFrame.fields[fieldIndex].values.toArray()) } - showParsedFields={showParsedFields} + showDetectedFields={showDetectedFields} /> ); })} - {!parsedFieldsAvailable && !labelsAvailable && ( + {!detectedFieldsAvailable && !labelsAvailable && ( No details available diff --git a/packages/grafana-ui/src/components/Logs/LogDetailsRow.tsx b/packages/grafana-ui/src/components/Logs/LogDetailsRow.tsx index 53b089791d9..6ac71df2c7b 100644 --- a/packages/grafana-ui/src/components/Logs/LogDetailsRow.tsx +++ b/packages/grafana-ui/src/components/Logs/LogDetailsRow.tsx @@ -20,9 +20,9 @@ export interface Props extends Themeable { onClickFilterOutLabel?: (key: string, value: string) => void; links?: Array>; getStats: () => LogLabelStatsModel[] | null; - showParsedFields?: string[]; - onClickShowParsedField?: (key: string) => void; - onClickHideParsedField?: (key: string) => void; + showDetectedFields?: string[]; + onClickShowDetectedField?: (key: string) => void; + onClickHideDetectedField?: (key: string) => void; } interface State { @@ -61,16 +61,16 @@ class UnThemedLogDetailsRow extends PureComponent { }; showField = () => { - const { onClickShowParsedField, parsedKey } = this.props; - if (onClickShowParsedField) { - onClickShowParsedField(parsedKey); + const { onClickShowDetectedField, parsedKey } = this.props; + if (onClickShowDetectedField) { + onClickShowDetectedField(parsedKey); } }; hideField = () => { - const { onClickHideParsedField, parsedKey } = this.props; - if (onClickHideParsedField) { - onClickHideParsedField(parsedKey); + const { onClickHideDetectedField, parsedKey } = this.props; + if (onClickHideDetectedField) { + onClickHideDetectedField(parsedKey); } }; @@ -107,12 +107,12 @@ class UnThemedLogDetailsRow extends PureComponent { } render() { - const { theme, parsedKey, parsedValue, isLabel, links, showParsedFields } = this.props; + const { theme, parsedKey, parsedValue, isLabel, links, showDetectedFields } = this.props; const { showFieldsStats, fieldStats, fieldCount } = this.state; const styles = getStyles(theme); const style = getLogRowStyles(theme); const toggleFieldButton = - !isLabel && showParsedFields && showParsedFields.includes(parsedKey) ? ( + !isLabel && showDetectedFields && showDetectedFields.includes(parsedKey) ? ( ) : ( @@ -121,7 +121,7 @@ class UnThemedLogDetailsRow extends PureComponent { return ( {/* Action buttons - show stats/filter results */} - + @@ -138,7 +138,9 @@ class UnThemedLogDetailsRow extends PureComponent { {!isLabel && ( <> - {toggleFieldButton} + + {toggleFieldButton} + )} diff --git a/packages/grafana-ui/src/components/Logs/LogRow.tsx b/packages/grafana-ui/src/components/Logs/LogRow.tsx index e3aff053220..9ab3ce6e860 100644 --- a/packages/grafana-ui/src/components/Logs/LogRow.tsx +++ b/packages/grafana-ui/src/components/Logs/LogRow.tsx @@ -29,7 +29,7 @@ import { selectThemeVariant } from '../../themes/selectThemeVariant'; //Components import { LogDetails } from './LogDetails'; -import { LogRowMessageParsed } from './LogRowMessageParsed'; +import { LogRowMessageDetectedFields } from './LogRowMessageDetectedFields'; import { LogRowMessage } from './LogRowMessage'; import { LogLabels } from './LogLabels'; @@ -50,9 +50,9 @@ interface Props extends Themeable { getRowContext: (row: LogRowModel, options?: RowContextOptions) => Promise; getFieldLinks?: (field: Field, rowIndex: number) => Array>; showContextToggle?: (row?: LogRowModel) => boolean; - showParsedFields?: string[]; - onClickShowParsedField?: (key: string) => void; - onClickHideParsedField?: (key: string) => void; + showDetectedFields?: string[]; + onClickShowDetectedField?: (key: string) => void; + onClickHideDetectedField?: (key: string) => void; } interface State { @@ -149,8 +149,8 @@ class UnThemedLogRow extends PureComponent { getRows, onClickFilterLabel, onClickFilterOutLabel, - onClickShowParsedField, - onClickHideParsedField, + onClickShowDetectedField, + onClickHideDetectedField, highlighterExpressions, allowDetails, row, @@ -158,7 +158,7 @@ class UnThemedLogRow extends PureComponent { showContextToggle, showLabels, showTime, - showParsedFields, + showDetectedFields, wrapLogMessage, theme, getFieldLinks, @@ -198,8 +198,12 @@ class UnThemedLogRow extends PureComponent { )} - {showParsedFields && showParsedFields.length > 0 ? ( - + {showDetectedFields && showDetectedFields.length > 0 ? ( + ) : ( { getFieldLinks={getFieldLinks} onClickFilterLabel={onClickFilterLabel} onClickFilterOutLabel={onClickFilterOutLabel} - onClickShowParsedField={onClickShowParsedField} - onClickHideParsedField={onClickHideParsedField} + onClickShowDetectedField={onClickShowDetectedField} + onClickHideDetectedField={onClickHideDetectedField} getRows={getRows} row={row} hasError={hasError} - showParsedFields={showParsedFields} + showDetectedFields={showDetectedFields} /> )} diff --git a/packages/grafana-ui/src/components/Logs/LogRowMessageParsed.tsx b/packages/grafana-ui/src/components/Logs/LogRowMessageDetectedFields.tsx similarity index 68% rename from packages/grafana-ui/src/components/Logs/LogRowMessageParsed.tsx rename to packages/grafana-ui/src/components/Logs/LogRowMessageDetectedFields.tsx index b618d066396..6d5b7c8708c 100644 --- a/packages/grafana-ui/src/components/Logs/LogRowMessageParsed.tsx +++ b/packages/grafana-ui/src/components/Logs/LogRowMessageDetectedFields.tsx @@ -8,16 +8,16 @@ import { getAllFields } from './logParser'; export interface Props extends Themeable { row: LogRowModel; - showParsedFields: string[]; + showDetectedFields: string[]; getFieldLinks?: (field: Field, rowIndex: number) => Array>; } -class UnThemedLogRowMessageParsed extends PureComponent { +class UnThemedLogRowMessageDetectedFields extends PureComponent { render() { - const { row, showParsedFields, getFieldLinks } = this.props; + const { row, showDetectedFields, getFieldLinks } = this.props; const fields = getAllFields(row, getFieldLinks); - const line = showParsedFields + const line = showDetectedFields .map(parsedKey => { const field = fields.find(field => { const { key } = field; @@ -37,5 +37,5 @@ class UnThemedLogRowMessageParsed extends PureComponent { } } -export const LogRowMessageParsed = withTheme(UnThemedLogRowMessageParsed); -LogRowMessageParsed.displayName = 'LogRowMessageParsed'; +export const LogRowMessageDetectedFields = withTheme(UnThemedLogRowMessageDetectedFields); +LogRowMessageDetectedFields.displayName = 'LogRowMessageDetectedFields'; diff --git a/packages/grafana-ui/src/components/Logs/LogRows.tsx b/packages/grafana-ui/src/components/Logs/LogRows.tsx index 0ef9916b6c6..91fee6a6804 100644 --- a/packages/grafana-ui/src/components/Logs/LogRows.tsx +++ b/packages/grafana-ui/src/components/Logs/LogRows.tsx @@ -34,9 +34,9 @@ export interface Props extends Themeable { onClickFilterOutLabel?: (key: string, value: string) => void; getRowContext?: (row: LogRowModel, options?: RowContextOptions) => Promise; getFieldLinks?: (field: Field, rowIndex: number) => Array>; - showParsedFields?: string[]; - onClickShowParsedField?: (key: string) => void; - onClickHideParsedField?: (key: string) => void; + showDetectedFields?: string[]; + onClickShowDetectedField?: (key: string) => void; + onClickHideDetectedField?: (key: string) => void; } interface State { @@ -102,9 +102,9 @@ class UnThemedLogRows extends PureComponent { getFieldLinks, disableCustomHorizontalScroll, logsSortOrder, - showParsedFields, - onClickShowParsedField, - onClickHideParsedField, + showDetectedFields, + onClickShowDetectedField, + onClickHideDetectedField, } = this.props; const { renderAll } = this.state; const { logsRowsTable, logsRowsHorizontalScroll } = getLogRowStyles(theme); @@ -146,14 +146,14 @@ class UnThemedLogRows extends PureComponent { showDuplicates={showDuplicates} showLabels={showLabels} showTime={showTime} - showParsedFields={showParsedFields} + showDetectedFields={showDetectedFields} wrapLogMessage={wrapLogMessage} timeZone={timeZone} allowDetails={allowDetails} onClickFilterLabel={onClickFilterLabel} onClickFilterOutLabel={onClickFilterOutLabel} - onClickShowParsedField={onClickShowParsedField} - onClickHideParsedField={onClickHideParsedField} + onClickShowDetectedField={onClickShowDetectedField} + onClickHideDetectedField={onClickHideDetectedField} getFieldLinks={getFieldLinks} logsSortOrder={logsSortOrder} /> @@ -170,14 +170,14 @@ class UnThemedLogRows extends PureComponent { showDuplicates={showDuplicates} showLabels={showLabels} showTime={showTime} - showParsedFields={showParsedFields} + showDetectedFields={showDetectedFields} wrapLogMessage={wrapLogMessage} timeZone={timeZone} allowDetails={allowDetails} onClickFilterLabel={onClickFilterLabel} onClickFilterOutLabel={onClickFilterOutLabel} - onClickShowParsedField={onClickShowParsedField} - onClickHideParsedField={onClickHideParsedField} + onClickShowDetectedField={onClickShowDetectedField} + onClickHideDetectedField={onClickHideDetectedField} getFieldLinks={getFieldLinks} logsSortOrder={logsSortOrder} /> diff --git a/packages/grafana-ui/src/components/Logs/logParser.ts b/packages/grafana-ui/src/components/Logs/logParser.ts index 2fa39cd5823..4b1015a0419 100644 --- a/packages/grafana-ui/src/components/Logs/logParser.ts +++ b/packages/grafana-ui/src/components/Logs/logParser.ts @@ -49,8 +49,8 @@ const parseMessage = memoizeOne((rowEntry): FieldDef[] => { return []; } // Use parser to highlight detected fields - const parsedFields = parser.getFields(rowEntry); - const fields = parsedFields.map(field => { + const detectedFields = parser.getFields(rowEntry); + const fields = detectedFields.map(field => { const key = parser.getLabelFromField(field); const value = parser.getValueFromField(field); return { key, value }; diff --git a/public/app/features/explore/Logs.tsx b/public/app/features/explore/Logs.tsx index 9396fe9a185..17897bb8785 100644 --- a/public/app/features/explore/Logs.tsx +++ b/public/app/features/explore/Logs.tsx @@ -79,7 +79,7 @@ interface State { wrapLogMessage: boolean; logsSortOrder: LogsSortOrder | null; isFlipping: boolean; - showParsedFields: string[]; + showDetectedFields: string[]; } export class Logs extends PureComponent { @@ -92,7 +92,7 @@ export class Logs extends PureComponent { wrapLogMessage: store.getBool(SETTINGS_KEYS.wrapLogMessage, true), logsSortOrder: null, isFlipping: false, - showParsedFields: [], + showDetectedFields: [], }; componentWillUnmount() { @@ -174,33 +174,33 @@ export class Logs extends PureComponent { } }; - showParsedField = (key: string) => { - const index = this.state.showParsedFields.indexOf(key); + showDetectedField = (key: string) => { + const index = this.state.showDetectedFields.indexOf(key); if (index === -1) { this.setState(state => { return { - showParsedFields: state.showParsedFields.concat(key), + showDetectedFields: state.showDetectedFields.concat(key), }; }); } }; - hideParsedField = (key: string) => { - const index = this.state.showParsedFields.indexOf(key); + hideDetectedField = (key: string) => { + const index = this.state.showDetectedFields.indexOf(key); if (index > -1) { this.setState(state => { return { - showParsedFields: state.showParsedFields.filter(k => key !== k), + showDetectedFields: state.showDetectedFields.filter(k => key !== k), }; }); } }; - clearParsedFields = () => { + clearDetectedFields = () => { this.setState(state => { return { - showParsedFields: [], + showDetectedFields: [], }; }); }; @@ -230,7 +230,7 @@ export class Logs extends PureComponent { return null; } - const { showLabels, showTime, wrapLogMessage, logsSortOrder, isFlipping, showParsedFields } = this.state; + const { showLabels, showTime, wrapLogMessage, logsSortOrder, isFlipping, showDetectedFields } = this.state; const { dedupStrategy } = this.props; const hasData = logRows && logRows.length > 0; const dedupCount = dedupedRows @@ -323,18 +323,18 @@ export class Logs extends PureComponent { /> )} - {showParsedFields && showParsedFields.length > 0 && ( + {showDetectedFields && showDetectedFields.length > 0 && ( - Show all parsed fields + ), }, @@ -358,9 +358,9 @@ export class Logs extends PureComponent { timeZone={timeZone} getFieldLinks={getFieldLinks} logsSortOrder={logsSortOrder} - showParsedFields={showParsedFields} - onClickShowParsedField={this.showParsedField} - onClickHideParsedField={this.hideParsedField} + showDetectedFields={showDetectedFields} + onClickShowDetectedField={this.showDetectedField} + onClickHideDetectedField={this.hideDetectedField} /> {!loading && !hasData && !scanning && (