Skip to content

Commit

Permalink
[8.7] [Synthetics] Remove Monitor Management tour. (#151849) (#152715)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.7`:
- [[Synthetics] Remove Monitor Management tour.
(#151849)](#151849)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-03-06T14:06:25Z","message":"[Synthetics]
Remove Monitor Management tour.
(#151849)","sha":"339cb643d5ad2365f19fcb6e4fa7cbc0592001e8","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","v8.7.0","v8.8.0"],"number":151849,"url":"https://github.com/elastic/kibana/pull/151849","mergeCommit":{"message":"[Synthetics]
Remove Monitor Management tour.
(#151849)","sha":"339cb643d5ad2365f19fcb6e4fa7cbc0592001e8"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/151849","number":151849,"mergeCommit":{"message":"[Synthetics]
Remove Monitor Management tour.
(#151849)","sha":"339cb643d5ad2365f19fcb6e4fa7cbc0592001e8"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <[email protected]>
  • Loading branch information
kibanamachine and awahab07 authored Mar 6, 2023
1 parent 3a0192d commit 853f09c
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ journey('Exploratory view', async ({ page, params }) => {
await loginToKibana({
page,
user: { username: 'elastic', password: 'changeme' },
dismissTour: false,
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ journey('SingleMetric', async ({ page, params }) => {
await loginToKibana({
page,
user: { username: 'elastic', password: 'changeme' },
dismissTour: false,
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ journey('Exploratory view', async ({ page, params }) => {
await loginToKibana({
page,
user: { username: 'elastic', password: 'changeme' },
dismissTour: false,
});
});

Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugins/observability/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) => {
Expand Down
8 changes: 0 additions & 8 deletions x-pack/plugins/synthetics/e2e/page_objects/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ServiceAllowedWrapper: React.FC = ({ children }) => {
return (
<EuiEmptyPrompt
title={<h2>{MONITOR_MANAGEMENT_LABEL}</h2>}
body={<p>{PUBLIC_BETA_DESCRIPTION}</p>}
body={<p>{ACCESS_RESTRICTED_MESSAGE}</p>}
actions={[
<EuiButton color="primary" fill isDisabled={!signupUrl} href={signupUrl ?? undefined}>
{REQUEST_ACCESS_LABEL}
Expand Down Expand Up @@ -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.',
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<EuiTourStep
content={
<>
<EuiText size="s">
<p>{PUBLIC_BETA_DESCRIPTION}</p>
</EuiText>
<EuiSpacer />
<EuiButton
color="primary"
fill
href={history.createHref({
pathname: MONITOR_MANAGEMENT_ROUTE,
})}
>
{MONITOR_MANAGEMENT_LABEL}
</EuiButton>
</>
}
isStepOpen={isOpen}
onFinish={() => setIsOpen(false)}
step={1}
stepsTotal={1}
subtitle={NEW_LABEL}
title={GETTING_STARTED_LABEL}
anchorPosition="upCenter"
maxWidth={416}
footerAction={
<EuiLink data-test-subj="syntheticsManagementTourDismiss" onClick={() => setIsOpen(false)}>
{DISMISS_LABEL}
</EuiLink>
}
<EuiHeaderLink
aria-label={NAVIGATE_LABEL}
color="text"
data-test-subj="syntheticsManagementPageLink"
href={history.createHref({
pathname: MONITOR_MANAGEMENT_ROUTE,
})}
>
<EuiHeaderLink
aria-label={NAVIGATE_LABEL}
color="text"
data-test-subj="syntheticsManagementPageLink"
href={history.createHref({
pathname: MONITOR_MANAGEMENT_ROUTE,
})}
>
<FormattedMessage
id="xpack.synthetics.page_header.manageMonitors"
defaultMessage="Monitor Management"
/>
</EuiHeaderLink>
</EuiTourStep>
<FormattedMessage
id="xpack.synthetics.page_header.manageMonitors"
defaultMessage="Monitor Management"
/>
</EuiHeaderLink>
);
};

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',
});
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -33687,7 +33687,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",
Expand Down Expand Up @@ -33736,7 +33735,6 @@
"xpack.synthetics.monitorManagement.monitorSync.failure.title": "Impossible de synchroniser les moniteurs avec le service Synthetics",
"xpack.synthetics.monitorManagement.nameRequired": "Le nom de l’emplacement est requis",
"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",
Expand Down Expand Up @@ -33771,8 +33769,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",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -33658,7 +33658,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": "進行中",
Expand Down Expand Up @@ -33707,7 +33706,6 @@
"xpack.synthetics.monitorManagement.monitorSync.failure.title": "モニターをSyntheticsサービスと同期できませんでした",
"xpack.synthetics.monitorManagement.nameRequired": "場所名は必須です",
"xpack.synthetics.monitorManagement.needPermissions": "権限が必要です",
"xpack.synthetics.monitorManagement.new.label": "新規",
"xpack.synthetics.monitorManagement.noLabel": "キャンセル",
"xpack.synthetics.monitorManagement.overviewTab.title": "概要",
"xpack.synthetics.monitorManagement.pageHeader.title": "モニター管理",
Expand Down Expand Up @@ -33742,8 +33740,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が必要です",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -33693,7 +33693,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": "进行中",
Expand Down Expand Up @@ -33742,7 +33741,6 @@
"xpack.synthetics.monitorManagement.monitorSync.failure.title": "监测无法与 Synthetics 服务同步",
"xpack.synthetics.monitorManagement.nameRequired": "“位置名称”必填",
"xpack.synthetics.monitorManagement.needPermissions": "需要权限",
"xpack.synthetics.monitorManagement.new.label": "新建",
"xpack.synthetics.monitorManagement.noLabel": "取消",
"xpack.synthetics.monitorManagement.overviewTab.title": "概览",
"xpack.synthetics.monitorManagement.pageHeader.title": "监测管理",
Expand Down Expand Up @@ -33777,8 +33775,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”必填",
Expand Down
1 change: 0 additions & 1 deletion x-pack/test/functional/apps/uptime/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 0 additions & 9 deletions x-pack/test/functional/page_objects/uptime_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) {
Expand All @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions x-pack/test/functional/services/uptime/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 853f09c

Please sign in to comment.