|
@@ -9,9 +9,10 @@ import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
|
|
|
import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
|
|
|
import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
|
|
|
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
|
|
|
-import {t} from 'sentry/locale';
|
|
|
+import {t, tct} from 'sentry/locale';
|
|
|
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
|
|
|
import {useLocation} from 'sentry/utils/useLocation';
|
|
|
+import useOrganization from 'sentry/utils/useOrganization';
|
|
|
import {useParams} from 'sentry/utils/useParams';
|
|
|
import {Referrer} from 'sentry/views/performance/browser/resources/referrer';
|
|
|
import ResourceInfo from 'sentry/views/performance/browser/resources/resourceSummaryPage/resourceInfo';
|
|
@@ -19,6 +20,10 @@ import ResourceSummaryCharts from 'sentry/views/performance/browser/resources/re
|
|
|
import ResourceSummaryTable from 'sentry/views/performance/browser/resources/resourceSummaryPage/resourceSummaryTable';
|
|
|
import SampleImages from 'sentry/views/performance/browser/resources/resourceSummaryPage/sampleImages';
|
|
|
import {FilterOptionsContainer} from 'sentry/views/performance/browser/resources/resourceView';
|
|
|
+import {
|
|
|
+ DATA_TYPE,
|
|
|
+ PERFORMANCE_DATA_TYPE,
|
|
|
+} from 'sentry/views/performance/browser/resources/settings';
|
|
|
import {IMAGE_FILE_EXTENSIONS} from 'sentry/views/performance/browser/resources/shared/constants';
|
|
|
import RenderBlockingSelector from 'sentry/views/performance/browser/resources/shared/renderBlockingSelector';
|
|
|
import {ResourceSpanOps} from 'sentry/views/performance/browser/resources/shared/types';
|
|
@@ -42,6 +47,7 @@ const {
|
|
|
|
|
|
function ResourceSummary() {
|
|
|
const webVitalsModuleURL = useModuleURL('vital');
|
|
|
+ const organization = useOrganization();
|
|
|
const {groupId} = useParams();
|
|
|
const filters = useResourceModuleFilters();
|
|
|
const selectedSpanOp = filters[SPAN_OP];
|
|
@@ -83,6 +89,9 @@ function ResourceSummary() {
|
|
|
|
|
|
const crumbs = useModuleBreadcrumbs('resource');
|
|
|
|
|
|
+ const isInsightsEnabled = organization.features.includes('performance-insights');
|
|
|
+ const resourceDataType = isInsightsEnabled ? DATA_TYPE : PERFORMANCE_DATA_TYPE;
|
|
|
+
|
|
|
return (
|
|
|
<React.Fragment>
|
|
|
<Layout.Header>
|
|
@@ -91,7 +100,7 @@ function ResourceSummary() {
|
|
|
crumbs={[
|
|
|
...crumbs,
|
|
|
{
|
|
|
- label: 'Resource Summary',
|
|
|
+ label: tct('[dataType] Summary', {dataType: resourceDataType}),
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
@@ -148,10 +157,14 @@ function ResourceSummary() {
|
|
|
}
|
|
|
|
|
|
function PageWithProviders() {
|
|
|
+ const organization = useOrganization();
|
|
|
+
|
|
|
+ const isInsightsEnabled = organization.features.includes('performance-insights');
|
|
|
+ const resourceDataType = isInsightsEnabled ? DATA_TYPE : PERFORMANCE_DATA_TYPE;
|
|
|
return (
|
|
|
<ModulePageProviders
|
|
|
moduleName="resource"
|
|
|
- pageTitle={t('Resource Summary')}
|
|
|
+ pageTitle={`${resourceDataType} ${t('Summary')}`}
|
|
|
features="spans-first-ui"
|
|
|
>
|
|
|
<ResourceSummary />
|