|
@@ -1,6 +1,7 @@
|
|
import styled from '@emotion/styled';
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
import {Button} from 'sentry/components/button';
|
|
import {Button} from 'sentry/components/button';
|
|
|
|
+import {COUNTRY_CODE_TO_NAME_MAP} from 'sentry/data/countryCodesMap';
|
|
import {space} from 'sentry/styles/space';
|
|
import {space} from 'sentry/styles/space';
|
|
import {PerformanceBadge} from 'sentry/views/performance/browser/webVitals/components/performanceBadge';
|
|
import {PerformanceBadge} from 'sentry/views/performance/browser/webVitals/components/performanceBadge';
|
|
import {calculatePerformanceScore} from 'sentry/views/performance/browser/webVitals/utils/calculatePerformanceScore';
|
|
import {calculatePerformanceScore} from 'sentry/views/performance/browser/webVitals/utils/calculatePerformanceScore';
|
|
@@ -14,6 +15,14 @@ type Props = {
|
|
|
|
|
|
const LIMIT = 4;
|
|
const LIMIT = 4;
|
|
|
|
|
|
|
|
+function toReadableValue(tag, tagValue) {
|
|
|
|
+ if (tag === 'geo.country_code') {
|
|
|
|
+ return COUNTRY_CODE_TO_NAME_MAP[tagValue] ?? tagValue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return tagValue;
|
|
|
|
+}
|
|
|
|
+
|
|
export function PageOverviewFeaturedTagsList({transaction, tag, title}: Props) {
|
|
export function PageOverviewFeaturedTagsList({transaction, tag, title}: Props) {
|
|
const {data} = useSlowestTagValuesQuery({transaction, tag, limit: LIMIT});
|
|
const {data} = useSlowestTagValuesQuery({transaction, tag, limit: LIMIT});
|
|
const tagValues = data?.data ?? [];
|
|
const tagValues = data?.data ?? [];
|
|
@@ -38,7 +47,7 @@ export function PageOverviewFeaturedTagsList({transaction, tag, title}: Props) {
|
|
// TODO: need to pass in handler here to open detail panel
|
|
// TODO: need to pass in handler here to open detail panel
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- {row[tag]}
|
|
|
|
|
|
+ {toReadableValue(tag, row[tag])}
|
|
</TagButton>
|
|
</TagButton>
|
|
</TagValue>
|
|
</TagValue>
|
|
<Score>
|
|
<Score>
|