diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes.ts index 10225de1a1ad4..69080c22a13d0 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes.ts @@ -858,6 +858,7 @@ export class LensAttributes { dataType: 'number', isBucketed: false, label: label || 'Count of records', + customLabel: true, operationType: 'count', scale: 'ratio', sourceField: RECORDS_FIELD, diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts index b13f072cc5e64..6fdb18750990e 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts @@ -14,6 +14,7 @@ import { PERCENTILE, ReportTypes, FORMULA_COLUMN, + RECORDS_FIELD, } from '../constants'; import { CLS_LABEL, @@ -124,8 +125,8 @@ export function getSyntheticsKPIConfig({ dataView }: ConfigProps): SeriesConfig }, { label: 'Total runs', - id: 'monitor.check_group', - field: 'monitor.check_group', + id: 'total_test_runs', + field: RECORDS_FIELD, columnType: OPERATION_COLUMN, columnFilters: [ { diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts index cae5b16a41584..ed0df54219a29 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts @@ -103,8 +103,9 @@ export function getSyntheticsSingleMetricConfig({ dataView }: ConfigProps): Seri titlePosition: 'bottom', }, columnType: FORMULA_COLUMN, - formula: "unique_count(monitor.check_group, kql='summary: *')", format: 'number', + field: RECORDS_FIELD, + columnFilter: { language: 'kuery', query: 'summary: *' }, }, { id: 'monitor_successful', @@ -114,9 +115,9 @@ export function getSyntheticsSingleMetricConfig({ dataView }: ConfigProps): Seri metricStateOptions: { titlePosition: 'bottom', }, - columnType: FORMULA_COLUMN, - formula: 'unique_count(monitor.check_group, kql=\'monitor.status: "up"\')', format: 'number', + field: RECORDS_FIELD, + columnFilter: { language: 'kuery', query: 'summary.down: 0' }, }, { id: 'monitor_errors', diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts index 5c09be2382425..9364977451b48 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts @@ -54,6 +54,7 @@ export const sampleAttributeCoreWebVital = { sourceField: 'user_agent.os.name', }, 'y-axis-column-1': { + customLabel: true, dataType: 'number', filter: { language: 'kuery', @@ -67,6 +68,7 @@ export const sampleAttributeCoreWebVital = { sourceField: RECORDS_FIELD, }, 'y-axis-column-2': { + customLabel: true, dataType: 'number', filter: { language: 'kuery', @@ -79,6 +81,7 @@ export const sampleAttributeCoreWebVital = { sourceField: RECORDS_FIELD, }, 'y-axis-column-layer0-0': { + customLabel: true, dataType: 'number', filter: { language: 'kuery', diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts index 49787f1304859..af5d7a91a541d 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts @@ -50,6 +50,7 @@ export const sampleAttributeKpi = { }, isBucketed: false, label: 'test-series', + customLabel: true, operationType: 'count', scale: 'ratio', sourceField: RECORDS_FIELD, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/index.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/index.tsx index bfd7ac5149a88..f63cb3b7f6dc5 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/index.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/index.tsx @@ -18,7 +18,7 @@ export const MonitorForm: React.FC<{ defaultValues?: SyntheticsMonitor; space?: string; readOnly?: boolean; - canUsePublicLocations: boolean; + canUsePublicLocations?: boolean; }> = ({ children, defaultValues, space, readOnly = false, canUsePublicLocations }) => { const methods = useFormWrapped({ mode: 'onSubmit', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx index 4a8cca5410baa..fdda2247f15a4 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx @@ -26,7 +26,7 @@ export const ActionBar = ({ canUsePublicLocations = true, }: { readOnly: boolean; - canUsePublicLocations: boolean; + canUsePublicLocations?: boolean; }) => { const { monitorId } = useParams<{ monitorId: string }>(); const history = useHistory(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_stats/monitor_test_runs_sparkline.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_stats/monitor_test_runs_sparkline.tsx index d8ba47ef7f39c..c2930a1d22ffb 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_stats/monitor_test_runs_sparkline.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_stats/monitor_test_runs_sparkline.tsx @@ -32,11 +32,11 @@ export const MonitorTestRunsSparkline = ({ monitorIds }: { monitorIds: string[] 'monitor.id': monitorIds.length > 0 ? monitorIds : ['false-monitor-id'], // Show no data when monitorIds is empty }, dataType: 'synthetics' as const, - selectedMetricField: 'monitor.check_group', + selectedMetricField: 'total_test_runs', filters: [], name: labels.TEST_RUNS_LABEL, color: theme.eui.euiColorVis1, - operationType: 'unique_count', + operationType: 'count', }, ]; // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/status_bar/monitor_redirects.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/status_bar/monitor_redirects.tsx index deac2b712f61e..a0db4b2b6a32c 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/status_bar/monitor_redirects.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/status_bar/monitor_redirects.tsx @@ -7,31 +7,32 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiPopover } from '@elastic/eui'; -import styled from 'styled-components'; +import { + EuiPopover, + EuiDescriptionListTitle, + EuiDescriptionListDescription, + EuiButtonEmpty, +} from '@elastic/eui'; import { Ping } from '../../../../../../common/runtime_types'; import { PingRedirects } from '../../ping_list/ping_redirects'; -import { MonListDescription, MonListTitle } from './status_bar'; interface Props { monitorStatus: Ping | null; } -const RedirectBtn = styled.span` - cursor: pointer; -`; - export const MonitorRedirects: React.FC = ({ monitorStatus }) => { const list = monitorStatus?.http?.response?.redirects; const [isPopoverOpen, setIsPopoverOpen] = useState(false); const button = ( - - + setIsPopoverOpen(!isPopoverOpen)} data-test-subj="uptimeMonitorRedirectInfo" + iconType="arrowDown" + iconSide="right" > {i18n.translate('xpack.uptime.monitorList.redirects.title.number', { defaultMessage: '{number}', @@ -39,13 +40,13 @@ export const MonitorRedirects: React.FC = ({ monitorStatus }) => { number: list?.length ?? 0, }, })} - - + + ); return list ? ( <> - Redirects + Redirects { - return server.config.service?.username === 'localKibanaIntegrationTestsUser'; -}; diff --git a/x-pack/plugins/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts b/x-pack/plugins/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts index 3e92f73efab10..5beaa563790e8 100644 --- a/x-pack/plugins/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts +++ b/x-pack/plugins/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts @@ -7,7 +7,7 @@ import { KibanaResponse } from '@kbn/core-http-router-server-internal'; import { UMKibanaRouteWrapper } from './types'; -import { isTestUser, UptimeEsClient } from '../lib/lib'; +import { UptimeEsClient } from '../lib/lib'; export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) => ({ ...uptimeRoute, @@ -24,7 +24,7 @@ export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) => { request, uiSettings: coreContext.uiSettings, - isDev: Boolean(server.isDev && !isTestUser(server)), + isDev: Boolean(server.isDev), } );