|
@@ -11,12 +11,7 @@ import WidgetTable from 'sentry-images/dashboard/widget-table.svg';
|
|
|
import WidgetWorldMap from 'sentry-images/dashboard/widget-world-map.svg';
|
|
|
|
|
|
import {parseArithmetic} from 'sentry/components/arithmeticInput/parser';
|
|
|
-import {
|
|
|
- getDiffInMinutes,
|
|
|
- getInterval,
|
|
|
- SIX_HOURS,
|
|
|
- TWENTY_FOUR_HOURS,
|
|
|
-} from 'sentry/components/charts/utils';
|
|
|
+import {getDiffInMinutes, getInterval} from 'sentry/components/charts/utils';
|
|
|
import {Organization, PageFilters} from 'sentry/types';
|
|
|
import {defined} from 'sentry/utils';
|
|
|
import {getUtcDateString, parsePeriodToHours} from 'sentry/utils/dates';
|
|
@@ -163,16 +158,6 @@ export function getWidgetInterval(
|
|
|
const desiredPeriod = parsePeriodToHours(interval);
|
|
|
const selectedRange = getDiffInMinutes(datetimeObj);
|
|
|
|
|
|
- if (widget.widgetType === WidgetType.METRICS) {
|
|
|
- // Lower fidelity for Release Health widgets because of what
|
|
|
- // the sessions endpoint can currently support.
|
|
|
- interval = getInterval(datetimeObj, 'medium');
|
|
|
- if (selectedRange > SIX_HOURS && selectedRange <= TWENTY_FOUR_HOURS) {
|
|
|
- interval = '1h';
|
|
|
- }
|
|
|
- return widget.displayType === 'bar' ? '1d' : interval;
|
|
|
- }
|
|
|
-
|
|
|
// selectedRange is in minutes, desiredPeriod is in hours
|
|
|
// convert desiredPeriod to minutes
|
|
|
if (selectedRange / (desiredPeriod * 60) > MAX_BIN_COUNT) {
|