From 7aa790cc772dc2c005079fbe3abc9fb50d184031 Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com> Date: Tue, 18 Jul 2023 14:39:34 -0400 Subject: [PATCH] feat(starfish): add document titles to db module (#53098) Adds titles to match the breadcrumbs i.e image --- .../app/views/starfish/modules/DBModule.tsx | 41 +-- .../starfish/views/spanSummaryPage/index.tsx | 259 +++++++++--------- 2 files changed, 156 insertions(+), 144 deletions(-) diff --git a/static/app/views/starfish/modules/DBModule.tsx b/static/app/views/starfish/modules/DBModule.tsx index 1daab8ded94302..6c3d5a626f9c24 100644 --- a/static/app/views/starfish/modules/DBModule.tsx +++ b/static/app/views/starfish/modules/DBModule.tsx @@ -1,32 +1,39 @@ import * as Layout from 'sentry/components/layouts/thirds'; import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container'; +import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import { PageErrorAlert, PageErrorProvider, } from 'sentry/utils/performance/contexts/pageError'; +import useOrganization from 'sentry/utils/useOrganization'; import {ModuleName} from 'sentry/views/starfish/types'; +import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames'; import SpansView from 'sentry/views/starfish/views/spans/spansView'; export default function DBModule() { + const organization = useOrganization(); + return ( - - - - - {t('Database Queries')} - - + + + + + + {t('Database Queries')} + + - - - - - - - - - - + + + + + + + + + + + ); } diff --git a/static/app/views/starfish/views/spanSummaryPage/index.tsx b/static/app/views/starfish/views/spanSummaryPage/index.tsx index 0bccd49f56914b..3a4568af05ee31 100644 --- a/static/app/views/starfish/views/spanSummaryPage/index.tsx +++ b/static/app/views/starfish/views/spanSummaryPage/index.tsx @@ -9,6 +9,7 @@ import PageFiltersContainer from 'sentry/components/organizations/pageFilters/co import Panel from 'sentry/components/panels/panel'; import PanelBody from 'sentry/components/panels/panelBody'; import QuestionTooltip from 'sentry/components/questionTooltip'; +import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import {fromSorts} from 'sentry/utils/discover/eventView'; @@ -137,155 +138,159 @@ function SpanSummaryPage({params, location}: Props) { }); return ( - - - - - - {!isSpanMetricsLoading && } - - {endpointMethod && endpoint - ? `${endpointMethod} ${endpoint}` - : !isSpanMetricsLoading && title} - - - - - - - - - - + + + + + + + {!isSpanMetricsLoading && } + + {endpointMethod && endpoint + ? `${endpointMethod} ${endpoint}` + : !isSpanMetricsLoading && title} + + + + + + - {span?.[SPAN_OP]} - - - - - - - {span?.[SPAN_OP]?.startsWith('http') && ( + + + + + {span?.[SPAN_OP]} - + - )} - + + + {span?.[SPAN_OP]?.startsWith('http') && ( + + + )} - > - - + + + + - - {span?.[SPAN_DESCRIPTION] && ( - - - - - - {spanDescriptionCardTitle} - - - - - - - - - formatThroughput(value), - }} - /> - - - - - - - - + {span?.[SPAN_DESCRIPTION] && ( + + + + + + + {spanDescriptionCardTitle} + + + + + + - {span?.[SPAN_OP]?.startsWith('http') && ( - + formatThroughput(value), + }} /> - )} - - )} - - {span && ( - + + + + + + {span?.[SPAN_OP]?.startsWith('http') && ( + + + + + + )} + + )} + + {span && ( + + )} + + - )} - - - - - - - + + + + + + ); }