diff --git a/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap index f61c20b66..ad1e31c9f 100644 --- a/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap +++ b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap @@ -222,21 +222,7 @@ exports[`Dashboard component renders dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" @@ -617,21 +603,7 @@ exports[`Dashboard component renders dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" @@ -2870,21 +2842,7 @@ exports[`Dashboard component renders empty dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" @@ -3264,21 +3222,7 @@ exports[`Dashboard component renders empty dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" @@ -5517,21 +5461,7 @@ exports[`Dashboard component renders empty jaeger dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" @@ -5913,21 +5843,7 @@ exports[`Dashboard component renders empty jaeger dashboard 1`] = ` } query="" setEndTime={[MockFunction]} - setFilters={ - [MockFunction] { - "calls": Array [ - Array [ - Array [], - ], - ], - "results": Array [ - Object { - "type": "return", - "value": undefined, - }, - ], - } - } + setFilters={[MockFunction]} setQuery={[MockFunction]} setStartTime={[MockFunction]} startTime="now-5m" diff --git a/public/components/trace_analytics/components/dashboard/dashboard_content.tsx b/public/components/trace_analytics/components/dashboard/dashboard_content.tsx index 24a89ae9d..29e570c9a 100644 --- a/public/components/trace_analytics/components/dashboard/dashboard_content.tsx +++ b/public/components/trace_analytics/components/dashboard/dashboard_content.tsx @@ -17,7 +17,6 @@ import { handleJaegerDashboardRequest, handleJaegerErrorDashboardRequest, } from '../../requests/dashboard_request_handler'; -import { getValidFilterFields } from '../common/filters/filter_helpers'; import { FilterType } from '../common/filters/filters'; import { MissingConfigurationMessage, @@ -54,7 +53,6 @@ export function DashboardContent(props: DashboardProps) { jaegerIndicesExist, toasts, dataSourceMDSId, - attributesFilterFields, } = props; const [tableItems, setTableItems] = useState([]); const [jaegerTableItems, setJaegerTableItems] = useState([]); @@ -89,13 +87,6 @@ export function DashboardContent(props: DashboardProps) { chrome.setBreadcrumbs([parentBreadcrumb, ...childBreadcrumbs]); } - const validFilters = getValidFilterFields(mode, page, attributesFilterFields); - setFilters([ - ...filters.map((filter) => ({ - ...filter, - locked: validFilters.indexOf(filter.field) === -1, - })), - ]); setRedirect(false); }, []); diff --git a/public/components/trace_analytics/components/dashboard/dashboard_table.tsx b/public/components/trace_analytics/components/dashboard/dashboard_table.tsx index 3b446bb6a..5cab2005c 100644 --- a/public/components/trace_analytics/components/dashboard/dashboard_table.tsx +++ b/public/components/trace_analytics/components/dashboard/dashboard_table.tsx @@ -335,7 +335,7 @@ export function DashboardTable(props: { inverted: false, disabled: false, }); - if (props.page !== 'app') { + if (!['app', 'traces'].includes(props.page)) { props.setRedirect(true); location.assign('#/traces'); }