diff --git a/.changeset/tile-alerts-1m-interval.md b/.changeset/tile-alerts-1m-interval.md new file mode 100644 index 0000000000..2c5a761300 --- /dev/null +++ b/.changeset/tile-alerts-1m-interval.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/app': patch +--- + +feat: dashboard tile alerts can use a 1 minute interval outside development diff --git a/packages/app/src/utils/alerts.ts b/packages/app/src/utils/alerts.ts index 43fb050a5a..0fdc3fdae9 100644 --- a/packages/app/src/utils/alerts.ts +++ b/packages/app/src/utils/alerts.ts @@ -4,7 +4,6 @@ import { differenceInMinutes, sub, } from 'date-fns'; -import _ from 'lodash'; import { z } from 'zod'; import { formatTileAlertDisplayName } from '@hyperdx/common-utils/dist/alerts'; import { Granularity } from '@hyperdx/common-utils/dist/core/utils'; @@ -22,7 +21,6 @@ import { SavedChartConfig, } from '@hyperdx/common-utils/dist/types'; -import { IS_DEV } from '@/config'; import type { AlertsPageItem } from '@/types'; export function intervalToGranularity(interval: AlertInterval) { @@ -121,16 +119,7 @@ export const ALERT_INTERVAL_OPTIONS: Record = { '1d': '1 day', }; -export const TILE_ALERT_INTERVAL_OPTIONS = _.pick(ALERT_INTERVAL_OPTIONS, [ - ...(IS_DEV ? (['1m'] as const) : []), - '5m', - '15m', - '30m', - '1h', - '6h', - '12h', - '1d', -]); +export const TILE_ALERT_INTERVAL_OPTIONS = ALERT_INTERVAL_OPTIONS; export const ALERT_CHANNEL_OPTIONS: Record = { webhook: 'Webhook',