From 372d38fc1dca4250a25506aa4c3a99c7b250e2dc Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 2 May 2023 19:07:29 -0400 Subject: [PATCH] [8.8] [Synthetics] Adjust content (#156029) (#156451) # Backport This will backport the following commits from `main` to `8.8`: - [[Synthetics] Adjust content (#156029)](https://github.com/elastic/kibana/pull/156029) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Dominique Clarke --- .../server/types/models/preconfiguration.ts | 2 +- .../synthetics/management_list.journey.ts | 6 +-- .../alerts/toggle_alert_flyout_button.tsx | 4 +- .../components/monitor_details_panel.tsx | 2 +- .../wrappers/service_allowed_wrapper.tsx | 4 +- .../form_fields/service_locations.tsx | 9 +++- .../steps/read_only_callout.tsx | 2 +- .../monitors_page/common/search_field.tsx | 2 +- .../monitors_page/management/labels.ts | 14 +++--- .../monitor_errors/monitor_async_error.tsx | 4 +- .../synthetics_enablement/labels.ts | 40 ++++----------- .../synthetics_enablement.tsx | 49 ++++--------------- .../overview/actions_popover.test.tsx | 4 +- .../overview/overview/actions_popover.tsx | 8 +-- .../overview/monitor_detail_flyout.tsx | 2 +- .../components/monitors_page/route_config.tsx | 2 +- .../alerting_defaults/alert_defaults_form.tsx | 2 +- .../alerting_defaults/translations.ts | 2 +- .../private_locations/delete_location.tsx | 4 +- .../view_location_monitors.tsx | 4 +- .../browser/browser_test_results.tsx | 2 +- .../hooks/use_run_once_errors.ts | 29 +++-------- .../synthetics/state/alert_rules/effects.ts | 2 +- .../state/synthetics_enablement/effects.ts | 2 +- .../components/settings/translations.ts | 2 +- .../server/synthetics_service/get_api_key.ts | 2 +- .../translations/translations/fr-FR.json | 5 -- .../translations/translations/ja-JP.json | 5 -- .../translations/translations/zh-CN.json | 5 -- .../apis/synthetics/synthetics_enablement.ts | 2 +- 30 files changed, 72 insertions(+), 150 deletions(-) diff --git a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts index a8b121aa9c374..65427544420f5 100644 --- a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts @@ -134,7 +134,7 @@ export const PreconfiguredAgentPoliciesSchema = schema.arrayOf( if (value === 'synthetics') { return i18n.translate('xpack.fleet.config.disableSynthetics', { defaultMessage: - 'Synthetics package is not supported via kibana.yml config. Please use synthetics app to create monitors in private locations. https://www.elastic.co/guide/en/observability/current/synthetics-private-location.html', + 'Synthetics package is not supported via kibana.yml config. Please use Synthetics App to create monitors in private locations. https://www.elastic.co/guide/en/observability/current/synthetics-private-location.html', }); } }, diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/management_list.journey.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/management_list.journey.ts index 357ab213819eb..d4110ca7508c3 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/management_list.journey.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/management_list.journey.ts @@ -25,7 +25,7 @@ journey(`MonitorManagementList`, async ({ page, params }) => { const pageBaseUrl = 'http://localhost:5620/app/synthetics/monitors'; const searchBarInput = page.locator( - '[placeholder="Search by name, url, host, tag, project or location"]' + '[placeholder="Search by name, URL, host, tag, project or location"]' ); page.setDefaultTimeout(60 * 1000); @@ -72,12 +72,12 @@ journey(`MonitorManagementList`, async ({ page, params }) => { await page.click('span >> text="Journey / Page"'); await page.click('[aria-label="Apply the selected filters for Type"]'); expect(page.url()).toBe(`${pageBaseUrl}?monitorTypes=%5B%22browser%22%5D`); - await page.click('[placeholder="Search by name, url, host, tag, project or location"]'); + await page.click('[placeholder="Search by name, URL, host, tag, project or location"]'); await Promise.all([ page.waitForNavigation({ url: `${pageBaseUrl}?monitorTypes=%5B%22browser%22%5D&query=3`, }), - page.fill('[placeholder="Search by name, url, host, tag, project or location"]', '3'), + page.fill('[placeholder="Search by name, URL, host, tag, project or location"]', '3'), ]); await page.click('text=1-1'); await page.waitForSelector('text=Showing 1-1 of 1 Configuration'); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/alerts/toggle_alert_flyout_button.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/alerts/toggle_alert_flyout_button.tsx index 0ff7d0518e7d6..96c00d08843b5 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/alerts/toggle_alert_flyout_button.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/alerts/toggle_alert_flyout_button.tsx @@ -100,8 +100,8 @@ export const ToggleAlertFlyoutButton = () => { }; const noWritePermissionsTooltipContent = i18n.translate( - 'xpack.synthetics.alertDropdown.noWritePermissions', + 'xpack.synthetics.alertDropdown.noPermissions', { - defaultMessage: 'You need read-write access to Uptime to create alerts in this app.', + defaultMessage: 'You do not have sufficient permissions to perform this action.', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/monitor_details_panel.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/monitor_details_panel.tsx index 5cddb55074c24..dffc3b1f357b6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/monitor_details_panel.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/monitor_details_panel.tsx @@ -235,7 +235,7 @@ const TAGS_LABEL = i18n.translate('xpack.synthetics.management.monitorList.tags' }); const ENABLED_LABEL = i18n.translate('xpack.synthetics.detailsPanel.monitorDetails.enabled', { - defaultMessage: 'Enabled', + defaultMessage: 'Enabled (all locations)', }); const MONITOR_TYPE_LABEL = i18n.translate( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/wrappers/service_allowed_wrapper.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/wrappers/service_allowed_wrapper.tsx index bbed7797e94e3..32fa6cba8f5a1 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/wrappers/service_allowed_wrapper.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/wrappers/service_allowed_wrapper.tsx @@ -51,13 +51,13 @@ const REQUEST_ACCESS_LABEL = i18n.translate('xpack.synthetics.monitorManagement. }); export const MONITOR_MANAGEMENT_LABEL = i18n.translate('xpack.synthetics.monitorManagement.label', { - defaultMessage: 'Monitor Management', + defaultMessage: 'Synthetics App', }); const LOADING_MONITOR_MANAGEMENT_LABEL = i18n.translate( 'xpack.synthetics.monitorManagement.loading.label', { - defaultMessage: 'Loading Monitor Management', + defaultMessage: 'Loading Synthetics App', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/form_fields/service_locations.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/form_fields/service_locations.tsx index 5c6d242f87b37..e59ca668ac81c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/form_fields/service_locations.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/form_fields/service_locations.tsx @@ -31,7 +31,7 @@ export const ServiceLocationsField = ({ @@ -70,6 +70,13 @@ const SELECT_ONE_OR_MORE_LOCATIONS = i18n.translate( } ); +const SELECT_ONE_OR_MORE_LOCATIONS_DETAILS = i18n.translate( + 'xpack.synthetics.monitorManagement.selectOneOrMoreLocationsDetails', + { + defaultMessage: 'Select locations where monitors will be executed.', + } +); + const LOCATIONS_LABEL = i18n.translate('xpack.synthetics.monitorManagement.locationsLabel', { defaultMessage: 'Locations', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/steps/read_only_callout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/steps/read_only_callout.tsx index 6a3d2fda361f0..d20453be1c2ed 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/steps/read_only_callout.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/steps/read_only_callout.tsx @@ -22,7 +22,7 @@ export const ReadOnlyCallout = ({ projectId }: { projectId?: string }) => {

{projectId} }} />

diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/search_field.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/search_field.tsx index 01e9beda8a7e1..5ff1eaf742fca 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/search_field.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/search_field.tsx @@ -56,5 +56,5 @@ export function SearchField() { } const PLACEHOLDER_TEXT = i18n.translate('xpack.synthetics.monitorManagement.filter.placeholder', { - defaultMessage: `Search by name, url, host, tag, project or location`, + defaultMessage: `Search by name, URL, host, tag, project or location`, }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/labels.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/labels.ts index ff297267dcb62..45100e71fda61 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/labels.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/labels.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export const LOADING_LABEL = i18n.translate( 'xpack.synthetics.monitorManagement.manageMonitorLoadingLabel', { - defaultMessage: 'Loading Monitor Management', + defaultMessage: 'Loading Synthetics App', } ); @@ -24,14 +24,14 @@ export const LEARN_MORE_LABEL = i18n.translate( export const CALLOUT_MANAGEMENT_DISABLED = i18n.translate( 'xpack.synthetics.monitorManagement.callout.disabled', { - defaultMessage: 'Monitor Management is currently disabled', + defaultMessage: 'Synthetics App is currently disabled', } ); export const CALLOUT_MANAGEMENT_CONTACT_ADMIN = i18n.translate( 'xpack.synthetics.monitorManagement.callout.disabled.adminContact', { - defaultMessage: 'Monitor Management will be enabled when an admin visits the Synthetics app.', + defaultMessage: 'Synthetics App will be enabled when an admin visits the Synthetics app.', } ); @@ -39,28 +39,28 @@ export const CALLOUT_MANAGEMENT_DESCRIPTION = i18n.translate( 'xpack.synthetics.monitorManagement.callout.description.disabled', { defaultMessage: - "Monitor Management requires a valid API key to run your monitors on Elastic's global managed testing locations. If you already had enabled Monitor Management previously, the API key may no longer be valid.", + "Synthetics App requires a valid API key to run your monitors on Elastic's global managed testing locations. If you already had enabled Synthetics App previously, the API key may no longer be valid.", } ); export const ERROR_HEADING_BODY = i18n.translate( 'xpack.synthetics.monitorManagement.editMonitorError.description', { - defaultMessage: 'Monitor Management settings could not be loaded. Please contact Support.', + defaultMessage: 'Synthetics App settings could not be loaded. Please contact Support.', } ); export const SYNTHETICS_ENABLE_LABEL = i18n.translate( 'xpack.synthetics.monitorManagement.syntheticsEnableLabel.management', { - defaultMessage: 'Enable Monitor Management', + defaultMessage: 'Enable Synthetics App', } ); export const ERROR_HEADING_LABEL = i18n.translate( 'xpack.synthetics.monitorManagement.editMonitorError', { - defaultMessage: 'Error loading Monitor Management', + defaultMessage: 'Error loading Synthetics App', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.tsx index d6dbf0465b066..ae5a035b76b54 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.tsx @@ -24,7 +24,7 @@ export const MonitorAsyncError = () => { title={ } color="warning" @@ -33,7 +33,7 @@ export const MonitorAsyncError = () => {

    diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/labels.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/labels.ts index 961e0c3782e81..506e446fe8a74 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/labels.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/labels.ts @@ -7,47 +7,25 @@ import { i18n } from '@kbn/i18n'; -export const SYNTHETICS_ENABLE_SUCCESS = i18n.translate( - 'xpack.synthetics.monitorManagement.syntheticsEnableSuccess', +export const SYNTHETICS_APP_ENABLEMENT_TITLE = i18n.translate( + 'xpack.synthetics.emptyState.enablement.title', { - defaultMessage: 'Monitor Management enabled successfully.', + defaultMessage: 'Monitor the status of your services and applications with Synthetics', } ); -export const SYNTHETICS_DISABLE_SUCCESS = i18n.translate( - 'xpack.synthetics.monitorManagement.syntheticsDisabledSuccess', - { - defaultMessage: 'Monitor Management disabled successfully.', - } -); - -export const MONITOR_MANAGEMENT_ENABLEMENT_LABEL = i18n.translate( - 'xpack.synthetics.monitorManagement.emptyState.enablement.enabled.title', - { - defaultMessage: 'Enable Monitor Management', - } -); - -export const SYNTHETICS_APP_DISABLED_LABEL = i18n.translate( - 'xpack.synthetics.emptyState.enablement.disabled.title', - { - defaultMessage: 'Synthetics App is disabled', - } -); - -export const MONITOR_MANAGEMENT_ENABLEMENT_MESSAGE = i18n.translate( - 'xpack.synthetics.monitorManagement.emptyState.enablement', +export const MONITOR_MANAGEMENT_DISABLED_MESSAGE = i18n.translate( + 'xpack.synthetics.emptyState.enablement.disabledDescription', { defaultMessage: - 'Enable Monitor Management to run lightweight and real-browser monitors from hosted testing locations around the world. Enabling Monitor Management will generate an API key to allow the Synthetics Service to write back to your Elasticsearch cluster.', + 'Run automated checks based on real-browser simulations and lightweight endpoint pings to measure the experience of your users from any location worldwide.', } ); -export const MONITOR_MANAGEMENT_DISABLED_MESSAGE = i18n.translate( - 'xpack.synthetics.emptyState.enablement.disabledDescription', +export const MONITOR_MANAGEMENT_CONTACT_ADMINISTRATOR = i18n.translate( + 'xpack.synthetics.emptyState.enablement.contactAdministrator', { - defaultMessage: - 'Synthetics App is currently disabled. Synthetics App allows you to run lightweight and real-browser monitors from hosted testing locations around the world. To enable Synthetics App, please contact an administrator.', + defaultMessage: 'Only administrators can enable this feature.', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/synthetics_enablement.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/synthetics_enablement.tsx index e4fcee12f65a5..4324bba250a1a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/synthetics_enablement.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/synthetics_enablement.tsx @@ -5,55 +5,24 @@ * 2.0. */ -import React, { useState, useEffect, useRef } from 'react'; +import React from 'react'; import { EuiEmptyPrompt, EuiTitle, EuiLink } from '@elastic/eui'; import { useEnablement } from '../../../../hooks/use_enablement'; -import { kibanaService } from '../../../../../../utils/kibana_service'; import * as labels from './labels'; export const EnablementEmptyState = () => { - const { error, enablement, loading } = useEnablement(); - const [shouldFocusEnablementButton, setShouldFocusEnablementButton] = useState(false); - const [isEnabling, setIsEnabling] = useState(false); + const { enablement, loading } = useEnablement(); const { isEnabled } = enablement; - const isEnabledRef = useRef(isEnabled); - const buttonRef = useRef(null); - - useEffect(() => { - if (!isEnabled && isEnabledRef.current === true) { - /* shift focus to enable button when enable toggle disappears. Prevent - * focus loss on the page */ - setShouldFocusEnablementButton(true); - } - isEnabledRef.current = Boolean(isEnabled); - }, [isEnabled]); - - useEffect(() => { - if (isEnabling && isEnabled) { - setIsEnabling(false); - kibanaService.toasts.addSuccess({ - title: labels.SYNTHETICS_ENABLE_SUCCESS, - toastLifeTimeMs: 3000, - }); - } else if (isEnabling && error) { - setIsEnabling(false); - kibanaService.toasts.addSuccess({ - title: labels.SYNTHETICS_DISABLE_SUCCESS, - toastLifeTimeMs: 3000, - }); - } - }, [isEnabled, isEnabling, error]); - - useEffect(() => { - if (shouldFocusEnablementButton) { - buttonRef.current?.focus(); - } - }, [shouldFocusEnablementButton]); return !isEnabled && !loading ? ( {labels.SYNTHETICS_APP_DISABLED_LABEL}} - body={

    {labels.MONITOR_MANAGEMENT_DISABLED_MESSAGE}

    } + title={

    {labels.SYNTHETICS_APP_ENABLEMENT_TITLE}

    } + body={ + <> +

    {labels.MONITOR_MANAGEMENT_DISABLED_MESSAGE}

    +

    {labels.MONITOR_MANAGEMENT_CONTACT_ADMINISTRATOR}

    + + } footer={ <> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx index 99f199b52498e..ce8d29ca345c4 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx @@ -140,7 +140,7 @@ describe('ActionsPopover', () => { locationId={testMonitor.location.id} /> ); - const enableButton = getByText('Disable monitor'); + const enableButton = getByText('Disable monitor (all locations)'); fireEvent.click(enableButton); expect(updateMonitorEnabledState).toHaveBeenCalledTimes(1); expect(updateMonitorEnabledState.mock.calls[0]).toEqual([false]); @@ -162,7 +162,7 @@ describe('ActionsPopover', () => { locationId={testMonitor.location.id} /> ); - const enableButton = getByText('Enable monitor'); + const enableButton = getByText('Enable monitor (all locations)'); fireEvent.click(enableButton); expect(updateMonitorEnabledState).toHaveBeenCalledTimes(1); expect(updateMonitorEnabledState.mock.calls[0]).toEqual([true]); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx index 90822b63dccfa..26e752f62a274 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx @@ -350,28 +350,28 @@ const loadingLabel = (isEnabled: boolean) => const enableMonitorLabel = i18n.translate( 'xpack.synthetics.overview.actions.enableLabelEnableMonitor', { - defaultMessage: 'Enable monitor', + defaultMessage: 'Enable monitor (all locations)', } ); const disableMonitorLabel = i18n.translate( 'xpack.synthetics.overview.actions.enableLabelDisableMonitor', { - defaultMessage: 'Disable monitor', + defaultMessage: 'Disable monitor (all locations)', } ); const disableAlertLabel = i18n.translate( 'xpack.synthetics.overview.actions.disableLabelDisableAlert', { - defaultMessage: 'Disable status alerts', + defaultMessage: 'Disable status alerts (all locations)', } ); const enableMonitorAlertLabel = i18n.translate( 'xpack.synthetics.overview.actions.enableLabelDisableAlert', { - defaultMessage: 'Enable status alerts', + defaultMessage: 'Enable status alerts (all locations)', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx index 33138c33851c9..18f7b25055a6b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx @@ -391,7 +391,7 @@ const PREVIOUS_PERIOD_SERIES_NAME = i18n.translate( ); const ENABLED_ITEM_TEXT = i18n.translate('xpack.synthetics.monitorList.enabledItemText', { - defaultMessage: 'Enabled', + defaultMessage: 'Enabled (all locations)', }); const CLOSE_FLYOUT_TEXT = i18n.translate('xpack.synthetics.monitorList.closeFlyoutText', { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/route_config.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/route_config.tsx index 57f40f5676593..0ac6a3ccc0f7e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/route_config.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/route_config.tsx @@ -44,7 +44,7 @@ export const getMonitorsRoute = ( }, { title: i18n.translate('xpack.synthetics.monitorManagementRoute.title', { - defaultMessage: 'Monitor Management | {baseTitle}', + defaultMessage: 'Synthetics Management | {baseTitle}', values: { baseTitle }, }), path: MONITORS_ROUTE, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/alert_defaults_form.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/alert_defaults_form.tsx index 2c81ccf1d86e7..f87f1267efcc3 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/alert_defaults_form.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/alert_defaults_form.tsx @@ -93,7 +93,7 @@ export const AlertDefaultsForm = () => { description={ } > diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/translations.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/translations.ts index 12d30b2d6b912..a6761c4cc6994 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/translations.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/alerting_defaults/translations.ts @@ -11,7 +11,7 @@ export const alertFormI18n = { inputPlaceHolder: i18n.translate( 'xpack.synthetics.sourceConfiguration.alertDefaultForm.selectConnector', { - defaultMessage: 'Please select one or more connectors', + defaultMessage: 'Select one or more connectors', } ), emailPlaceHolder: i18n.translate( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx index 959520c911469..cfaf62f891599 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx @@ -37,8 +37,8 @@ export const DeleteLocation = ({ const deleteDisabledReason = !canSaveIntegrations ? CANNOT_SAVE_INTEGRATION_LABEL : i18n.translate('xpack.synthetics.monitorManagement.cannotDelete.description', { - defaultMessage: `This location cannot be deleted, because it has {monCount, number} {monCount, plural,one {monitor} other {monitors}} running. - Please remove this location from your monitors before deleting this location.`, + defaultMessage: `You can't delete this location because it is used in {monCount, number} {monCount, plural,one {monitor} other {monitors}}. + Remove this location from all monitors first.`, values: { monCount }, }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx index a008da59751b1..525b088f1f6c0 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx @@ -35,7 +35,7 @@ export const ViewLocationMonitors = ({ {locationName} }} /> @@ -66,7 +66,7 @@ export const ViewLocationMonitors = ({ const VIEW_LOCATION_MONITORS = i18n.translate( 'xpack.synthetics.monitorManagement.viewLocationMonitors', { - defaultMessage: 'View location monitors', + defaultMessage: 'View monitors', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/browser/browser_test_results.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/browser/browser_test_results.tsx index 7665538d7682b..6e0ebbf2d4aa8 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/browser/browser_test_results.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/browser/browser_test_results.tsx @@ -174,7 +174,7 @@ export const FAILED_TO_RUN = i18n.translate('xpack.synthetics.monitorManagement. defaultMessage: 'Failed to run steps', }); -export const ERROR_RUNNING_TEST = i18n.translate('xpack.synthetics.testRun.runErrorLabel', { +export const ERROR_RUNNING_TEST = i18n.translate('xpack.synthetics.testRun.testErrorLabel', { defaultMessage: 'Error running test', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_run_once_errors.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_run_once_errors.ts index 9859b5b0216bc..36611914264db 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_run_once_errors.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_run_once_errors.ts @@ -7,7 +7,6 @@ import { useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { kibanaService } from '../../../../../utils/kibana_service'; import { Locations, ServiceLocationErrors } from '../../monitor_add_edit/types'; export function useRunOnceErrors({ @@ -77,7 +76,7 @@ export function useRunOnceErrors({ title: RunErrorLabel, }, ] - : [{ name: 'Error', message: PushErrorService, title: PushErrorLabel }]; + : [{ name: 'Error', message: PushErrorService, title: RunErrorLabel }]; } else if (locationErrors?.length > 0) { // If only some of the locations were unsuccessful return locationErrors @@ -93,41 +92,25 @@ export function useRunOnceErrors({ return []; }, [locationsById, locationErrors, locationErrorReasons, hasBlockingError]); - useEffect(() => { - if (showErrors) { - errorMessages.forEach( - ({ name, message, title }: { name: string; message: string; title: string }) => { - kibanaService.toasts.addError({ name, message }, { title }); - } - ); - } - }, [errorMessages, showErrors]); - return { expectPings, hasBlockingError, - blockingErrorTitle: hasBlockingError ? PushErrorLabel : null, - blockingErrorMessage: hasBlockingError - ? `${PushErrorService} ${errorMessages[0]?.message}` - : null, + blockingErrorTitle: hasBlockingError ? RunErrorLabel : null, + blockingErrorMessage: hasBlockingError ? `${errorMessages[0]?.message}` : null, errorMessages, }; } -const PushErrorLabel = i18n.translate('xpack.synthetics.testRun.pushErrorLabel', { - defaultMessage: 'Push error', -}); - const RunErrorLabel = i18n.translate('xpack.synthetics.testRun.runErrorLabel', { - defaultMessage: 'Error running test', + defaultMessage: "Can't run the test now", }); const getLocationTestErrorLabel = (locationName: string, reason: string) => i18n.translate('xpack.synthetics.testRun.runErrorLocation.reason', { - defaultMessage: 'Failed to run monitor on location {locationName}. {reason}', + defaultMessage: 'Failed to run test on location {locationName}. {reason}', values: { locationName, reason }, }); const PushErrorService = i18n.translate('xpack.synthetics.testRun.pushError', { - defaultMessage: 'Failed to push the monitor to service.', + defaultMessage: 'This test cannot be executed at this time. Try again later.', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/alert_rules/effects.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/alert_rules/effects.ts index e49d84ba9c6b6..fb092adbcab33 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/alert_rules/effects.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/alert_rules/effects.ts @@ -39,7 +39,7 @@ export function* updateDefaultAlertingEffect() { const successMessage = i18n.translate('xpack.synthetics.settings.enableAlerting', { defaultMessage: - 'Monitor status rule type successfully updated. Next rule alerts will take the changes into account.', + 'Monitor status rule successfully updated. Changes will take effect on the next rule execution.', }); const failureMessage = i18n.translate('xpack.synthetics.settings.enabledAlert.fail', { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/synthetics_enablement/effects.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/synthetics_enablement/effects.ts index 14c912b07ce99..a840d7d4057bc 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/synthetics_enablement/effects.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/synthetics_enablement/effects.ts @@ -29,5 +29,5 @@ export function* fetchSyntheticsEnablementEffect() { } const failureMessage = i18n.translate('xpack.synthetics.settings.enablement.fail', { - defaultMessage: 'Failed to enable Monitor Management', + defaultMessage: 'Failed to enable Synthetics App', }); diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/translations.ts b/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/translations.ts index 5f5afc048f840..8d00c6ca948da 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/translations.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/translations.ts @@ -28,7 +28,7 @@ export const alertFormI18n = { inputPlaceHolder: i18n.translate( 'xpack.synthetics.sourceConfiguration.alertDefaultForm.selectConnector', { - defaultMessage: 'Please select one or more connectors', + defaultMessage: 'Select one or more connectors', } ), emailPlaceHolder: i18n.translate( diff --git a/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.ts b/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.ts index 79af4d6cfc718..e92f5956741b5 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.ts @@ -126,7 +126,7 @@ export const generateAPIKey = async ({ /* Not exposed to the user. May grant as internal user */ return security.authc.apiKeys?.grantAsInternalUser(request, { - name: 'synthetics-api-key (required for monitor management)', + name: 'synthetics-api-key (required for Synthetics App)', role_descriptors: { synthetics_writer: serviceApiKeyPrivileges, }, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 48862f5df1a5c..ab9355da1cdc6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -34750,9 +34750,7 @@ "xpack.synthetics.monitorManagement.editMonitorCrumb": "Modifier le moniteur", "xpack.synthetics.monitorManagement.editMonitorError": "Erreur lors du chargement de la liste Gestion des moniteurs", "xpack.synthetics.monitorManagement.editMonitorError.description": "Les paramètres de Gestion des moniteurs n'ont pas pu être chargés. Veuillez contacter le support technique.", - "xpack.synthetics.monitorManagement.emptyState.enablement": "Activez la Gestion des moniteurs pour exécuter des moniteurs légers et basés sur un navigateur réel à partir d'emplacements de test hébergés dans le monde entier. L'activation de la Gestion des moniteurs générera une clé d'API pour autoriser le service Synthetics à mettre à jour votre cluster Elasticsearch.", "xpack.synthetics.monitorManagement.emptyState.enablement.doc": "Lisez les documents", - "xpack.synthetics.monitorManagement.emptyState.enablement.enabled.title": "Activer la Gestion des moniteurs", "xpack.synthetics.monitorManagement.emptyState.enablement.learnMore": "Envie d'en savoir plus ?", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "Activer", "xpack.synthetics.monitorManagement.failed": "ÉCHOUÉ", @@ -34818,9 +34816,7 @@ "xpack.synthetics.monitorManagement.startAddingLocationsDescription": "Les emplacements privés vous permettent d'exploiter des moniteurs depuis vos propres locaux. Ils nécessitent un agent Elastic et une politique d'agent que vous pouvez contrôler et maintenir via Fleet.", "xpack.synthetics.monitorManagement.steps": "Étapes", "xpack.synthetics.monitorManagement.summary.heading": "Résumé", - "xpack.synthetics.monitorManagement.syntheticsDisabledSuccess": "Gestion des moniteurs désactivée avec succès.", "xpack.synthetics.monitorManagement.syntheticsEnableLabel.management": "Activer la Gestion des moniteurs", - "xpack.synthetics.monitorManagement.syntheticsEnableSuccess": "Gestion des moniteurs activée avec succès.", "xpack.synthetics.monitorManagement.testResult": "Résultat du test", "xpack.synthetics.monitorManagement.testResults": "Résultats de test", "xpack.synthetics.monitorManagement.testRuns.label": "Exécutions de test", @@ -35204,7 +35200,6 @@ "xpack.synthetics.testResults.expandedRow.response_body.notRecorded": "Corps non enregistré. Définissez l'option du corps de la réponse de l'index sur \"Toujours activé\" dans les options avancées de la configuration du moniteur pour enregistrer le corps.", "xpack.synthetics.testRun.description": "Tester votre moniteur et vérifier les résultats avant d'enregistrer", "xpack.synthetics.testRun.pushError": "Impossible d'envoyer le moniteur vers le service.", - "xpack.synthetics.testRun.pushErrorLabel": "Erreur d'envoi", "xpack.synthetics.testRun.pushing.description": "Envoi du moniteur vers le service...", "xpack.synthetics.testRun.runErrorLabel": "Erreur lors de l'exécution du test", "xpack.synthetics.testRunDetailsRoute.page.title": "Détails de l'exécution du test", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5b3df7abbb56d..b37c022f7c680 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -34729,9 +34729,7 @@ "xpack.synthetics.monitorManagement.editMonitorCrumb": "モニターを編集", "xpack.synthetics.monitorManagement.editMonitorError": "モニター管理の読み込みエラー", "xpack.synthetics.monitorManagement.editMonitorError.description": "モニター管理設定を読み込めませんでした。サポートに問い合わせてください。", - "xpack.synthetics.monitorManagement.emptyState.enablement": "モニター管理を有効にすると、世界中のホスティングされたテスト場所から軽量でリアルなブラウザーモニターを実行できます。モニター管理を有効にすると、APIキーが生成され、SyntheticsサービスはElasticsearchクラスターに書き込むことができます。", "xpack.synthetics.monitorManagement.emptyState.enablement.doc": "ドキュメントを読む", - "xpack.synthetics.monitorManagement.emptyState.enablement.enabled.title": "モニター管理を有効にする", "xpack.synthetics.monitorManagement.emptyState.enablement.learnMore": "詳細について", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "有効にする", "xpack.synthetics.monitorManagement.failed": "失敗", @@ -34797,9 +34795,7 @@ "xpack.synthetics.monitorManagement.startAddingLocationsDescription": "非公開の場所では、独自の施設からモニターを実行できます。Fleet経由で制御および保守できるElasticエージェントとエージェントポリシーが必要です。", "xpack.synthetics.monitorManagement.steps": "ステップ", "xpack.synthetics.monitorManagement.summary.heading": "まとめ", - "xpack.synthetics.monitorManagement.syntheticsDisabledSuccess": "モニター管理は正常に無効にされました。", "xpack.synthetics.monitorManagement.syntheticsEnableLabel.management": "モニター管理を有効にする", - "xpack.synthetics.monitorManagement.syntheticsEnableSuccess": "モニター管理は正常に有効にされました。", "xpack.synthetics.monitorManagement.testResult": "テスト結果", "xpack.synthetics.monitorManagement.testResults": "テスト結果", "xpack.synthetics.monitorManagement.testRuns.label": "テスト実行", @@ -35183,7 +35179,6 @@ "xpack.synthetics.testResults.expandedRow.response_body.notRecorded": "本文が記録されていません。モニター設定の詳細オプションで、インデックス応答オプションを[常時]に設定して、本文を記録します。", "xpack.synthetics.testRun.description": "モニターをテストし、保存する前に結果を検証します", "xpack.synthetics.testRun.pushError": "モニターをサービスにプッシュできませんでした。", - "xpack.synthetics.testRun.pushErrorLabel": "プッシュエラー", "xpack.synthetics.testRun.pushing.description": "モニターをサービスにプッシュしています...", "xpack.synthetics.testRun.runErrorLabel": "テストの実行エラー", "xpack.synthetics.testRunDetailsRoute.page.title": "テスト実行詳細", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 15f4b4228a7f1..74b669f2e78c9 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -34746,9 +34746,7 @@ "xpack.synthetics.monitorManagement.editMonitorCrumb": "编辑监测", "xpack.synthetics.monitorManagement.editMonitorError": "加载监测管理时出错", "xpack.synthetics.monitorManagement.editMonitorError.description": "无法加载监测管理设置。请联系支持人员。", - "xpack.synthetics.monitorManagement.emptyState.enablement": "启用监测管理以从全球托管测试地点运行轻量级、真正的浏览器监测。启用监测管理将生成 API 密钥,以便 Synthetics 服务回写 Elasticsearch 集群。", "xpack.synthetics.monitorManagement.emptyState.enablement.doc": "阅读文档", - "xpack.synthetics.monitorManagement.emptyState.enablement.enabled.title": "启用监测管理", "xpack.synthetics.monitorManagement.emptyState.enablement.learnMore": "希望了解详情?", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "启用", "xpack.synthetics.monitorManagement.failed": "失败", @@ -34814,9 +34812,7 @@ "xpack.synthetics.monitorManagement.startAddingLocationsDescription": "专用位置供您从自己的场所运行监测。它们需要可以通过 Fleet 进行控制和维护的 Elastic 代理和代理策略。", "xpack.synthetics.monitorManagement.steps": "步长", "xpack.synthetics.monitorManagement.summary.heading": "摘要", - "xpack.synthetics.monitorManagement.syntheticsDisabledSuccess": "已成功禁用监测管理。", "xpack.synthetics.monitorManagement.syntheticsEnableLabel.management": "启用监测管理", - "xpack.synthetics.monitorManagement.syntheticsEnableSuccess": "已成功启用监测管理。", "xpack.synthetics.monitorManagement.testResult": "测试结果", "xpack.synthetics.monitorManagement.testResults": "测试结果", "xpack.synthetics.monitorManagement.testRuns.label": "测试运行", @@ -35200,7 +35196,6 @@ "xpack.synthetics.testResults.expandedRow.response_body.notRecorded": "正文未记录。在监测配置的高级选项中将索引响应正文选项设置为“始终打开”以记录正文。", "xpack.synthetics.testRun.description": "请在保存前测试您的监测并验证结果", "xpack.synthetics.testRun.pushError": "无法推送监测到服务。", - "xpack.synthetics.testRun.pushErrorLabel": "推送错误", "xpack.synthetics.testRun.pushing.description": "正在推送监测到服务......", "xpack.synthetics.testRun.runErrorLabel": "运行测试时出错", "xpack.synthetics.testRunDetailsRoute.page.title": "测试运行详情", diff --git a/x-pack/test/api_integration/apis/synthetics/synthetics_enablement.ts b/x-pack/test/api_integration/apis/synthetics/synthetics_enablement.ts index bf68da4c148f5..3a0713431efb4 100644 --- a/x-pack/test/api_integration/apis/synthetics/synthetics_enablement.ts +++ b/x-pack/test/api_integration/apis/synthetics/synthetics_enablement.ts @@ -248,7 +248,7 @@ export default function ({ getService }: FtrProviderContext) { overwrite: true, attributes: { id: apiKeyResult.body.id, - name: 'synthetics-api-key (required for monitor management)', + name: 'synthetics-api-key (required for Synthetics App)', apiKey: apiKeyResult.body.api_key, }, });