Browse Source

fix(alerts): Remove unused variable (#32244)

Scott Cooper 3 years ago
parent
commit
046d5c574f

+ 1 - 12
static/app/views/alerts/incidentRules/triggers/chart/index.tsx

@@ -21,7 +21,7 @@ import Placeholder from 'sentry/components/placeholder';
 import {t} from 'sentry/locale';
 import space from 'sentry/styles/space';
 import {Organization, Project} from 'sentry/types';
-import {Series, SeriesDataUnit} from 'sentry/types/echarts';
+import type {Series} from 'sentry/types/echarts';
 import {
   getCrashFreeRateSeries,
   MINUTES_THRESHOLD_TO_DISPLAY_SECONDS,
@@ -113,17 +113,6 @@ const AVAILABLE_TIME_PERIODS: Record<TimeWindow, TimePeriod[]> = {
   [TimeWindow.ONE_DAY]: [TimePeriod.THIRTY_DAYS],
 };
 
-const AGGREGATE_FUNCTIONS = {
-  avg: (seriesChunk: SeriesDataUnit[]) =>
-    AGGREGATE_FUNCTIONS.sum(seriesChunk) / seriesChunk.length,
-  sum: (seriesChunk: SeriesDataUnit[]) =>
-    seriesChunk.reduce((acc, series) => acc + series.value, 0),
-  max: (seriesChunk: SeriesDataUnit[]) =>
-    Math.max(...seriesChunk.map(series => series.value)),
-  min: (seriesChunk: SeriesDataUnit[]) =>
-    Math.min(...seriesChunk.map(series => series.value)),
-};
-
 const TIME_WINDOW_TO_SESSION_INTERVAL = {
   [TimeWindow.THIRTY_MINUTES]: '30m',
   [TimeWindow.ONE_HOUR]: '1h',

+ 1 - 1
static/app/views/alerts/incidentRules/types.tsx

@@ -1,5 +1,5 @@
 import {t} from 'sentry/locale';
-import {SchemaFormConfig} from 'sentry/views/organizationIntegrations/sentryAppExternalForm';
+import type {SchemaFormConfig} from 'sentry/views/organizationIntegrations/sentryAppExternalForm';
 
 export enum AlertRuleThresholdType {
   ABOVE,