-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(trace-view): Add a new page for trace view (#24195)
This adds a new page for the trace view at `/organizations/:orgId/performance/trace/:traceSlug/`. This also splits the condition to enable quick trace by allowing either `trace-view-quick` or `trace-view-summary` instead of both.
- Loading branch information
Showing
8 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/sentry/static/sentry/app/views/performance/traceDetails/content.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import {Params} from 'react-router/lib/Router'; | ||
import {Location} from 'history'; | ||
|
||
import * as Layout from 'app/components/layouts/thirds'; | ||
import {t} from 'app/locale'; | ||
import {Organization} from 'app/types'; | ||
import Breadcrumb from 'app/views/performance/breadcrumb'; | ||
|
||
type Props = { | ||
location: Location; | ||
organization: Organization; | ||
params: Params; | ||
traceSlug: string; | ||
}; | ||
|
||
class TraceDetailsContent extends React.Component<Props> { | ||
render() { | ||
const {organization, location, traceSlug} = this.props; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Layout.Header> | ||
<Layout.HeaderContent> | ||
<Breadcrumb | ||
organization={organization} | ||
location={location} | ||
traceSlug={traceSlug} | ||
/> | ||
<Layout.Title data-test-id="trace-header"> | ||
{t('Trace Id: %s', traceSlug)} | ||
</Layout.Title> | ||
</Layout.HeaderContent> | ||
</Layout.Header> | ||
<Layout.Body> | ||
<Layout.Main fullWidth>{null}</Layout.Main> | ||
</Layout.Body> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
|
||
export default TraceDetailsContent; |
56 changes: 56 additions & 0 deletions
56
src/sentry/static/sentry/app/views/performance/traceDetails/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from 'react'; | ||
import {Params} from 'react-router/lib/Router'; | ||
import styled from '@emotion/styled'; | ||
import {Location} from 'history'; | ||
|
||
import LightWeightNoProjectMessage from 'app/components/lightWeightNoProjectMessage'; | ||
import SentryDocumentTitle from 'app/components/sentryDocumentTitle'; | ||
import {t} from 'app/locale'; | ||
import {PageContent} from 'app/styles/organization'; | ||
import {Organization} from 'app/types'; | ||
import withOrganization from 'app/utils/withOrganization'; | ||
|
||
import TraceDetailsContent from './content'; | ||
|
||
type Props = { | ||
location: Location; | ||
organization: Organization; | ||
params: Params; | ||
}; | ||
|
||
class TraceSummary extends React.Component<Props> { | ||
getTraceSlug(): string { | ||
const {traceSlug} = this.props.params; | ||
return typeof traceSlug === 'string' ? traceSlug.trim() : ''; | ||
} | ||
|
||
getDocumentTitle(): string { | ||
return [t('Trace Details'), t('Performance')].join(' - '); | ||
} | ||
|
||
render() { | ||
const {location, organization, params} = this.props; | ||
this.getTraceSlug(); | ||
|
||
return ( | ||
<SentryDocumentTitle title={this.getDocumentTitle()} objSlug={organization.slug}> | ||
<StyledPageContent> | ||
<LightWeightNoProjectMessage organization={organization}> | ||
<TraceDetailsContent | ||
location={location} | ||
organization={organization} | ||
params={params} | ||
traceSlug={this.getTraceSlug()} | ||
/> | ||
</LightWeightNoProjectMessage> | ||
</StyledPageContent> | ||
</SentryDocumentTitle> | ||
); | ||
} | ||
} | ||
|
||
export default withOrganization(TraceSummary); | ||
|
||
const StyledPageContent = styled(PageContent)` | ||
padding: 0; | ||
`; |
14 changes: 14 additions & 0 deletions
14
src/sentry/static/sentry/app/views/performance/traceDetails/utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {LocationDescriptor, Query} from 'history'; | ||
|
||
import {OrganizationSummary} from 'app/types'; | ||
|
||
export function getTraceSummaryUrl( | ||
organization: OrganizationSummary, | ||
traceSlug: string, | ||
query: Query | ||
): LocationDescriptor { | ||
return { | ||
pathname: `/organizations/${organization.slug}/performance/trace/${traceSlug}/`, | ||
query: {...query}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters