-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64cf479
commit 5814739
Showing
4 changed files
with
95 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const ALERT_STATUS_OK = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertStatusOk', | ||
{ | ||
defaultMessage: 'Ok', | ||
} | ||
); | ||
|
||
export const ALERT_STATUS_ACTIVE = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertStatusActive', | ||
{ | ||
defaultMessage: 'Active', | ||
} | ||
); | ||
|
||
export const ALERT_STATUS_ERROR = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertStatusError', | ||
{ | ||
defaultMessage: 'Error', | ||
} | ||
); | ||
|
||
export const ALERT_STATUS_PENDING = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertStatusPending', | ||
{ | ||
defaultMessage: 'Pending', | ||
} | ||
); | ||
|
||
export const ALERT_STATUS_UNKNOWN = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertStatusUnknown', | ||
{ | ||
defaultMessage: 'Unknown', | ||
} | ||
); | ||
|
||
export const alertsStatusesTranslationsMapping = { | ||
ok: ALERT_STATUS_OK, | ||
active: ALERT_STATUS_ACTIVE, | ||
error: ALERT_STATUS_ERROR, | ||
pending: ALERT_STATUS_PENDING, | ||
unknown: ALERT_STATUS_UNKNOWN, | ||
}; | ||
|
||
export const ALERT_ERROR_UNKNOWN_REASON = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertErrorReasonUnknown', | ||
{ | ||
defaultMessage: 'An error occurred for unknown reasons.', | ||
} | ||
); | ||
|
||
export const ALERT_ERROR_READING_REASON = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertErrorReasonReading', | ||
{ | ||
defaultMessage: 'An error occurred when reading the alert.', | ||
} | ||
); | ||
|
||
export const ALERT_ERROR_DECRYPTING_REASON = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertErrorReasonDecrypting', | ||
{ | ||
defaultMessage: 'An error occurred when decrypting the alert.', | ||
} | ||
); | ||
|
||
export const ALERT_ERROR_EXECUTION_REASON = i18n.translate( | ||
'xpack.triggersActionsUI.sections.alertsList.alertErrorReasonRunning', | ||
{ | ||
defaultMessage: 'An error occurred when running the alert.', | ||
} | ||
); | ||
|
||
export const alertsErrorReasonTranslationsMapping = { | ||
read: ALERT_ERROR_READING_REASON, | ||
decrypt: ALERT_ERROR_DECRYPTING_REASON, | ||
execute: ALERT_ERROR_EXECUTION_REASON, | ||
unknown: ALERT_ERROR_UNKNOWN_REASON, | ||
}; |