Skip to content

Commit

Permalink
code review - Fix aggregationType
Browse files Browse the repository at this point in the history
  • Loading branch information
fkanout committed Jan 5, 2023
1 parent b5d9213 commit 8ac0b2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export function AlertDetailsAppSection({
}: AlertDetailsAppSectionProps) {
const params = rule.params;
const environment = String(params.environment) || ENVIRONMENT_ALL.value;
const latencyAggregationType = getAggsTypeFromRule(
params.aggregationType as string
);
const latencyAggregationType = getAggsTypeFromRule(params.aggregationType);

// duration is us, convert it to MS
const alertDurationMS = alert.fields[ALERT_DURATION]! / 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
import { Rule } from '@kbn/alerting-plugin/common';
import { TopAlert } from '@kbn/observability-plugin/public/pages/alerts';
import { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public';
import { LatencyAggregationType } from '../../../../../common/latency_aggregation_types';

export const SERVICE_NAME = 'service.name' as const;
export const TRANSACTION_TYPE = 'transaction.type' as const;
export interface AlertDetailsAppSectionProps {
rule: Rule<{
environment: string;
aggregationType: LatencyAggregationType;
aggregationType: string;
windowSize: number;
windowUnit: TIME_UNITS;
}>;
Expand Down

0 comments on commit 8ac0b2a

Please sign in to comment.