import styled from '@emotion/styled'; import omit from 'lodash/omit'; import Breadcrumbs from 'sentry/components/breadcrumbs'; import ButtonBar from 'sentry/components/buttonBar'; import ErrorBoundary from 'sentry/components/errorBoundary'; import FeedbackWidgetButton from 'sentry/components/feedback/widget/feedbackWidgetButton'; import * as Layout from 'sentry/components/layouts/thirds'; import {DatePageFilter} from 'sentry/components/organizations/datePageFilter'; import PageFilterBar from 'sentry/components/organizations/pageFilterBar'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import {DurationUnit} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {PageAlert, PageAlertProvider} from 'sentry/utils/performance/contexts/pageAlert'; import {useLocation} from 'sentry/utils/useLocation'; import useOrganization from 'sentry/utils/useOrganization'; import useRouter from 'sentry/utils/useRouter'; import {SpanSamplesPanel} from 'sentry/views/performance/mobile/components/spanSamplesPanel'; import { ScreenCharts, YAxis, } from 'sentry/views/performance/mobile/screenload/screenLoadSpans/charts'; import {ScreenLoadEventSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/eventSamples'; import {MetricsRibbon} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/metricsRibbon'; import {ScreenLoadSpansTable} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/table'; import { MobileCursors, MobileSortKeys, } from 'sentry/views/performance/mobile/screenload/screens/constants'; import {PlatformSelector} from 'sentry/views/performance/mobile/screenload/screens/platformSelector'; import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject'; import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders'; import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs'; import { PRIMARY_RELEASE_ALIAS, ReleaseComparisonSelector, SECONDARY_RELEASE_ALIAS, } from 'sentry/views/starfish/components/releaseSelector'; import {ModuleName} from 'sentry/views/starfish/types'; import {QueryParameterNames} from 'sentry/views/starfish/views/queryParameters'; type Query = { primaryRelease: string; project: string; secondaryRelease: string; spanGroup: string; transaction: string; [QueryParameterNames.SPANS_SORT]: string; spanDescription?: string; }; function ScreenLoadSpans() { const location = useLocation(); const organization = useOrganization(); const router = useRouter(); const {isProjectCrossPlatform} = useCrossPlatformProject(); const crumbs = useModuleBreadcrumbs('screen_load'); const { spanGroup, primaryRelease, secondaryRelease, transaction: transactionName, spanDescription, } = location.query; return ( {transactionName} {organization.features.includes('insights-initial-modules') && isProjectCrossPlatform && } {spanGroup && ( { router.replace({ pathname: router.location.pathname, query: omit( router.location.query, 'spanGroup', 'transactionMethod' ), }); }} /> )} ); } function PageWithProviders() { const location = useLocation(); const {transaction} = location.query; return ( ); } export default PageWithProviders; const Container = styled('div')` display: grid; grid-template-rows: 1fr 1fr; grid-template-columns: 1fr; column-gap: ${space(2)}; @media (min-width: ${p => p.theme.breakpoints.large}) { grid-template-rows: auto; grid-template-columns: auto minmax(100px, max-content); } `; const FilterContainer = styled('div')` display: grid; column-gap: ${space(1)}; grid-template-rows: auto; grid-template-columns: auto 1fr; `; const SampleContainer = styled('div')` display: flex; flex-direction: row; flex-wrap: wrap; gap: ${space(2)}; `; const SampleContainerItem = styled('div')` flex: 1; `; const HeaderWrapper = styled('div')` display: flex; `;