|
@@ -27,7 +27,6 @@ import {getAggregateAlias} from 'sentry/utils/discover/fields';
|
|
|
import {NumberContainer} from 'sentry/utils/discover/styles';
|
|
|
import {formatPercentage} from 'sentry/utils/formatters';
|
|
|
import {TableColumn} from 'sentry/views/discover/table/types';
|
|
|
-import {PercentChangeCell} from 'sentry/views/starfish/components/tableCells/percentChangeCell';
|
|
|
import ThroughputCell from 'sentry/views/starfish/components/tableCells/throughputCell';
|
|
|
import {TIME_SPENT_IN_SERVICE} from 'sentry/views/starfish/utils/generatePerformanceEventView';
|
|
|
import {DataTitles} from 'sentry/views/starfish/views/spans/types';
|
|
@@ -124,48 +123,10 @@ function EndpointList({eventView, location, organization, setError}: Props) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ // TODO: This can be removed if/when the backend returns this field's type
|
|
|
+ // as `"rate"` and its unit as `"1/second"
|
|
|
if (field === 'tps()') {
|
|
|
- return (
|
|
|
- <NumberContainer>
|
|
|
- <ThroughputCell throughputPerSecond={dataRow[field] as number} />
|
|
|
- </NumberContainer>
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- if (
|
|
|
- [
|
|
|
- 'percentile_percent_change(transaction.duration,0.95)',
|
|
|
- 'http_error_count_percent_change()',
|
|
|
- ].includes(field)
|
|
|
- ) {
|
|
|
- const deltaValue = dataRow[field] as number;
|
|
|
- const trendDirection = deltaValue < 0 ? 'good' : deltaValue > 0 ? 'bad' : 'neutral';
|
|
|
-
|
|
|
- return (
|
|
|
- <NumberContainer>
|
|
|
- <PercentChangeCell trendDirection={trendDirection}>
|
|
|
- {tct('[sign][delta]', {
|
|
|
- sign: deltaValue >= 0 ? '+' : '-',
|
|
|
- delta: formatPercentage(Math.abs(deltaValue), 2),
|
|
|
- })}
|
|
|
- </PercentChangeCell>
|
|
|
- </NumberContainer>
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- if (field === 'tps_percent_change()') {
|
|
|
- const deltaValue = dataRow[field] as number;
|
|
|
-
|
|
|
- return (
|
|
|
- <NumberContainer>
|
|
|
- <PercentChangeCell trendDirection="neutral">
|
|
|
- {tct('[sign][delta]', {
|
|
|
- sign: deltaValue >= 0 ? '+' : '-',
|
|
|
- delta: formatPercentage(Math.abs(deltaValue), 2),
|
|
|
- })}
|
|
|
- </PercentChangeCell>
|
|
|
- </NumberContainer>
|
|
|
- );
|
|
|
+ return <ThroughputCell throughputPerSecond={dataRow[field] as number} />;
|
|
|
}
|
|
|
|
|
|
if (field === 'project') {
|