From 5fdb23c31de2677cf2a1ba71b1a74eedd5303441 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Wed, 1 May 2019 11:30:09 -0400 Subject: [PATCH] [Uptime] Uptime to APM integration (#34892) * Add integrations popover. * Add some more functionality, code is WIP/mocked. * Trying some things WIP. * Import settings values from context. * Remove obsolete comment. * Add links. * Rename component. Clean up placeholder text and add translations. * Minor tweaks. Rename component file. * Fix import for renamed file. * Add domain to api query result fixtures. * Change integration to utilize EuiTable's actions API. * Add translation for new column heading. * Update busted snapshot. * Add snapshot test for new component. * Refactor integration links to dedicated component. * Remove obsolete index export. * Update monitor list test snapshot. * Default monitor list to empty array instead of undefined. * Extract URL construction to helper function. * Make entire link text clickable for APM integration. * Update broken test snapshot. * Fix type and update test snapshot. --- .../integration_link.test.tsx.snap | 29 +++ .../__snapshots__/monitor_list.test.tsx.snap | 11 + .../__tests__/integration_link.test.tsx | 24 ++ .../__tests__/monitor_list.test.tsx | 3 + .../public/components/functional/index.ts | 1 + .../functional/integration_link.tsx | 35 +++ .../components/functional/monitor_list.tsx | 228 +++++++++++------- .../monitor_list_actions_popover.tsx | 85 +++++++ .../uptime/public/hooks/use_url_params.ts | 5 +- .../plugins/uptime/public/lib/helper/index.ts | 2 + .../__snapshots__/get_apm_href.test.ts.snap | 5 + .../__tests__/get_apm_href.test.ts | 36 +++ .../observability_integration/get_apm_href.ts | 18 ++ .../helper/observability_integration/index.ts | 7 + .../public/lib/helper/url_params/index.ts | 2 +- .../plugins/uptime/public/pages/overview.tsx | 3 + .../public/queries/monitor_list_query.ts | 1 + .../uptime/graphql/fixtures/monitor_list.json | 20 +- .../fixtures/monitor_list_down_filtered.json | 4 +- .../fixtures/monitor_list_up_filtered.json | 16 +- 20 files changed, 418 insertions(+), 117 deletions(-) create mode 100644 x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/integration_link.test.tsx.snap create mode 100644 x-pack/plugins/uptime/public/components/functional/__tests__/integration_link.test.tsx create mode 100644 x-pack/plugins/uptime/public/components/functional/integration_link.tsx create mode 100644 x-pack/plugins/uptime/public/components/functional/monitor_list_actions_popover.tsx create mode 100644 x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap create mode 100644 x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts create mode 100644 x-pack/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts create mode 100644 x-pack/plugins/uptime/public/lib/helper/observability_integration/index.ts diff --git a/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/integration_link.test.tsx.snap b/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/integration_link.test.tsx.snap new file mode 100644 index 000000000000..974b904cb5c4 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/integration_link.test.tsx.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`IntegrationLink component renders without errors 1`] = ` + + + + + + + + + click for bar + + + +`; diff --git a/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_list.test.tsx.snap b/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_list.test.tsx.snap index 2fc77acb89f0..c4ccbd4ce6a6 100644 --- a/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_list.test.tsx.snap +++ b/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_list.test.tsx.snap @@ -39,6 +39,11 @@ exports[`MonitorList component renders a monitor list without errors 1`] = ` "name": "URL", "render": [Function], }, + Object { + "field": "ping.url.full", + "name": "URL", + "render": [Function], + }, Object { "align": "right", "field": "upSeries", @@ -46,6 +51,12 @@ exports[`MonitorList component renders a monitor list without errors 1`] = ` "render": [Function], "width": "180px", }, + Object { + "align": "right", + "field": "ping", + "name": "Integrations", + "render": [Function], + }, ] } executeQueryOptions={Object {}} diff --git a/x-pack/plugins/uptime/public/components/functional/__tests__/integration_link.test.tsx b/x-pack/plugins/uptime/public/components/functional/__tests__/integration_link.test.tsx new file mode 100644 index 000000000000..09feacbed256 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/functional/__tests__/integration_link.test.tsx @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { IntegrationLink } from '../integration_link'; +import { shallowWithIntl } from 'test_utils/enzyme_helpers'; + +describe('IntegrationLink component', () => { + it('renders without errors', () => { + const component = shallowWithIntl( + + ); + expect(component).toMatchSnapshot(); + }); +}); diff --git a/x-pack/plugins/uptime/public/components/functional/__tests__/monitor_list.test.tsx b/x-pack/plugins/uptime/public/components/functional/__tests__/monitor_list.test.tsx index 4eadc74131e5..a92ed30752ec 100644 --- a/x-pack/plugins/uptime/public/components/functional/__tests__/monitor_list.test.tsx +++ b/x-pack/plugins/uptime/public/components/functional/__tests__/monitor_list.test.tsx @@ -440,8 +440,11 @@ describe('MonitorList component', () => { it('renders a monitor list without errors', () => { const component = shallowWithIntl( ); diff --git a/x-pack/plugins/uptime/public/components/functional/index.ts b/x-pack/plugins/uptime/public/components/functional/index.ts index e400643a1b04..d3402ca38510 100644 --- a/x-pack/plugins/uptime/public/components/functional/index.ts +++ b/x-pack/plugins/uptime/public/components/functional/index.ts @@ -9,6 +9,7 @@ export { EmptyStatusBar } from './empty_status_bar'; export { ErrorList } from './error_list'; export { FilterBar } from './filter_bar'; export { FilterBarLoading } from './filter_bar_loading'; +export { IntegrationLink } from './integration_link'; export { MonitorCharts } from './monitor_charts'; export { MonitorList } from './monitor_list'; export { MonitorPageTitle } from './monitor_page_title'; diff --git a/x-pack/plugins/uptime/public/components/functional/integration_link.tsx b/x-pack/plugins/uptime/public/components/functional/integration_link.tsx new file mode 100644 index 000000000000..99a56767dc41 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/functional/integration_link.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, EuiToolTip } from '@elastic/eui'; +import React from 'react'; + +interface IntegrationLinkProps { + ariaLabel: string; + href: string; + iconType: 'apmApp' | 'infraApp' | 'loggingApp'; + message: string; + tooltipContent: string; +} + +export const IntegrationLink = ({ + ariaLabel, + href, + iconType, + message, + tooltipContent, +}: IntegrationLinkProps) => ( + + + + + + + + {message} + + +); diff --git a/x-pack/plugins/uptime/public/components/functional/monitor_list.tsx b/x-pack/plugins/uptime/public/components/functional/monitor_list.tsx index 795a315a8272..2f9fafa1cf4b 100644 --- a/x-pack/plugins/uptime/public/components/functional/monitor_list.tsx +++ b/x-pack/plugins/uptime/public/components/functional/monitor_list.tsx @@ -27,10 +27,11 @@ import { get } from 'lodash'; import moment from 'moment'; import React from 'react'; import { Link } from 'react-router-dom'; -import { LatestMonitor, MonitorSeriesPoint } from '../../../common/graphql/types'; +import { LatestMonitor, MonitorSeriesPoint, Ping } from '../../../common/graphql/types'; import { UptimeGraphQLQueryProps, withUptimeGraphQL } from '../higher_order'; import { monitorListQuery } from '../../queries'; import { MonitorSparkline } from './monitor_sparkline'; +import { MonitorListActionsPopover } from './monitor_list_actions_popover'; interface MonitorListQueryResult { // TODO: clean up this ugly result data shape, there should be no nesting @@ -40,7 +41,10 @@ interface MonitorListQueryResult { } interface MonitorListProps { + basePath: string; dangerColor: string; + dateRangeStart: string; + dateRangeEnd: string; linkParameters?: string; } @@ -53,99 +57,139 @@ const monitorListPagination = { pageSizeOptions: [5, 10, 20, 50], }; -export const MonitorListComponent = ({ dangerColor, data, linkParameters, loading }: Props) => ( - - -
- -
-
- - ( -
- - {status === 'up' - ? i18n.translate('xpack.uptime.monitorList.statusColumn.upLabel', { - defaultMessage: 'Up', - }) - : i18n.translate('xpack.uptime.monitorList.statusColumn.downLabel', { - defaultMessage: 'Down', - })} - - - {moment(get(monitor, 'ping.monitor.timestamp', undefined)).fromNow()} - -
- ), - }, - { - field: 'ping.monitor.id', - name: i18n.translate('xpack.uptime.monitorList.idColumnLabel', { - defaultMessage: 'ID', - }), - render: (id: string, monitor: LatestMonitor) => ( - - - {monitor.ping && monitor.ping.monitor && monitor.ping.monitor.name - ? monitor.ping.monitor.name - : id} - - - ), - }, - { - field: 'ping.url.full', - name: i18n.translate('xpack.uptime.monitorList.urlColumnLabel', { - defaultMessage: 'URL', - }), - render: (url: string, monitor: LatestMonitor) => ( -
- - {url} - - {monitor.ping && monitor.ping.monitor && monitor.ping.monitor.ip ? ( +export const MonitorListComponent = ({ + basePath, + dangerColor, + dateRangeStart, + dateRangeEnd, + data, + linkParameters, + loading, +}: Props) => { + return ( + + +
+ +
+
+ + ( +
+ + {status === 'up' + ? i18n.translate('xpack.uptime.monitorList.statusColumn.upLabel', { + defaultMessage: 'Up', + }) + : i18n.translate('xpack.uptime.monitorList.statusColumn.downLabel', { + defaultMessage: 'Down', + })} + - {monitor.ping.monitor.ip} + {moment(get(monitor, 'ping.monitor.timestamp', undefined)).fromNow()} - ) : null} -
- ), - }, - { - field: 'upSeries', - width: '180px', - align: 'right', - name: i18n.translate('xpack.uptime.monitorList.monitorHistoryColumnLabel', { - defaultMessage: 'Downtime history', - }), - render: (downSeries: MonitorSeriesPoint, monitor: LatestMonitor) => ( - - ), - }, - ]} - loading={loading} - items={(data && data.monitorStatus && data.monitorStatus.monitors) || undefined} - pagination={monitorListPagination} - /> -
-); +
+ ), + }, + { + field: 'ping.monitor.id', + name: i18n.translate('xpack.uptime.monitorList.idColumnLabel', { + defaultMessage: 'ID', + }), + render: (id: string, monitor: LatestMonitor) => ( + + + {monitor.ping && monitor.ping.monitor && monitor.ping.monitor.name + ? monitor.ping.monitor.name + : id} + + + ), + }, + { + field: 'ping.url.full', + name: i18n.translate('xpack.uptime.monitorList.urlColumnLabel', { + defaultMessage: 'URL', + }), + render: (url: string, monitor: LatestMonitor) => ( +
+ + {url} + +
+ ), + }, + { + field: 'ping.url.full', + name: i18n.translate('xpack.uptime.monitorList.urlColumnLabel', { + defaultMessage: 'URL', + }), + render: (url: string, monitor: LatestMonitor) => ( +
+ + {url} + + {monitor.ping && monitor.ping.monitor && monitor.ping.monitor.ip ? ( + + {monitor.ping.monitor.ip} + + ) : null} +
+ ), + }, + { + field: 'upSeries', + width: '180px', + align: 'right', + name: i18n.translate('xpack.uptime.monitorList.monitorHistoryColumnLabel', { + defaultMessage: 'Downtime history', + }), + render: (downSeries: MonitorSeriesPoint, monitor: LatestMonitor) => ( + + ), + }, + { + align: 'right', + field: 'ping', + name: i18n.translate('xpack.uptime.monitorList.observabilityIntegrationsColumnLabel', { + defaultMessage: 'Integrations', + description: + 'The heading column of some action buttons that will take users to other Obsevability apps', + }), + render: (ping: Ping, monitor: LatestMonitor) => ( + + ), + }, + ]} + loading={loading} + items={(data && data.monitorStatus && data.monitorStatus.monitors) || []} + pagination={monitorListPagination} + /> +
+ ); +}; export const MonitorList = withUptimeGraphQL( MonitorListComponent, diff --git a/x-pack/plugins/uptime/public/components/functional/monitor_list_actions_popover.tsx b/x-pack/plugins/uptime/public/components/functional/monitor_list_actions_popover.tsx new file mode 100644 index 000000000000..bff8cf7b9477 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/functional/monitor_list_actions_popover.tsx @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPopover } from '@elastic/eui'; +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { get } from 'lodash'; +import { LatestMonitor } from '../../../common/graphql/types'; +import { IntegrationLink } from './integration_link'; +import { getApmHref } from '../../lib/helper'; + +interface MonitorListActionsPopoverProps { + basePath: string; + dateRangeStart: string; + dateRangeEnd: string; + monitor: LatestMonitor; +} + +export const MonitorListActionsPopover = ({ + basePath, + dateRangeStart, + dateRangeEnd, + monitor, + monitor: { ping }, +}: MonitorListActionsPopoverProps) => { + const popoverId = `${monitor.id.key}_popover`; + const [popoverIsVisible, setPopoverIsVisible] = useState(false); + const domain = get(ping, 'url.domain', ''); + return ( + setPopoverIsVisible(true)} + /> + } + closePopover={() => setPopoverIsVisible(false)} + id={popoverId} + isOpen={popoverIsVisible} + > + + + + + + + ); +}; diff --git a/x-pack/plugins/uptime/public/hooks/use_url_params.ts b/x-pack/plugins/uptime/public/hooks/use_url_params.ts index 050ff252942c..d0a5f6c943e6 100644 --- a/x-pack/plugins/uptime/public/hooks/use_url_params.ts +++ b/x-pack/plugins/uptime/public/hooks/use_url_params.ts @@ -5,10 +5,7 @@ */ import qs from 'querystring'; -import { - UptimeUrlParams, - getSupportedUrlParams, -} from '../lib/helper/url_params/get_supported_url_params'; +import { UptimeUrlParams, getSupportedUrlParams } from '../lib/helper'; interface Location { pathname: string; diff --git a/x-pack/plugins/uptime/public/lib/helper/index.ts b/x-pack/plugins/uptime/public/lib/helper/index.ts index d0e5f633535e..8734b711195b 100644 --- a/x-pack/plugins/uptime/public/lib/helper/index.ts +++ b/x-pack/plugins/uptime/public/lib/helper/index.ts @@ -5,3 +5,5 @@ */ export { convertMicrosecondsToMilliseconds } from './convert_measurements'; +export { getApmHref } from './observability_integration'; +export { UptimeUrlParams, getSupportedUrlParams } from './url_params'; diff --git a/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap b/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap new file mode 100644 index 000000000000..0e7017e3e186 --- /dev/null +++ b/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getApmHref creates href with base path when present 1`] = `"/foo/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"`; + +exports[`getApmHref does not add a base path or extra slash when base path is undefined 1`] = `"/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"`; diff --git a/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts b/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts new file mode 100644 index 000000000000..3f13a3989227 --- /dev/null +++ b/x-pack/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { getApmHref } from '../get_apm_href'; +import { LatestMonitor } from '../../../../../common/graphql/types'; + +describe('getApmHref', () => { + let monitor: LatestMonitor; + + beforeEach(() => { + monitor = { + id: { + key: 'monitorId', + }, + ping: { + timestamp: 'foo', + url: { + domain: 'www.elastic.co', + }, + }, + }; + }); + + it('creates href with base path when present', () => { + const result = getApmHref(monitor, 'foo', 'now-15m', 'now'); + expect(result).toMatchSnapshot(); + }); + + it('does not add a base path or extra slash when base path is undefined', () => { + const result = getApmHref(monitor, '', 'now-15m', 'now'); + expect(result).toMatchSnapshot(); + }); +}); diff --git a/x-pack/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts b/x-pack/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts new file mode 100644 index 000000000000..0df94b3d80d7 --- /dev/null +++ b/x-pack/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { get } from 'lodash'; +import { LatestMonitor } from '../../../../common/graphql/types'; + +export const getApmHref = ( + monitor: LatestMonitor, + basePath: string, + dateRangeStart: string, + dateRangeEnd: string +) => + `${basePath && basePath.length ? `/${basePath}` : ''}/app/apm#/services?kuery=${encodeURI( + `url.domain: "${get(monitor, 'ping.url.domain')}"` + )}&rangeFrom=${dateRangeStart}&rangeTo=${dateRangeEnd}`; diff --git a/x-pack/plugins/uptime/public/lib/helper/observability_integration/index.ts b/x-pack/plugins/uptime/public/lib/helper/observability_integration/index.ts new file mode 100644 index 000000000000..782caffc79a0 --- /dev/null +++ b/x-pack/plugins/uptime/public/lib/helper/observability_integration/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { getApmHref } from './get_apm_href'; diff --git a/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts b/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts index b42af6ac8fc0..2aa405383c47 100644 --- a/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts +++ b/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { getSupportedUrlParams } from './get_supported_url_params'; +export { UptimeUrlParams, getSupportedUrlParams } from './get_supported_url_params'; diff --git a/x-pack/plugins/uptime/public/pages/overview.tsx b/x-pack/plugins/uptime/public/pages/overview.tsx index 4921b1558ad1..224afc1752e7 100644 --- a/x-pack/plugins/uptime/public/pages/overview.tsx +++ b/x-pack/plugins/uptime/public/pages/overview.tsx @@ -80,7 +80,10 @@ export const OverviewPage = ({ basePath, setBreadcrumbs, history, location }: Pr diff --git a/x-pack/plugins/uptime/public/queries/monitor_list_query.ts b/x-pack/plugins/uptime/public/queries/monitor_list_query.ts index 8f843170a037..4977b36da996 100644 --- a/x-pack/plugins/uptime/public/queries/monitor_list_query.ts +++ b/x-pack/plugins/uptime/public/queries/monitor_list_query.ts @@ -30,6 +30,7 @@ export const monitorListQueryString = ` status } url { + domain full } } diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list.json index 2a88324aeef9..01a6ae6cda30 100644 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list.json +++ b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list.json @@ -12,7 +12,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.google.com/" } + "url": { "domain": "www.google.com", "full": "https://www.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 74 }, @@ -54,7 +54,7 @@ "name": "", "status": "down" }, - "url": { "full": "http://localhost:12349/" } + "url": { "domain": "localhost", "full": "http://localhost:12349/" } }, "upSeries": [ { "x": 1548697620000, "y": null }, @@ -96,7 +96,7 @@ "name": "", "status": "up" }, - "url": { "full": "http://www.google.com/" } + "url": { "domain": "www.google.com", "full": "http://www.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 58 }, @@ -138,7 +138,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.github.com/" } + "url": { "domain": "www.github.com", "full": "https://www.github.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 69 }, @@ -180,7 +180,7 @@ "name": "", "status": "down" }, - "url": { "full": "http://www.example.com/" } + "url": { "domain": "www.example.com", "full": "http://www.example.com/" } }, "upSeries": [ { "x": 1548697620000, "y": null }, @@ -222,7 +222,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.wikipedia.org/" } + "url": { "domain": "www.wikipedia.org", "full": "https://www.wikipedia.org/" } }, "upSeries": [ { "x": 1548697620000, "y": 5 }, @@ -264,7 +264,7 @@ "name": "", "status": "up" }, - "url": { "full": "http://www.reddit.com/" } + "url": { "domain": "www.reddit.com", "full": "http://www.reddit.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 79 }, @@ -306,7 +306,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.elastic.co" } + "url": { "domain": "www.elastic.co", "full": "https://www.elastic.co" } }, "upSeries": [ { "x": 1548697620000, "y": 79 }, @@ -348,7 +348,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://news.google.com/" } + "url": { "domain": "news.google.com", "full": "https://news.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 5 }, @@ -390,7 +390,7 @@ "name": "", "status": "up" }, - "url": { "full": "tcp://localhost:9200" } + "url": { "domain": "localhost", "full": "tcp://localhost:9200" } }, "upSeries": [ { "x": 1548697620000, "y": 1 }, diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_down_filtered.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_down_filtered.json index b50adadbce9d..48de497bb173 100644 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_down_filtered.json +++ b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_down_filtered.json @@ -12,7 +12,7 @@ "name": "", "status": "down" }, - "url": { "full": "http://localhost:12349/" } + "url": { "domain": "localhost", "full": "http://localhost:12349/" } }, "upSeries": [ { "x": 1548697620000, "y": null }, @@ -54,7 +54,7 @@ "name": "", "status": "down" }, - "url": { "full": "http://www.example.com/" } + "url": { "domain": "www.example.com", "full": "http://www.example.com/" } }, "upSeries": [ { "x": 1548697620000, "y": null }, diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_up_filtered.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_up_filtered.json index 69e2a70aa4dd..5dc5e7e8db80 100644 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_up_filtered.json +++ b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_list_up_filtered.json @@ -12,7 +12,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.google.com/" } + "url": { "domain": "www.google.com", "full": "https://www.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 74 }, @@ -54,7 +54,7 @@ "name": "", "status": "up" }, - "url": { "full": "http://www.google.com/" } + "url": { "domain": "www.google.com", "full": "http://www.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 58 }, @@ -96,7 +96,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.github.com/" } + "url": { "domain": "www.github.com", "full": "https://www.github.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 69 }, @@ -138,7 +138,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.wikipedia.org/" } + "url": { "domain": "www.wikipedia.org", "full": "https://www.wikipedia.org/" } }, "upSeries": [ { "x": 1548697620000, "y": 5 }, @@ -180,7 +180,7 @@ "name": "", "status": "up" }, - "url": { "full": "http://www.reddit.com/" } + "url": { "domain": "www.reddit.com", "full": "http://www.reddit.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 79 }, @@ -222,7 +222,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://www.elastic.co" } + "url": { "domain": "www.elastic.co", "full": "https://www.elastic.co" } }, "upSeries": [ { "x": 1548697620000, "y": 79 }, @@ -264,7 +264,7 @@ "name": "", "status": "up" }, - "url": { "full": "https://news.google.com/" } + "url": { "domain": "news.google.com", "full": "https://news.google.com/" } }, "upSeries": [ { "x": 1548697620000, "y": 5 }, @@ -306,7 +306,7 @@ "name": "", "status": "up" }, - "url": { "full": "tcp://localhost:9200" } + "url": { "domain": "localhost", "full": "tcp://localhost:9200" } }, "upSeries": [ { "x": 1548697620000, "y": 1 },