From 1ddb5937928e0f9aed6f3e97f799afff9b1d4ce7 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 11:07:58 -0400 Subject: [PATCH 01/20] adjust content --- .../fleet/server/types/models/preconfiguration.ts | 2 +- .../e2e/journeys/synthetics/management_list.journey.ts | 6 +++--- .../getting_started/form_fields/service_locations.tsx | 9 ++++++++- .../components/monitors_page/common/search_field.tsx | 2 +- .../settings/alerting_defaults/alert_defaults_form.tsx | 2 +- .../settings/alerting_defaults/translations.ts | 2 +- .../settings/private_locations/delete_location.tsx | 4 ++-- .../private_locations/view_location_monitors.tsx | 4 ++-- .../public/apps/synthetics/state/alert_rules/effects.ts | 2 +- 9 files changed, 20 insertions(+), 13 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/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/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/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..37f8a5ac18637 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: `This location cannot be deleted, because it has {monCount, number} {monCount, plural,one {monitor} other {monitors}} configured. + Please remove this location from your {monCount, plural,one {monitor} other {monitors}} before deleting this location.`, 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..4f38e7ac005bd 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 configured monitors', } ); 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', { From 59afd3a07c1e41933145da4f94dd954cd87bb5e4 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 11:12:07 -0400 Subject: [PATCH 02/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx --- .../components/settings/private_locations/delete_location.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 37f8a5ac18637..cbef4fec1a0d4 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 @@ -38,7 +38,7 @@ export const DeleteLocation = ({ ? 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}} configured. - Please remove this location from your {monCount, plural,one {monitor} other {monitors}} before deleting this location.`, + Remove this location from your {monCount, plural,one {monitor} other {monitors}} before deleting this location.`, values: { monCount }, }); From e1932b658e63a5c94612395f6afadfc4f924f383 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 11:27:43 -0400 Subject: [PATCH 03/20] adjust content --- .../public/legacy_uptime/components/settings/translations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From 1565df81d36dbcbc805b9a3af266f3b22f3678a7 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 16:02:05 -0400 Subject: [PATCH 04/20] adjust tooltip content --- .../components/alerts/toggle_alert_flyout_button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.', } ); From fe1e4b4881fbb4a1949a0de1d9e92d02fe8904cd Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 16:23:59 -0400 Subject: [PATCH 05/20] adjust error content for run once --- .../hooks/use_run_once_errors.ts | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) 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..b8cfa95869b6e 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,31 +92,15 @@ 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', }); From 30ba1919d0f0d1d3d03166504dd3d3eb7047ad72 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 27 Apr 2023 17:13:44 -0400 Subject: [PATCH 06/20] remove unused translations --- x-pack/plugins/translations/translations/fr-FR.json | 1 - x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 3 files changed, 3 deletions(-) diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5fa53e035d76b..5aa46742088a4 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -35197,7 +35197,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 77b406f88495a..9b67d5ee92247 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -35176,7 +35176,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 0f3fdbdcf15b4..367e870dabbbc 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -35193,7 +35193,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": "测试运行详情", From 3ecd1f241c2d41bcb13a3ede7f89d994c8cb6b9d Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 10:31:23 -0400 Subject: [PATCH 07/20] replace references to monitor management with synthetics app --- .../wrappers/service_allowed_wrapper.tsx | 4 +- .../monitors_page/management/labels.ts | 14 +++---- .../synthetics_enablement/labels.ts | 25 +----------- .../synthetics_enablement.tsx | 40 +------------------ .../components/monitors_page/route_config.tsx | 2 +- .../hooks/use_run_once_errors.ts | 6 +-- .../state/synthetics_enablement/effects.ts | 2 +- .../server/synthetics_service/get_api_key.ts | 2 +- .../apis/synthetics/synthetics_enablement.ts | 2 +- 9 files changed, 20 insertions(+), 77 deletions(-) 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/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/synthetics_enablement/labels.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/synthetics_enablement/labels.ts index 961e0c3782e81..76c332ca9dedd 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,27 +7,6 @@ import { i18n } from '@kbn/i18n'; -export const SYNTHETICS_ENABLE_SUCCESS = i18n.translate( - 'xpack.synthetics.monitorManagement.syntheticsEnableSuccess', - { - defaultMessage: 'Monitor Management enabled successfully.', - } -); - -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', { @@ -39,7 +18,7 @@ export const MONITOR_MANAGEMENT_ENABLEMENT_MESSAGE = i18n.translate( 'xpack.synthetics.monitorManagement.emptyState.enablement', { 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.', + 'Enable Synthetics App to run lightweight and real-browser monitors from hosted testing locations around the world. Enabling Synthetics App will generate an API key to allow the Synthetics Service to write back to your Elasticsearch cluster.', } ); @@ -47,7 +26,7 @@ export const MONITOR_MANAGEMENT_DISABLED_MESSAGE = i18n.translate( 'xpack.synthetics.emptyState.enablement.disabledDescription', { 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.', + 'Synthetics App is currently disabled. Synthetics App allows you to run lightweight and real-browser monitors from hosted testing locations around the world. Synthetics App will be enabled when an admin visits the Synthetics app.', } ); 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..91001790fe16b 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,50 +5,14 @@ * 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 ? ( 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/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/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/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, }, }); From 44163402233184626b80dede5b9198ee7b9da50d Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 10:55:52 -0400 Subject: [PATCH 08/20] adjust content --- .../components/test_now_mode/browser/browser_test_results.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', }); From 7a2e8574d71fe83359ddccde6707804747d8df2d Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 11:06:23 -0400 Subject: [PATCH 09/20] clarify actions that are applied to all locations --- .../common/components/monitor_details_panel.tsx | 2 +- .../monitors_page/overview/overview/actions_popover.tsx | 8 ++++---- .../overview/overview/monitor_detail_flyout.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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/monitors_page/overview/overview/actions_popover.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx index 019a8c3972d65..1d36de74594e2 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 @@ -345,28 +345,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', { From b2460d3aabe685fa73a1a5d0692583fe45ef5296 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 11:45:27 -0400 Subject: [PATCH 10/20] remove unused translations --- x-pack/plugins/translations/translations/fr-FR.json | 3 --- x-pack/plugins/translations/translations/ja-JP.json | 3 --- x-pack/plugins/translations/translations/zh-CN.json | 3 --- 3 files changed, 9 deletions(-) diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5aa46742088a4..d07d78d34bae8 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -34745,7 +34745,6 @@ "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É", @@ -34811,9 +34810,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", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 9b67d5ee92247..893e02db93e65 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -34724,7 +34724,6 @@ "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": "失敗", @@ -34790,9 +34789,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": "テスト実行", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 367e870dabbbc..6896fefd594f0 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -34741,7 +34741,6 @@ "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": "失败", @@ -34807,9 +34806,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": "测试运行", From 950e39e39839d6ca7bea83d10d097eaa56803fbe Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 12:53:31 -0400 Subject: [PATCH 11/20] adjust monitor sync error content --- .../management/monitor_errors/monitor_async_error.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = () => {

    From a75c318a076c30837491fc7981637a026bcecff3 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 13:52:41 -0400 Subject: [PATCH 12/20] update tests --- .../monitors_page/overview/overview/actions_popover.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]); From 82be10e316171cc11c7fdc93246439f98c13b3a6 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 14:09:08 -0400 Subject: [PATCH 13/20] adjust read only callout text --- .../components/monitor_add_edit/steps/read_only_callout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..32c37f54cc4d4 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} }} />

    From 6640fe919f511bc6552bf7f7ce3a7823215513d0 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 14:57:36 -0400 Subject: [PATCH 14/20] adjust enablement message for less privileged users --- .../synthetics_enablement/labels.ts | 19 +++++++++---------- .../synthetics_enablement.tsx | 9 +++++++-- 2 files changed, 16 insertions(+), 12 deletions(-) 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 76c332ca9dedd..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,26 +7,25 @@ import { i18n } from '@kbn/i18n'; -export const SYNTHETICS_APP_DISABLED_LABEL = i18n.translate( - 'xpack.synthetics.emptyState.enablement.disabled.title', +export const SYNTHETICS_APP_ENABLEMENT_TITLE = i18n.translate( + 'xpack.synthetics.emptyState.enablement.title', { - defaultMessage: 'Synthetics App is disabled', + defaultMessage: 'Monitor the status of your services and applications with Synthetics', } ); -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 Synthetics App to run lightweight and real-browser monitors from hosted testing locations around the world. Enabling Synthetics App 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. Synthetics App will be enabled when an admin visits the Synthetics app.', + 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 91001790fe16b..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 @@ -16,8 +16,13 @@ export const EnablementEmptyState = () => { 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={ <> From a907f9ce8dfe7b53ca7537158006f452b6dd0b6f Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Fri, 28 Apr 2023 15:50:38 -0400 Subject: [PATCH 15/20] remove unused translations --- x-pack/plugins/translations/translations/fr-FR.json | 1 - x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 3 files changed, 3 deletions(-) diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index d07d78d34bae8..21bb8750012aa 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -34743,7 +34743,6 @@ "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.learnMore": "Envie d'en savoir plus ?", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "Activer", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 893e02db93e65..19bab9e4baaf5 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -34722,7 +34722,6 @@ "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.learnMore": "詳細について", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "有効にする", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6896fefd594f0..a5e22d1177497 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -34739,7 +34739,6 @@ "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.learnMore": "希望了解详情?", "xpack.synthetics.monitorManagement.emptyState.enablement.title": "启用", From 8c72f1bf7c35b2b8aff06ff7273448030896c168 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 2 May 2023 08:49:56 -0400 Subject: [PATCH 16/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/steps/read_only_callout.tsx Co-authored-by: florent-leborgne --- .../components/monitor_add_edit/steps/read_only_callout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 32c37f54cc4d4..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} }} />

    From f1810eeed21601140ab0f7bfa36c93da4df75dc5 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 2 May 2023 08:50:48 -0400 Subject: [PATCH 17/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx Co-authored-by: florent-leborgne --- .../components/settings/private_locations/delete_location.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cbef4fec1a0d4..8653c9e246786 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 @@ -38,7 +38,7 @@ export const DeleteLocation = ({ ? 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}} configured. - Remove this location from your {monCount, plural,one {monitor} other {monitors}} before deleting this location.`, + Remove this location from all monitors first.`, values: { monCount }, }); From 6d29e645a483d95a6c0a0b6ae37685064108405a Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 2 May 2023 08:51:05 -0400 Subject: [PATCH 18/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/delete_location.tsx Co-authored-by: florent-leborgne --- .../components/settings/private_locations/delete_location.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8653c9e246786..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,7 +37,7 @@ 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}} configured. + 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 }, }); From 8c40515978dee5c4954052d1ad232ad2f11a1157 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 2 May 2023 08:51:40 -0400 Subject: [PATCH 19/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx Co-authored-by: florent-leborgne --- .../settings/private_locations/view_location_monitors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4f38e7ac005bd..5e751b5b61a7d 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} }} /> From 7d7570771d3377a84a24b4158f83bdc008d25f0d Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 2 May 2023 08:51:50 -0400 Subject: [PATCH 20/20] Update x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/view_location_monitors.tsx Co-authored-by: florent-leborgne --- .../settings/private_locations/view_location_monitors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5e751b5b61a7d..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 @@ -66,7 +66,7 @@ export const ViewLocationMonitors = ({ const VIEW_LOCATION_MONITORS = i18n.translate( 'xpack.synthetics.monitorManagement.viewLocationMonitors', { - defaultMessage: 'View configured monitors', + defaultMessage: 'View monitors', } );