Skip to content

Commit 378fa7c

Browse files
committed
Fixed due to comments
1 parent 39f8587 commit 378fa7c

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

x-pack/plugins/alerts/common/builtin_action_groups.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ export const ResolvedActionGroup: ActionGroup = {
1212
defaultMessage: 'Resolved',
1313
}),
1414
};
15+
16+
export function getBuiltinActionGroups(): ActionGroup[] {
17+
return [ResolvedActionGroup];
18+
}

x-pack/plugins/alerts/server/alert_type_registry.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
AlertInstanceContext,
2020
ActionGroup,
2121
} from './types';
22-
import { ResolvedActionGroup } from '../common';
22+
import { getBuiltinActionGroups } from '../common';
2323

2424
interface ConstructorOptions {
2525
taskManager: TaskManagerSetupContract;
@@ -161,7 +161,3 @@ function validateActionGroups(alertTypeId: string, actionGroups: ActionGroup[])
161161
);
162162
}
163163
}
164-
165-
function getBuiltinActionGroups(): ActionGroup[] {
166-
return [ResolvedActionGroup];
167-
}

x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ export async function createAlert({
184184
'createdBy' | 'updatedBy' | 'muteAll' | 'mutedInstanceIds' | 'executionStatus'
185185
>;
186186
}): Promise<Alert> {
187-
if (alert.actions.length === 2) {
188-
alert.actions[1].group = 'resolved';
189-
}
190187
return await http.post(`${BASE_ALERT_API_PATH}/alert`, {
191188
body: JSON.stringify(alert),
192189
});

0 commit comments

Comments
 (0)