File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed
Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,23 @@ export const AlwaysPresentLogFields: OurLogFieldKey[] = [
2424 OurLogKnownFieldKey . SEVERITY_TEXT ,
2525] ;
2626
27+ const AlwaysHiddenLogFields : OurLogFieldKey [ ] = [
28+ OurLogKnownFieldKey . ID ,
29+ OurLogKnownFieldKey . ORGANIZATION_ID ,
30+ OurLogKnownFieldKey . ITEM_TYPE ,
31+ OurLogKnownFieldKey . PROJECT ,
32+ ] ;
33+
2734/**
2835 * These are fields that should be hidden in log details view when receiving all data from the API.
2936 */
3037export const HiddenLogDetailFields : OurLogFieldKey [ ] = [
31- OurLogKnownFieldKey . ID ,
38+ ... AlwaysHiddenLogFields ,
3239 OurLogKnownFieldKey . BODY ,
33- OurLogKnownFieldKey . ORGANIZATION_ID ,
34- OurLogKnownFieldKey . ITEM_TYPE ,
35- OurLogKnownFieldKey . PROJECT ,
3640] ;
3741
42+ export const HiddenColumnEditorLogFields : OurLogFieldKey [ ] = [ ...AlwaysHiddenLogFields ] ;
43+
3844const LOGS_FILTERS : FilterKeySection = {
3945 value : 'logs_filters' ,
4046 label : t ( 'Logs' ) ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import {
2727} from 'sentry/views/explore/contexts/logs/logsPageParams' ;
2828import { useTraceItemAttributes } from 'sentry/views/explore/contexts/traceItemAttributeContext' ;
2929import { useLogAnalytics } from 'sentry/views/explore/hooks/useAnalytics' ;
30- import { HiddenLogDetailFields } from 'sentry/views/explore/logs/constants' ;
30+ import { HiddenColumnEditorLogFields } from 'sentry/views/explore/logs/constants' ;
3131import { LogsTable } from 'sentry/views/explore/logs/logsTable' ;
3232import { useExploreLogsTable } from 'sentry/views/explore/logs/useLogsQuery' ;
3333import { ColumnEditorModal } from 'sentry/views/explore/tables/columnEditorModal' ;
@@ -71,7 +71,8 @@ export function LogsTabContent({
7171 onColumnsChange = { setFields }
7272 stringTags = { stringAttributes }
7373 numberTags = { numberAttributes }
74- hiddenKeys = { HiddenLogDetailFields }
74+ hiddenKeys = { HiddenColumnEditorLogFields }
75+ isDocsButtonHidden
7576 />
7677 ) ,
7778 { closeEvents : 'escape-key' }
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ interface ColumnEditorModalProps extends ModalRenderProps {
2929 onColumnsChange : ( fields : string [ ] ) => void ;
3030 stringTags : TagCollection ;
3131 hiddenKeys ?: string [ ] ;
32+ isDocsButtonHidden ?: boolean ;
3233}
3334
3435export function ColumnEditorModal ( {
@@ -41,6 +42,7 @@ export function ColumnEditorModal({
4142 numberTags,
4243 stringTags,
4344 hiddenKeys,
45+ isDocsButtonHidden = false ,
4446} : ColumnEditorModalProps ) {
4547 const tags : Array < SelectOption < string > > = useMemo ( ( ) => {
4648 let allTags = [
@@ -137,9 +139,11 @@ export function ColumnEditorModal({
137139 </ Body >
138140 < Footer data-test-id = "editor-footer" >
139141 < ButtonBar gap = { 1 } >
140- < LinkButton priority = "default" href = { SPAN_PROPS_DOCS_URL } external >
141- { t ( 'Read the Docs' ) }
142- </ LinkButton >
142+ { ! isDocsButtonHidden && (
143+ < LinkButton priority = "default" href = { SPAN_PROPS_DOCS_URL } external >
144+ { t ( 'Read the Docs' ) }
145+ </ LinkButton >
146+ ) }
143147 < Button aria-label = { t ( 'Apply' ) } priority = "primary" onClick = { handleApply } >
144148 { t ( 'Apply' ) }
145149 </ Button >
You can’t perform that action at this time.
0 commit comments