From 82fd9497f6c99c2048b9923aad5c0456019a1579 Mon Sep 17 00:00:00 2001 From: Abdul Zahid Date: Wed, 22 Feb 2023 12:52:47 +0100 Subject: [PATCH 1/3] Remove Monitor Management tour. --- .../wrappers/service_allowed_wrapper.tsx | 9 +-- .../synthetics/hooks/use_service_allowed.ts | 2 +- .../common/header/manage_monitors_btn.tsx | 81 +++---------------- .../translations/translations/fr-FR.json | 4 - .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - 6 files changed, 18 insertions(+), 86 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 163ed0d37b7c3..59474a8f618dc 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 @@ -27,7 +27,7 @@ export const ServiceAllowedWrapper: React.FC = ({ children }) => { return ( {MONITOR_MANAGEMENT_LABEL}} - body={

{PUBLIC_BETA_DESCRIPTION}

} + body={

{ACCESS_RESTRICTED_MESSAGE}

} actions={[ {REQUEST_ACCESS_LABEL} @@ -55,10 +55,9 @@ const LOADING_MONITOR_MANAGEMENT_LABEL = i18n.translate( } ); -export const PUBLIC_BETA_DESCRIPTION = i18n.translate( - 'xpack.synthetics.monitorManagement.publicBetaDescription', +export const ACCESS_RESTRICTED_MESSAGE = i18n.translate( + 'xpack.synthetics.monitorManagement.accessRestricted', { - defaultMessage: - "We've got a brand new app on the way. In the meantime, we're excited to give you early access to our globally managed testing infrastructure. This will allow you to upload synthetic monitors using our new point and click script recorder and manage your monitors with a new UI.", + defaultMessage: 'Your access to globally managed testing infrastructure is restricted.', } ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_service_allowed.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_service_allowed.ts index 12a2ed7043973..2e2e0f1254acf 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_service_allowed.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_service_allowed.ts @@ -19,5 +19,5 @@ export const useSyntheticsServiceAllowed = () => { // return useSelector(syntheticsServiceAllowedSelector); // TODO Implement for Synthetics App - return { isAllowed: true, signupUrl: 'https://example.com', loading: false }; + return { isAllowed: true, signupUrl: undefined, loading: false }; }; diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/header/manage_monitors_btn.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/header/manage_monitors_btn.tsx index f8447d1cb2741..627f89b718742 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/header/manage_monitors_btn.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/header/manage_monitors_btn.tsx @@ -5,89 +5,34 @@ * 2.0. */ -import { EuiButton, EuiHeaderLink, EuiLink, EuiSpacer, EuiTourStep, EuiText } from '@elastic/eui'; +import { EuiHeaderLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useHistory } from 'react-router-dom'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; import { MONITOR_MANAGEMENT_ROUTE } from '../../../../../common/constants'; -import { PUBLIC_BETA_DESCRIPTION } from '../../../pages/monitor_management/service_allowed_wrapper'; export const ManageMonitorsBtn = () => { - const [isOpen, setIsOpen] = useLocalStorage('xpack.synthetics.monitorManagement.openTour', true); - const history = useHistory(); return ( - - -

{PUBLIC_BETA_DESCRIPTION}

-
- - - {MONITOR_MANAGEMENT_LABEL} - - - } - isStepOpen={isOpen} - onFinish={() => setIsOpen(false)} - step={1} - stepsTotal={1} - subtitle={NEW_LABEL} - title={GETTING_STARTED_LABEL} - anchorPosition="upCenter" - maxWidth={416} - footerAction={ - setIsOpen(false)}> - {DISMISS_LABEL} - - } + - - - -
+ + ); }; -const GETTING_STARTED_LABEL = i18n.translate( - 'xpack.synthetics.monitorManagement.gettingStarted.label', - { - defaultMessage: 'Get started with Synthetic Monitoring', - } -); - -const MONITOR_MANAGEMENT_LABEL = i18n.translate('xpack.synthetics.monitorManagement.try.label', { - defaultMessage: 'Try Monitor Management', -}); -const DISMISS_LABEL = i18n.translate('xpack.synthetics.monitorManagement.try.dismiss', { - defaultMessage: 'Dismiss', -}); - const NAVIGATE_LABEL = i18n.translate('xpack.synthetics.page_header.manageLink.label', { defaultMessage: 'Navigate to the Uptime Monitor Management page', }); - -const NEW_LABEL = i18n.translate('xpack.synthetics.monitorManagement.new.label', { - defaultMessage: 'New', -}); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 54d13791fa0d3..0329703d08dbc 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -33658,7 +33658,6 @@ "xpack.synthetics.monitorManagement.getAPIKeyLabel.label": "Clés d'API", "xpack.synthetics.monitorManagement.getAPIKeyLabel.loading": "Génération d’une clé d’API", "xpack.synthetics.monitorManagement.getAPIKeyReducedPermissions.description": "Utilisez une clé d’API pour transmettre des moniteurs à distance à partir d'un pipeline CLI ou CD. Pour générer une clé d’API, vous devez disposer des autorisations de gérer les clés d’API et d’un accès en écriture à Uptime. Veuillez contacter votre administrateur.", - "xpack.synthetics.monitorManagement.gettingStarted.label": "Lancez-vous avec Synthetic Monitoring", "xpack.synthetics.monitorManagement.heading": "Gestion des moniteurs", "xpack.synthetics.monitorManagement.hostFieldLabel": "Hôte", "xpack.synthetics.monitorManagement.inProgress": "EN COURS", @@ -33708,7 +33707,6 @@ "xpack.synthetics.monitorManagement.nameRequired": "Le nom de l’emplacement est requis", "xpack.synthetics.monitorManagement.needFleetReadAgentPoliciesPermission": "Vous n'êtes pas autorisé à accéder à Fleet. Des autorisations Fleet sont nécessaires pour créer de nouveaux emplacements privés.", "xpack.synthetics.monitorManagement.needPermissions": "Permissions requises", - "xpack.synthetics.monitorManagement.new.label": "Nouveauté", "xpack.synthetics.monitorManagement.noLabel": "Annuler", "xpack.synthetics.monitorManagement.overviewTab.title": "Aperçu", "xpack.synthetics.monitorManagement.pageHeader.title": "Gestion des moniteurs", @@ -33743,8 +33741,6 @@ "xpack.synthetics.monitorManagement.syntheticsEnableToolTip": "Activez la Gestion des moniteurs pour créer des moniteurs légers et basés sur un navigateur réel à partir d'emplacements du monde entier.", "xpack.synthetics.monitorManagement.techPreviewLabel": "Préversion technique", "xpack.synthetics.monitorManagement.testResult": "Résultat du test", - "xpack.synthetics.monitorManagement.try.dismiss": "Rejeter", - "xpack.synthetics.monitorManagement.try.label": "Essayer la Gestion des moniteurs", "xpack.synthetics.monitorManagement.updateMonitorLabel": "Mettre à jour le moniteur", "xpack.synthetics.monitorManagement.urlFieldLabel": "Url", "xpack.synthetics.monitorManagement.urlRequiredLabel": "L'URL est requise", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 774b9a54f191a..a6ecc4def183d 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -33629,7 +33629,6 @@ "xpack.synthetics.monitorManagement.getAPIKeyLabel.label": "API キー", "xpack.synthetics.monitorManagement.getAPIKeyLabel.loading": "APIキーを生成しています", "xpack.synthetics.monitorManagement.getAPIKeyReducedPermissions.description": "APIキーを使用して、CLIまたはCDパイプラインからリモートでモニターをプッシュします。APIキーを生成するには、APIキーを管理する権限とアップタイム書き込み権限が必要です。管理者にお問い合わせください。", - "xpack.synthetics.monitorManagement.gettingStarted.label": "Synthetic Monitoringの基本", "xpack.synthetics.monitorManagement.heading": "モニター管理", "xpack.synthetics.monitorManagement.hostFieldLabel": "ホスト", "xpack.synthetics.monitorManagement.inProgress": "進行中", @@ -33679,7 +33678,6 @@ "xpack.synthetics.monitorManagement.nameRequired": "場所名は必須です", "xpack.synthetics.monitorManagement.needFleetReadAgentPoliciesPermission": "Fleet へのアクセスが許可されていません。新しい非公開の場所を作成するには、Fleet権限が必要です。", "xpack.synthetics.monitorManagement.needPermissions": "権限が必要です", - "xpack.synthetics.monitorManagement.new.label": "新規", "xpack.synthetics.monitorManagement.noLabel": "キャンセル", "xpack.synthetics.monitorManagement.overviewTab.title": "概要", "xpack.synthetics.monitorManagement.pageHeader.title": "モニター管理", @@ -33714,8 +33712,6 @@ "xpack.synthetics.monitorManagement.syntheticsEnableToolTip": "モニター管理を有効にすると、世界中の場所から軽量でリアルなブラウザーモニターを作成できます。", "xpack.synthetics.monitorManagement.techPreviewLabel": "テクニカルプレビュー", "xpack.synthetics.monitorManagement.testResult": "テスト結果", - "xpack.synthetics.monitorManagement.try.dismiss": "閉じる", - "xpack.synthetics.monitorManagement.try.label": "モニター管理を試す", "xpack.synthetics.monitorManagement.updateMonitorLabel": "モニターの更新", "xpack.synthetics.monitorManagement.urlFieldLabel": "Url", "xpack.synthetics.monitorManagement.urlRequiredLabel": "URLが必要です", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 27e7ec4722827..5e3db53a250ba 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -33664,7 +33664,6 @@ "xpack.synthetics.monitorManagement.getAPIKeyLabel.label": "API 密钥", "xpack.synthetics.monitorManagement.getAPIKeyLabel.loading": "正在生成 API 密钥", "xpack.synthetics.monitorManagement.getAPIKeyReducedPermissions.description": "使用 API 密钥从 CLI 或 CD 管道远程推送监测。要生成 API 密钥,您必须有权管理 API 密钥并具有 Uptime 写入权限。请联系您的管理员。", - "xpack.synthetics.monitorManagement.gettingStarted.label": "开始使用 Synthetic 监测", "xpack.synthetics.monitorManagement.heading": "监测管理", "xpack.synthetics.monitorManagement.hostFieldLabel": "主机", "xpack.synthetics.monitorManagement.inProgress": "进行中", @@ -33714,7 +33713,6 @@ "xpack.synthetics.monitorManagement.nameRequired": "“位置名称”必填", "xpack.synthetics.monitorManagement.needFleetReadAgentPoliciesPermission": "您无权访问 Fleet。需要 Fleet 权限才能创建新的专用位置。", "xpack.synthetics.monitorManagement.needPermissions": "需要权限", - "xpack.synthetics.monitorManagement.new.label": "新建", "xpack.synthetics.monitorManagement.noLabel": "取消", "xpack.synthetics.monitorManagement.overviewTab.title": "概览", "xpack.synthetics.monitorManagement.pageHeader.title": "监测管理", @@ -33749,8 +33747,6 @@ "xpack.synthetics.monitorManagement.syntheticsEnableToolTip": "启用监测管理以在全球各个地点创建轻量级、真正的浏览器监测。", "xpack.synthetics.monitorManagement.techPreviewLabel": "技术预览", "xpack.synthetics.monitorManagement.testResult": "测试结果", - "xpack.synthetics.monitorManagement.try.dismiss": "关闭", - "xpack.synthetics.monitorManagement.try.label": "尝试监测管理", "xpack.synthetics.monitorManagement.updateMonitorLabel": "更新监测", "xpack.synthetics.monitorManagement.urlFieldLabel": "URL", "xpack.synthetics.monitorManagement.urlRequiredLabel": "“URL”必填", From ce683137ef0179208156f38fa8f6a5034c1cb7d1 Mon Sep 17 00:00:00 2001 From: Abdul Zahid Date: Thu, 2 Mar 2023 18:19:39 +0100 Subject: [PATCH 2/3] Remove dismissal of monitor management tour (`data-test-subj="syntheticsManagementTourDismiss"`) in tests. --- .../observability/e2e/journeys/exploratory_view.ts | 1 - .../observability/e2e/journeys/single_metric.journey.ts | 1 - .../observability/e2e/journeys/step_duration.journey.ts | 1 - x-pack/plugins/observability/e2e/utils.ts | 6 ------ x-pack/test/functional/apps/uptime/certificates.ts | 1 - x-pack/test/functional/page_objects/uptime_page.ts | 9 --------- x-pack/test/functional/services/uptime/navigation.ts | 4 ---- .../apps/heartbeat/_heartbeat.ts | 1 - 8 files changed, 24 deletions(-) diff --git a/x-pack/plugins/observability/e2e/journeys/exploratory_view.ts b/x-pack/plugins/observability/e2e/journeys/exploratory_view.ts index 9cb4da16765a3..877c13e93c373 100644 --- a/x-pack/plugins/observability/e2e/journeys/exploratory_view.ts +++ b/x-pack/plugins/observability/e2e/journeys/exploratory_view.ts @@ -42,7 +42,6 @@ journey('Exploratory view', async ({ page, params }) => { await loginToKibana({ page, user: { username: 'elastic', password: 'changeme' }, - dismissTour: false, }); }); diff --git a/x-pack/plugins/observability/e2e/journeys/single_metric.journey.ts b/x-pack/plugins/observability/e2e/journeys/single_metric.journey.ts index 37802127f402f..6fcdb71ccffa2 100644 --- a/x-pack/plugins/observability/e2e/journeys/single_metric.journey.ts +++ b/x-pack/plugins/observability/e2e/journeys/single_metric.journey.ts @@ -45,7 +45,6 @@ journey('SingleMetric', async ({ page, params }) => { await loginToKibana({ page, user: { username: 'elastic', password: 'changeme' }, - dismissTour: false, }); }); diff --git a/x-pack/plugins/observability/e2e/journeys/step_duration.journey.ts b/x-pack/plugins/observability/e2e/journeys/step_duration.journey.ts index 13cde8e940e13..5bd6d4c1222b1 100644 --- a/x-pack/plugins/observability/e2e/journeys/step_duration.journey.ts +++ b/x-pack/plugins/observability/e2e/journeys/step_duration.journey.ts @@ -51,7 +51,6 @@ journey('Exploratory view', async ({ page, params }) => { await loginToKibana({ page, user: { username: 'elastic', password: 'changeme' }, - dismissTour: false, }); }); diff --git a/x-pack/plugins/observability/e2e/utils.ts b/x-pack/plugins/observability/e2e/utils.ts index 0b570dc5cc5ac..f340ef8b78b3a 100644 --- a/x-pack/plugins/observability/e2e/utils.ts +++ b/x-pack/plugins/observability/e2e/utils.ts @@ -17,11 +17,9 @@ export async function waitForLoadingToFinish({ page }: { page: Page }) { export async function loginToKibana({ page, user, - dismissTour = true, }: { page: Page; user?: { username: string; password: string }; - dismissTour?: boolean; }) { await page.fill('[data-test-subj=loginUsername]', user?.username ?? 'elastic', { timeout: 60 * 1000, @@ -32,10 +30,6 @@ export async function loginToKibana({ await page.click('[data-test-subj=loginSubmit]'); await waitForLoadingToFinish({ page }); - if (dismissTour) { - // Close Monitor Management tour added in 8.2.0 - await page.click('[data-test-subj=syntheticsManagementTourDismiss]'); - } } export const byTestId = (testId: string) => { diff --git a/x-pack/test/functional/apps/uptime/certificates.ts b/x-pack/test/functional/apps/uptime/certificates.ts index 9c3bde2768827..f6930c8580732 100644 --- a/x-pack/test/functional/apps/uptime/certificates.ts +++ b/x-pack/test/functional/apps/uptime/certificates.ts @@ -31,7 +31,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('go to certs page', async () => { - await uptime.dismissTour(); await uptimeService.common.waitUntilDataIsLoaded(); await uptimeService.cert.hasViewCertButton(); await uptimeService.navigation.goToCertificates(); diff --git a/x-pack/test/functional/page_objects/uptime_page.ts b/x-pack/test/functional/page_objects/uptime_page.ts index 315513c5c4c3b..531e0e5980255 100644 --- a/x-pack/test/functional/page_objects/uptime_page.ts +++ b/x-pack/test/functional/page_objects/uptime_page.ts @@ -16,7 +16,6 @@ export class UptimePageObject extends FtrService { private readonly monitor = this.ctx.getService('uptime').monitor; private readonly navigation = this.ctx.getService('uptime').navigation; private readonly retry = this.ctx.getService('retry'); - private readonly testSubjects = this.ctx.getService('testSubjects'); public async goToRoot(refresh?: boolean) { await this.navigation.goToUptime(); @@ -25,10 +24,6 @@ export class UptimePageObject extends FtrService { } } - public async dismissTour() { - await this.testSubjects.click('syntheticsManagementTourDismiss'); - } - public async setDateRange(start: string, end: string) { const { start: prevStart, end: prevEnd } = await this.timePicker.getTimeConfig(); if (start !== prevStart || prevEnd !== end) { @@ -44,10 +39,6 @@ export class UptimePageObject extends FtrService { monitorIdToCheck?: string ) { await this.navigation.goToUptime(); - const hasTour = await this.testSubjects.exists('syntheticsManagementTourDismiss'); - if (hasTour) { - await this.testSubjects.click('syntheticsManagementTourDismiss'); - } await this.setDateRange(dateStart, dateEnd); if (monitorIdToCheck) { await this.commonService.monitorIdExists(monitorIdToCheck); diff --git a/x-pack/test/functional/services/uptime/navigation.ts b/x-pack/test/functional/services/uptime/navigation.ts index b45f12eaee9be..57e39f6bf9d0e 100644 --- a/x-pack/test/functional/services/uptime/navigation.ts +++ b/x-pack/test/functional/services/uptime/navigation.ts @@ -82,10 +82,6 @@ export function UptimeNavigationProvider({ getService, getPageObjects }: FtrProv }, async loadDataAndGoToMonitorPage(dateStart: string, dateEnd: string, monitorId: string) { - const hasTour = await testSubjects.exists('syntheticsManagementTourDismiss'); - if (hasTour) { - await testSubjects.click('syntheticsManagementTourDismiss'); - } await PageObjects.timePicker.setAbsoluteRange(dateStart, dateEnd); await this.goToMonitor(monitorId); }, diff --git a/x-pack/test/stack_functional_integration/apps/heartbeat/_heartbeat.ts b/x-pack/test/stack_functional_integration/apps/heartbeat/_heartbeat.ts index e1122125c8665..9f402c019d0a7 100644 --- a/x-pack/test/stack_functional_integration/apps/heartbeat/_heartbeat.ts +++ b/x-pack/test/stack_functional_integration/apps/heartbeat/_heartbeat.ts @@ -15,7 +15,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('check heartbeat overview page', function () { it('Uptime app should show 1 UP monitor', async function () { await PageObjects.common.navigateToApp('uptime', { insertTimestamp: false }); - await PageObjects.uptime.dismissTour(); await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year'); await retry.try(async function () { From 5a4a86f750dcdadb83f17ab94df5e948b93926f4 Mon Sep 17 00:00:00 2001 From: Abdul Zahid Date: Thu, 2 Mar 2023 18:25:50 +0100 Subject: [PATCH 3/3] Remove references of `xpack.synthetics.monitorManagement.openTour` in tests. --- x-pack/plugins/synthetics/e2e/page_objects/login.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/x-pack/plugins/synthetics/e2e/page_objects/login.tsx b/x-pack/plugins/synthetics/e2e/page_objects/login.tsx index a8a55aadab31d..92c4de21ff154 100644 --- a/x-pack/plugins/synthetics/e2e/page_objects/login.tsx +++ b/x-pack/plugins/synthetics/e2e/page_objects/login.tsx @@ -23,14 +23,6 @@ export function loginPageProvider({ await waitForLoadingToFinish({ page }); }, async loginToKibana(usernameT?: 'editor' | 'viewer', passwordT?: string) { - try { - // Close Monitor Management tour added in 8.2.0 - await page.addInitScript(() => { - window.localStorage.setItem('xpack.synthetics.monitorManagement.openTour', 'false'); - }); - } catch (e) { - // ignore - } if (isRemote) { await page.click('text="Log in with Elasticsearch"'); }