"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UPDATE_ALERT_TAGS_SUCCESS_TOAST = exports.UPDATE_ALERT_TAGS_FAILURE = exports.UPDATE_ALERT_TAGS_FAILED_DETAILED = exports.UPDATE_ALERT_TAGS_FAILED = exports.UPDATE_ALERT_STATUS_FAILED_DETAILED = exports.UPDATE_ALERT_STATUS_FAILED = exports.SELECT_ALL_ENTITIES = exports.SELECTED_ENTITIES = exports.OPENED_ALERT_SUCCESS_TOAST = exports.OPENED_ALERT_FAILED_TOAST = exports.CLOSED_ALERT_SUCCESS_TOAST = exports.CLOSED_ALERT_FAILED_TOAST = exports.CLEAR_SELECTION = exports.BULK_ACTION_OPEN_SELECTED = exports.BULK_ACTION_FAILED_SINGLE_ALERT = exports.BULK_ACTION_CLOSE_SELECTED = exports.BULK_ACTION_ACKNOWLEDGED_SELECTED = exports.ALERT_TAGS_MENU_SEARCH_PLACEHOLDER = exports.ALERT_TAGS_MENU_SEARCH_NO_TAGS_FOUND = exports.ALERT_TAGS_MENU_EMPTY = exports.ALERT_TAGS_CONTEXT_MENU_ITEM_TOOLTIP_INFO = exports.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE = exports.ALERT_TAGS_APPLY_BUTTON_MESSAGE = exports.ACKNOWLEDGED_ALERT_SUCCESS_TOAST = exports.ACKNOWLEDGED_ALERT_FAILED_TOAST = void 0; var _i18n = require("@kbn/i18n"); var _securitysolutionDataTable = require("@kbn/securitysolution-data-table"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ const ENTITY_TYPE_PLURAL = (entityType, count) => { switch (entityType) { case _securitysolutionDataTable.TableEntityType.alert: { return _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.entityAlerts', { values: { count }, defaultMessage: '{count, plural, =1 {alert} other {alerts}}' }); } case _securitysolutionDataTable.TableEntityType.event: { return _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.entityEvents', { values: { count }, defaultMessage: '{count, plural, =1 {event} other {events}}' }); } case _securitysolutionDataTable.TableEntityType.session: { return _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.entitySessions', { values: { count }, defaultMessage: '{count, plural, =1 {session} other {sessions}}' }); } } }; const SELECT_ALL_ENTITIES = (entityType, totalFormatted, total) => _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.selectAllEntitiesTitle', { values: { entityPlural: ENTITY_TYPE_PLURAL(entityType, total), totalFormatted, total }, defaultMessage: 'Select {total, plural, =1 {} other {all}} {totalFormatted} {entityPlural}' }); exports.SELECT_ALL_ENTITIES = SELECT_ALL_ENTITIES; const SELECTED_ENTITIES = (entityType, totalFormatted, total) => _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.selectedEntitiesTitle', { values: { entityPlural: ENTITY_TYPE_PLURAL(entityType, total), totalFormatted }, defaultMessage: 'Selected {totalFormatted} {entityPlural}' }); exports.SELECTED_ENTITIES = SELECTED_ENTITIES; const CLEAR_SELECTION = _i18n.i18n.translate('xpack.securitySolution.toolbar.bulkActions.clearSelectionTitle', { defaultMessage: 'Clear selection' }); exports.CLEAR_SELECTION = CLEAR_SELECTION; const UPDATE_ALERT_STATUS_FAILED = conflicts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertStatusFailed', { values: { conflicts }, defaultMessage: 'Failed to update { conflicts } {conflicts, plural, =1 {alert} other {alerts}}.' }); exports.UPDATE_ALERT_STATUS_FAILED = UPDATE_ALERT_STATUS_FAILED; const UPDATE_ALERT_STATUS_FAILED_DETAILED = (updated, conflicts) => _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertStatusFailedDetailed', { values: { updated, conflicts }, defaultMessage: `{ updated } {updated, plural, =1 {alert was} other {alerts were}} updated successfully, but { conflicts } failed to update because { conflicts, plural, =1 {it was} other {they were}} already being modified.` }); exports.UPDATE_ALERT_STATUS_FAILED_DETAILED = UPDATE_ALERT_STATUS_FAILED_DETAILED; const CLOSED_ALERT_SUCCESS_TOAST = totalAlerts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.closedAlertSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully closed {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}}.' }); exports.CLOSED_ALERT_SUCCESS_TOAST = CLOSED_ALERT_SUCCESS_TOAST; const OPENED_ALERT_SUCCESS_TOAST = totalAlerts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.openedAlertSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully opened {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}}.' }); exports.OPENED_ALERT_SUCCESS_TOAST = OPENED_ALERT_SUCCESS_TOAST; const ACKNOWLEDGED_ALERT_SUCCESS_TOAST = totalAlerts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.acknowledgedAlertSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully marked {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}} as acknowledged.' }); exports.ACKNOWLEDGED_ALERT_SUCCESS_TOAST = ACKNOWLEDGED_ALERT_SUCCESS_TOAST; const CLOSED_ALERT_FAILED_TOAST = _i18n.i18n.translate('xpack.securitySolution.bulkActions.closedAlertFailedToastMessage', { defaultMessage: 'Failed to close alert(s).' }); exports.CLOSED_ALERT_FAILED_TOAST = CLOSED_ALERT_FAILED_TOAST; const OPENED_ALERT_FAILED_TOAST = _i18n.i18n.translate('xpack.securitySolution.bulkActions.openedAlertFailedToastMessage', { defaultMessage: 'Failed to open alert(s)' }); exports.OPENED_ALERT_FAILED_TOAST = OPENED_ALERT_FAILED_TOAST; const ACKNOWLEDGED_ALERT_FAILED_TOAST = _i18n.i18n.translate('xpack.securitySolution.bulkActions.acknowledgedAlertFailedToastMessage', { defaultMessage: 'Failed to mark alert(s) as acknowledged' }); exports.ACKNOWLEDGED_ALERT_FAILED_TOAST = ACKNOWLEDGED_ALERT_FAILED_TOAST; const BULK_ACTION_FAILED_SINGLE_ALERT = _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertStatusFailedSingleAlert', { defaultMessage: 'Failed to update alert because it was already being modified.' }); exports.BULK_ACTION_FAILED_SINGLE_ALERT = BULK_ACTION_FAILED_SINGLE_ALERT; const BULK_ACTION_OPEN_SELECTED = _i18n.i18n.translate('xpack.securitySolution.bulkActions.openSelectedTitle', { defaultMessage: 'Mark as open' }); exports.BULK_ACTION_OPEN_SELECTED = BULK_ACTION_OPEN_SELECTED; const BULK_ACTION_ACKNOWLEDGED_SELECTED = _i18n.i18n.translate('xpack.securitySolution.bulkActions.acknowledgedSelectedTitle', { defaultMessage: 'Mark as acknowledged' }); exports.BULK_ACTION_ACKNOWLEDGED_SELECTED = BULK_ACTION_ACKNOWLEDGED_SELECTED; const BULK_ACTION_CLOSE_SELECTED = _i18n.i18n.translate('xpack.securitySolution.bulkActions.closeSelectedTitle', { defaultMessage: 'Mark as closed' }); exports.BULK_ACTION_CLOSE_SELECTED = BULK_ACTION_CLOSE_SELECTED; const UPDATE_ALERT_TAGS_FAILED = conflicts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertTagsFailed', { values: { conflicts }, defaultMessage: 'Failed to update tags for { conflicts } {conflicts, plural, =1 {alert} other {alerts}}.' }); exports.UPDATE_ALERT_TAGS_FAILED = UPDATE_ALERT_TAGS_FAILED; const UPDATE_ALERT_TAGS_FAILED_DETAILED = (updated, conflicts) => _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertTagsFailedDetailed', { values: { updated, conflicts }, defaultMessage: `{ updated } {updated, plural, =1 {alert was} other {alerts were}} updated successfully, but { conflicts } failed to update because { conflicts, plural, =1 {it was} other {they were}} already being modified.` }); exports.UPDATE_ALERT_TAGS_FAILED_DETAILED = UPDATE_ALERT_TAGS_FAILED_DETAILED; const UPDATE_ALERT_TAGS_SUCCESS_TOAST = totalAlerts => _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertTagsSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully updated tags for {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}}.' }); exports.UPDATE_ALERT_TAGS_SUCCESS_TOAST = UPDATE_ALERT_TAGS_SUCCESS_TOAST; const UPDATE_ALERT_TAGS_FAILURE = _i18n.i18n.translate('xpack.securitySolution.bulkActions.updateAlertTagsFailedToastMessage', { defaultMessage: 'Failed to update alert tags.' }); exports.UPDATE_ALERT_TAGS_FAILURE = UPDATE_ALERT_TAGS_FAILURE; const ALERT_TAGS_MENU_SEARCH_PLACEHOLDER = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsMenuSearchPlaceholderMessage', { defaultMessage: 'Search tags' }); exports.ALERT_TAGS_MENU_SEARCH_PLACEHOLDER = ALERT_TAGS_MENU_SEARCH_PLACEHOLDER; const ALERT_TAGS_MENU_SEARCH_NO_TAGS_FOUND = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsMenuSearchNoTagsFoundMessage', { defaultMessage: 'No tags match current search' }); exports.ALERT_TAGS_MENU_SEARCH_NO_TAGS_FOUND = ALERT_TAGS_MENU_SEARCH_NO_TAGS_FOUND; const ALERT_TAGS_MENU_EMPTY = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsMenuEmptyMessage', { defaultMessage: 'No alert tag options exist, add tag options in Kibana Advanced Settings.' }); exports.ALERT_TAGS_MENU_EMPTY = ALERT_TAGS_MENU_EMPTY; const ALERT_TAGS_APPLY_BUTTON_MESSAGE = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsApplyButtonMessage', { defaultMessage: 'Apply tags' }); exports.ALERT_TAGS_APPLY_BUTTON_MESSAGE = ALERT_TAGS_APPLY_BUTTON_MESSAGE; const ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsContextMenuItemTitle', { defaultMessage: 'Apply alert tags' }); exports.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE = ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE; const ALERT_TAGS_CONTEXT_MENU_ITEM_TOOLTIP_INFO = _i18n.i18n.translate('xpack.securitySolution.bulkActions.alertTagsContextMenuItemTooltip', { defaultMessage: 'Change alert tag options in Kibana Advanced Settings.' }); exports.ALERT_TAGS_CONTEXT_MENU_ITEM_TOOLTIP_INFO = ALERT_TAGS_CONTEXT_MENU_ITEM_TOOLTIP_INFO;