Skip to content

Commit

Permalink
Rename some alert types
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Mar 27, 2020
1 parent 878ab20 commit 3a47e98
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const rulesNotificationAlertType = ({
logger: Logger;
}): NotificationAlertTypeDefinition => ({
id: NOTIFICATIONS_ID,
name: 'SIEM Notifications',
name: 'SIEM Notification',
actionGroups: siemRuleActionGroups,
defaultActionGroupId: 'default',
validate: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const signalRulesAlertType = ({
}): SignalRuleAlertTypeDefinition => {
return {
id: SIGNALS_ID,
name: 'SIEM Signals',
name: 'SIEM Signal',
actionGroups: siemRuleActionGroups,
defaultActionGroupId: 'default',
validate: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('monitor status alert type', () => {
{{context.completeIdList}}",
"iconClass": "uptimeApp",
"id": "xpack.uptime.alerts.monitorStatus",
"name": "Uptime Monitor Status",
"name": "Uptime monitor status",
"validate": [Function],
}
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const initMonitorStatusAlertType: AlertTypeInitializer = ({
autocomplete,
}): AlertTypeModel => ({
id: 'xpack.uptime.alerts.monitorStatus',
name: 'Uptime Monitor Status',
name: 'Uptime monitor status',
iconClass: 'uptimeApp',
alertParamsExpression: params => {
return <AlertMonitorStatus {...params} autocomplete={autocomplete} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('alertType', () => {

it('alert type creation structure is the expected value', async () => {
expect(alertType.id).toBe('.index-threshold');
expect(alertType.name).toBe('Index Threshold');
expect(alertType.name).toBe('Index threshold');
expect(alertType.actionGroups).toEqual([{ id: 'threshold met', name: 'Threshold Met' }]);

expect(alertType.actionVariables).toMatchInlineSnapshot(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getAlertType(service: Service): AlertType {
const { logger } = service;

const alertTypeName = i18n.translate('xpack.alertingBuiltins.indexThreshold.alertTypeTitle', {
defaultMessage: 'Index Threshold',
defaultMessage: 'Index threshold',
});

const actionGroupName = i18n.translate(
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/common/alert_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export enum AlertType {
export const ALERT_TYPES_CONFIG = {
[AlertType.ErrorRate]: {
name: i18n.translate('xpack.apm.errorRateAlert.name', {
defaultMessage: 'Error rate threshold'
defaultMessage: 'Error rate'
}),
actionGroups: [
{
Expand All @@ -28,7 +28,7 @@ export const ALERT_TYPES_CONFIG = {
},
[AlertType.TransactionDuration]: {
name: i18n.translate('xpack.apm.transactionDurationAlert.name', {
defaultMessage: 'Transaction duration threshold'
defaultMessage: 'Transaction duration'
}),
actionGroups: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function getAlertType(): AlertTypeModel {
return {
id: METRIC_THRESHOLD_ALERT_TYPE_ID,
name: i18n.translate('xpack.infra.metrics.alertFlyout.alertName', {
defaultMessage: 'Alert Trigger',
defaultMessage: 'Metric threshold',
}),
iconClass: 'bell',
alertParamsExpression: Expressions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function registerMetricThresholdAlertType(alertingPlugin: PluginSet

alertingPlugin.registerType({
id: METRIC_THRESHOLD_ALERT_TYPE_ID,
name: 'Metric Alert - Threshold',
name: 'Metric threshold',
validate: {
params: schema.object({
criteria: schema.arrayOf(schema.oneOf([countCriterion, nonCountCriterion])),
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/triggers_actions_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ AlertTypeModel:
export function getAlertType(): AlertTypeModel {
return {
id: '.index-threshold',
name: 'Index Threshold',
name: 'Index threshold',
iconClass: 'alert',
alertParamsExpression: IndexThresholdAlertTypeExpression,
validate: validateAlertType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ describe('status check alert', () => {

it('contains the expected static fields like id, name, etc.', () => {
expect(alert.id).toBe('xpack.uptime.alerts.monitorStatus');
expect(alert.name).toBe('Uptime Monitor Status');
expect(alert.name).toBe('Uptime monitor status');
expect(alert.defaultActionGroupId).toBe('xpack.uptime.alerts.actionGroups.monitorStatus');
expect(alert.actionGroups).toMatchInlineSnapshot(`
Array [
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/server/lib/alerts/status_check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const DEFAULT_MAX_MESSAGE_ROWS = 3;
export const statusCheckAlertFactory: UptimeAlertTypeFactory = (server, libs) => ({
id: 'xpack.uptime.alerts.monitorStatus',
name: i18n.translate('xpack.uptime.alerts.monitorStatus', {
defaultMessage: 'Uptime Monitor Status',
defaultMessage: 'Uptime monitor status',
}),
validate: {
params: schema.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
{
name: alertName,
tagsText: '',
alertType: 'Index Threshold',
alertType: 'Index threshold',
interval: '1m',
},
]);
Expand Down Expand Up @@ -154,7 +154,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
{
name: createdAlert.name,
tagsText: 'foo, bar',
alertType: 'Index Threshold',
alertType: 'Index threshold',
interval: '1m',
},
]);
Expand All @@ -179,7 +179,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
{
name: updatedAlertName,
tagsText: 'foo, bar',
alertType: 'Index Threshold',
alertType: 'Index threshold',
interval: '1m',
},
]);
Expand Down Expand Up @@ -210,7 +210,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
{
name: createdAlert.name,
tagsText: 'foo, bar',
alertType: 'Index Threshold',
alertType: 'Index threshold',
interval: '1m',
},
]);
Expand Down Expand Up @@ -260,7 +260,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
{
name: createdAlert.name,
tagsText: 'foo, bar',
alertType: 'Index Threshold',
alertType: 'Index threshold',
interval: '1m',
},
]);
Expand Down

0 comments on commit 3a47e98

Please sign in to comment.