mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Exploratory view] Restore links for ux/synthetics data (#98759)
This commit is contained in:
parent
78e721fdce
commit
d9bc163603
14 changed files with 511 additions and 76 deletions
|
@ -34,6 +34,7 @@ import {
|
|||
import { createCallApmApi } from '../services/rest/createCallApmApi';
|
||||
import { px, units } from '../style/variables';
|
||||
import { createStaticIndexPattern } from '../services/rest/index_pattern';
|
||||
import { UXActionMenu } from '../components/app/RumDashboard/ActionMenu';
|
||||
|
||||
const CsmMainContainer = euiStyled.div`
|
||||
padding: ${px(units.plus)};
|
||||
|
@ -104,6 +105,7 @@ export function CsmAppRoot({
|
|||
<Router history={history}>
|
||||
<UrlParamsProvider>
|
||||
<CsmApp />
|
||||
<UXActionMenu appMountParameters={appMountParameters} />
|
||||
</UrlParamsProvider>
|
||||
</Router>
|
||||
</i18nCore.Context>
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
EuiButtonEmpty,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiToolTip,
|
||||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import {
|
||||
createExploratoryViewUrl,
|
||||
HeaderMenuPortal,
|
||||
SeriesUrl,
|
||||
} from '../../../../../../observability/public';
|
||||
import { useUrlParams } from '../../../../context/url_params_context/use_url_params';
|
||||
import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { AppMountParameters } from '../../../../../../../../src/core/public';
|
||||
|
||||
const ANALYZE_DATA = i18n.translate('xpack.apm.analyzeDataButtonLabel', {
|
||||
defaultMessage: 'Analyze data',
|
||||
});
|
||||
|
||||
const ANALYZE_MESSAGE = i18n.translate(
|
||||
'xpack.apm.analyzeDataButtonLabel.message',
|
||||
{
|
||||
defaultMessage:
|
||||
'EXPERIMENTAL - Analyze Data allows you to select and filter result data in any dimension and look for the cause or impact of performance problems.',
|
||||
}
|
||||
);
|
||||
|
||||
export function UXActionMenu({
|
||||
appMountParameters,
|
||||
}: {
|
||||
appMountParameters: AppMountParameters;
|
||||
}) {
|
||||
const {
|
||||
services: { http },
|
||||
} = useKibana();
|
||||
const { urlParams } = useUrlParams();
|
||||
const { rangeTo, rangeFrom } = urlParams;
|
||||
|
||||
const uxExploratoryViewLink = createExploratoryViewUrl(
|
||||
{
|
||||
'ux-series': {
|
||||
dataType: 'ux',
|
||||
time: { from: rangeFrom, to: rangeTo },
|
||||
} as SeriesUrl,
|
||||
},
|
||||
http?.basePath.get()
|
||||
);
|
||||
|
||||
return (
|
||||
<HeaderMenuPortal
|
||||
setHeaderActionMenu={appMountParameters.setHeaderActionMenu}
|
||||
>
|
||||
<EuiFlexGroup
|
||||
alignItems="flexEnd"
|
||||
responsive={false}
|
||||
style={{ paddingRight: 20 }}
|
||||
>
|
||||
<EuiFlexItem>
|
||||
<EuiToolTip position="top" content={<p>{ANALYZE_MESSAGE}</p>}>
|
||||
<EuiButtonEmpty
|
||||
href={uxExploratoryViewLink}
|
||||
color="primary"
|
||||
iconType="visBarVerticalStacked"
|
||||
>
|
||||
{ANALYZE_DATA}
|
||||
</EuiButtonEmpty>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</HeaderMenuPortal>
|
||||
);
|
||||
}
|
|
@ -7,53 +7,91 @@
|
|||
|
||||
import { AppDataType, ReportViewTypeId } from '../../types';
|
||||
import { CLS_FIELD, FCP_FIELD, FID_FIELD, LCP_FIELD, TBT_FIELD } from './elasticsearch_fieldnames';
|
||||
import {
|
||||
AGENT_HOST_LABEL,
|
||||
BROWSER_FAMILY_LABEL,
|
||||
BROWSER_VERSION_LABEL,
|
||||
CLS_LABEL,
|
||||
CPU_USAGE_LABEL,
|
||||
DEVICE_LABEL,
|
||||
ENVIRONMENT_LABEL,
|
||||
FCP_LABEL,
|
||||
FID_LABEL,
|
||||
HOST_NAME_LABEL,
|
||||
KIP_OVER_TIME_LABEL,
|
||||
KPI_LABEL,
|
||||
LCP_LABEL,
|
||||
LOCATION_LABEL,
|
||||
LOGS_FREQUENCY_LABEL,
|
||||
MEMORY_USAGE_LABEL,
|
||||
METRIC_LABEL,
|
||||
MONITOR_DURATION_LABEL,
|
||||
MONITOR_ID_LABEL,
|
||||
MONITOR_NAME_LABEL,
|
||||
MONITOR_STATUS_LABEL,
|
||||
MONITOR_TYPE_LABEL,
|
||||
NETWORK_ACTIVITY_LABEL,
|
||||
OBSERVER_LOCATION_LABEL,
|
||||
OS_LABEL,
|
||||
PERF_DIST_LABEL,
|
||||
PORT_LABEL,
|
||||
SERVICE_LATENCY_LABEL,
|
||||
SERVICE_NAME_LABEL,
|
||||
SERVICE_THROUGHPUT_LABEL,
|
||||
TAGS_LABEL,
|
||||
TBT_LABEL,
|
||||
UPTIME_PINGS_LABEL,
|
||||
URL_LABEL,
|
||||
} from './labels';
|
||||
|
||||
export const DEFAULT_TIME = { from: 'now-1h', to: 'now' };
|
||||
|
||||
export const RECORDS_FIELD = 'Records';
|
||||
|
||||
export const FieldLabels: Record<string, string> = {
|
||||
'user_agent.name': 'Browser family',
|
||||
'user_agent.version': 'Browser version',
|
||||
'user_agent.os.name': 'Operating system',
|
||||
'client.geo.country_name': 'Location',
|
||||
'user_agent.device.name': 'Device',
|
||||
'observer.geo.name': 'Observer location',
|
||||
'service.name': 'Service Name',
|
||||
'service.environment': 'Environment',
|
||||
'user_agent.name': BROWSER_FAMILY_LABEL,
|
||||
'user_agent.version': BROWSER_VERSION_LABEL,
|
||||
'user_agent.os.name': OS_LABEL,
|
||||
'client.geo.country_name': LOCATION_LABEL,
|
||||
'user_agent.device.name': DEVICE_LABEL,
|
||||
'observer.geo.name': OBSERVER_LOCATION_LABEL,
|
||||
'service.name': SERVICE_NAME_LABEL,
|
||||
'service.environment': ENVIRONMENT_LABEL,
|
||||
|
||||
[LCP_FIELD]: 'Largest contentful paint (Seconds)',
|
||||
[FCP_FIELD]: 'First contentful paint (Seconds)',
|
||||
[TBT_FIELD]: 'Total blocking time (Seconds)',
|
||||
[FID_FIELD]: 'First input delay (Seconds)',
|
||||
[CLS_FIELD]: 'Cumulative layout shift',
|
||||
[LCP_FIELD]: LCP_LABEL,
|
||||
[FCP_FIELD]: FCP_LABEL,
|
||||
[TBT_FIELD]: TBT_LABEL,
|
||||
[FID_FIELD]: FID_LABEL,
|
||||
[CLS_FIELD]: CLS_LABEL,
|
||||
|
||||
'monitor.id': 'Monitor Id',
|
||||
'monitor.status': 'Monitor Status',
|
||||
'monitor.id': MONITOR_ID_LABEL,
|
||||
'monitor.status': MONITOR_STATUS_LABEL,
|
||||
|
||||
'agent.hostname': 'Agent host',
|
||||
'host.hostname': 'Host name',
|
||||
'monitor.name': 'Monitor name',
|
||||
'monitor.type': 'Monitor Type',
|
||||
'url.port': 'Port',
|
||||
'url.full': 'URL',
|
||||
tags: 'Tags',
|
||||
'agent.hostname': AGENT_HOST_LABEL,
|
||||
'host.hostname': HOST_NAME_LABEL,
|
||||
'monitor.name': MONITOR_NAME_LABEL,
|
||||
'monitor.type': MONITOR_TYPE_LABEL,
|
||||
'url.port': PORT_LABEL,
|
||||
'url.full': URL_LABEL,
|
||||
tags: TAGS_LABEL,
|
||||
|
||||
// custom
|
||||
|
||||
'performance.metric': 'Metric',
|
||||
'Business.KPI': 'KPI',
|
||||
'performance.metric': METRIC_LABEL,
|
||||
'Business.KPI': KPI_LABEL,
|
||||
};
|
||||
|
||||
export const DataViewLabels: Record<ReportViewTypeId, string> = {
|
||||
pld: 'Performance Distribution',
|
||||
upd: 'Uptime monitor duration',
|
||||
upp: 'Uptime pings',
|
||||
svl: 'APM Service latency',
|
||||
kpi: 'KPI over time',
|
||||
tpt: 'APM Service throughput',
|
||||
cpu: 'System CPU Usage',
|
||||
logs: 'Logs Frequency',
|
||||
mem: 'System Memory Usage',
|
||||
nwk: 'Network Activity',
|
||||
pld: PERF_DIST_LABEL,
|
||||
upd: MONITOR_DURATION_LABEL,
|
||||
upp: UPTIME_PINGS_LABEL,
|
||||
svl: SERVICE_LATENCY_LABEL,
|
||||
kpi: KIP_OVER_TIME_LABEL,
|
||||
tpt: SERVICE_THROUGHPUT_LABEL,
|
||||
cpu: CPU_USAGE_LABEL,
|
||||
logs: LOGS_FREQUENCY_LABEL,
|
||||
mem: MEMORY_USAGE_LABEL,
|
||||
nwk: NETWORK_ACTIVITY_LABEL,
|
||||
};
|
||||
|
||||
export const ReportToDataTypeMap: Record<ReportViewTypeId, AppDataType> = {
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const BROWSER_FAMILY_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.browserFamily',
|
||||
{
|
||||
defaultMessage: 'Browser family',
|
||||
}
|
||||
);
|
||||
export const BROWSER_VERSION_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.browserVersion',
|
||||
{
|
||||
defaultMessage: 'Browser version',
|
||||
}
|
||||
);
|
||||
|
||||
export const OS_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.os', {
|
||||
defaultMessage: 'Operating system',
|
||||
});
|
||||
export const LOCATION_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.location', {
|
||||
defaultMessage: 'Location',
|
||||
});
|
||||
|
||||
export const DEVICE_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.device', {
|
||||
defaultMessage: 'Device',
|
||||
});
|
||||
|
||||
export const OBSERVER_LOCATION_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.obsLocation',
|
||||
{
|
||||
defaultMessage: 'Observer location',
|
||||
}
|
||||
);
|
||||
|
||||
export const SERVICE_NAME_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.serviceName',
|
||||
{
|
||||
defaultMessage: 'Service name',
|
||||
}
|
||||
);
|
||||
|
||||
export const ENVIRONMENT_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.environment',
|
||||
{
|
||||
defaultMessage: 'Environment',
|
||||
}
|
||||
);
|
||||
|
||||
export const LCP_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.lcp', {
|
||||
defaultMessage: 'Largest contentful paint',
|
||||
});
|
||||
|
||||
export const FCP_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.fcp', {
|
||||
defaultMessage: 'First contentful paint',
|
||||
});
|
||||
|
||||
export const TBT_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.tbt', {
|
||||
defaultMessage: 'Total blocking time',
|
||||
});
|
||||
|
||||
export const FID_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.fid', {
|
||||
defaultMessage: 'First input delay',
|
||||
});
|
||||
|
||||
export const CLS_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.cls', {
|
||||
defaultMessage: 'Cumulative layout shift',
|
||||
});
|
||||
|
||||
export const BACKEND_TIME_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.backend',
|
||||
{
|
||||
defaultMessage: 'Backend time',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGE_LOAD_TIME_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.pageLoadTime',
|
||||
{
|
||||
defaultMessage: 'Page load time',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGE_VIEWS_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.pageViews',
|
||||
{
|
||||
defaultMessage: 'Page views',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGES_LOADED_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.pagesLoaded',
|
||||
{
|
||||
defaultMessage: 'Pages loaded',
|
||||
}
|
||||
);
|
||||
|
||||
export const MONITOR_ID_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorId',
|
||||
{
|
||||
defaultMessage: 'Monitor Id',
|
||||
}
|
||||
);
|
||||
|
||||
export const MONITOR_STATUS_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorStatus',
|
||||
{
|
||||
defaultMessage: 'Monitor Status',
|
||||
}
|
||||
);
|
||||
|
||||
export const AGENT_HOST_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.agentHost',
|
||||
{
|
||||
defaultMessage: 'Agent host',
|
||||
}
|
||||
);
|
||||
|
||||
export const HOST_NAME_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.hostName', {
|
||||
defaultMessage: 'Host name',
|
||||
});
|
||||
|
||||
export const MONITOR_NAME_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorName',
|
||||
{
|
||||
defaultMessage: 'Monitor name',
|
||||
}
|
||||
);
|
||||
|
||||
export const MONITOR_TYPE_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorType',
|
||||
{
|
||||
defaultMessage: 'Monitor type',
|
||||
}
|
||||
);
|
||||
|
||||
export const PORT_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.port', {
|
||||
defaultMessage: 'Port',
|
||||
});
|
||||
|
||||
export const URL_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.url', {
|
||||
defaultMessage: 'URL',
|
||||
});
|
||||
|
||||
export const TAGS_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.tags', {
|
||||
defaultMessage: 'Tags',
|
||||
});
|
||||
|
||||
export const METRIC_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.metric', {
|
||||
defaultMessage: 'Metric',
|
||||
});
|
||||
export const KPI_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.kpi', {
|
||||
defaultMessage: 'KPI',
|
||||
});
|
||||
|
||||
export const PERF_DIST_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.performanceDistribution',
|
||||
{
|
||||
defaultMessage: 'Performance Distribution',
|
||||
}
|
||||
);
|
||||
|
||||
export const MONITOR_DURATION_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorDuration',
|
||||
{
|
||||
defaultMessage: 'Uptime monitor duration',
|
||||
}
|
||||
);
|
||||
|
||||
export const UPTIME_PINGS_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.pings', {
|
||||
defaultMessage: 'Uptime pings',
|
||||
});
|
||||
|
||||
export const SERVICE_LATENCY_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.serviceLatency',
|
||||
{
|
||||
defaultMessage: 'APM Service latency',
|
||||
}
|
||||
);
|
||||
|
||||
export const SERVICE_THROUGHPUT_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.serviceThroughput',
|
||||
{
|
||||
defaultMessage: 'APM Service throughput',
|
||||
}
|
||||
);
|
||||
|
||||
export const CPU_USAGE_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.cpuUsage', {
|
||||
defaultMessage: 'System CPU usage',
|
||||
});
|
||||
|
||||
export const NETWORK_ACTIVITY_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.networkActivity',
|
||||
{
|
||||
defaultMessage: 'Network activity',
|
||||
}
|
||||
);
|
||||
export const MEMORY_USAGE_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.memoryUsage',
|
||||
{
|
||||
defaultMessage: 'System memory usage',
|
||||
}
|
||||
);
|
||||
|
||||
export const LOGS_FREQUENCY_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.logsFrequency',
|
||||
{
|
||||
defaultMessage: 'Logs frequency',
|
||||
}
|
||||
);
|
||||
|
||||
export const KIP_OVER_TIME_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.kpiOverTime',
|
||||
{
|
||||
defaultMessage: 'KPI over time',
|
||||
}
|
||||
);
|
||||
|
||||
export const MONITORS_DURATION_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.monitorDurationLabel',
|
||||
{
|
||||
defaultMessage: 'Monitor duration',
|
||||
}
|
||||
);
|
||||
|
||||
export const WEB_APPLICATION_LABEL = i18n.translate(
|
||||
'xpack.observability.expView.fieldLabels.webApplication',
|
||||
{
|
||||
defaultMessage: 'Web Application',
|
||||
}
|
||||
);
|
||||
|
||||
export const UP_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.up', {
|
||||
defaultMessage: 'Up',
|
||||
});
|
||||
|
||||
export const DOWN_LABEL = i18n.translate('xpack.observability.expView.fieldLabels.down', {
|
||||
defaultMessage: 'Down',
|
||||
});
|
|
@ -103,7 +103,7 @@ describe('Lens Attribute', () => {
|
|||
expect(lnsAttr.getNumberRangeColumn('transaction.duration.us')).toEqual({
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
@ -125,7 +125,7 @@ describe('Lens Attribute', () => {
|
|||
expect(lnsAttr.getNumberRangeColumn('transaction.duration.us')).toEqual({
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
@ -161,7 +161,7 @@ describe('Lens Attribute', () => {
|
|||
expect(lnsAttr.getXAxis()).toEqual({
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
@ -186,7 +186,7 @@ describe('Lens Attribute', () => {
|
|||
'x-axis-column': {
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
@ -350,7 +350,7 @@ describe('Lens Attribute', () => {
|
|||
'x-axis-column': {
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
@ -395,7 +395,7 @@ describe('Lens Attribute', () => {
|
|||
'x-axis-column': {
|
||||
dataType: 'number',
|
||||
isBucketed: true,
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
operationType: 'range',
|
||||
params: {
|
||||
maxBars: 'auto',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { ConfigProps, DataSeries } from '../../types';
|
||||
import { FieldLabels } from '../constants';
|
||||
import { FieldLabels, RECORDS_FIELD } from '../constants';
|
||||
import { buildPhraseFilter } from '../utils';
|
||||
import {
|
||||
CLIENT_GEO_COUNTRY_NAME,
|
||||
|
@ -27,6 +27,17 @@ import {
|
|||
TRANSACTION_TIME_TO_FIRST_BYTE,
|
||||
TRANSACTION_URL,
|
||||
} from '../constants/elasticsearch_fieldnames';
|
||||
import {
|
||||
BACKEND_TIME_LABEL,
|
||||
CLS_LABEL,
|
||||
FCP_LABEL,
|
||||
FID_LABEL,
|
||||
LCP_LABEL,
|
||||
PAGE_LOAD_TIME_LABEL,
|
||||
PAGE_VIEWS_LABEL,
|
||||
TBT_LABEL,
|
||||
WEB_APPLICATION_LABEL,
|
||||
} from '../constants/labels';
|
||||
|
||||
export function getKPITrendsLensConfig({ seriesId, indexPattern }: ConfigProps): DataSeries {
|
||||
return {
|
||||
|
@ -62,7 +73,7 @@ export function getKPITrendsLensConfig({ seriesId, indexPattern }: ConfigProps):
|
|||
...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', indexPattern),
|
||||
...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', indexPattern),
|
||||
],
|
||||
labels: { ...FieldLabels, [SERVICE_NAME]: 'Web Application' },
|
||||
labels: { ...FieldLabels, [SERVICE_NAME]: WEB_APPLICATION_LABEL },
|
||||
reportDefinitions: [
|
||||
{
|
||||
field: SERVICE_NAME,
|
||||
|
@ -74,16 +85,20 @@ export function getKPITrendsLensConfig({ seriesId, indexPattern }: ConfigProps):
|
|||
{
|
||||
field: 'business.kpi',
|
||||
custom: true,
|
||||
defaultValue: 'Records',
|
||||
defaultValue: RECORDS_FIELD,
|
||||
options: [
|
||||
{ field: 'Records', label: 'Page views' },
|
||||
{ label: 'Page load time', field: TRANSACTION_DURATION, columnType: 'operation' },
|
||||
{ label: 'Backend time', field: TRANSACTION_TIME_TO_FIRST_BYTE, columnType: 'operation' },
|
||||
{ label: 'First contentful paint', field: FCP_FIELD, columnType: 'operation' },
|
||||
{ label: 'Total blocking time', field: TBT_FIELD, columnType: 'operation' },
|
||||
{ label: 'Largest contentful paint', field: LCP_FIELD, columnType: 'operation' },
|
||||
{ label: 'First input delay', field: FID_FIELD, columnType: 'operation' },
|
||||
{ label: 'Cumulative layout shift', field: CLS_FIELD, columnType: 'operation' },
|
||||
{ field: RECORDS_FIELD, label: PAGE_VIEWS_LABEL },
|
||||
{ label: PAGE_LOAD_TIME_LABEL, field: TRANSACTION_DURATION, columnType: 'operation' },
|
||||
{
|
||||
label: BACKEND_TIME_LABEL,
|
||||
field: TRANSACTION_TIME_TO_FIRST_BYTE,
|
||||
columnType: 'operation',
|
||||
},
|
||||
{ label: FCP_LABEL, field: FCP_FIELD, columnType: 'operation' },
|
||||
{ label: TBT_LABEL, field: TBT_FIELD, columnType: 'operation' },
|
||||
{ label: LCP_LABEL, field: LCP_FIELD, columnType: 'operation' },
|
||||
{ label: FID_LABEL, field: FID_FIELD, columnType: 'operation' },
|
||||
{ label: CLS_LABEL, field: CLS_FIELD, columnType: 'operation' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { ConfigProps, DataSeries } from '../../types';
|
||||
import { FieldLabels } from '../constants';
|
||||
import { FieldLabels, RECORDS_FIELD } from '../constants';
|
||||
import { buildPhraseFilter } from '../utils';
|
||||
import {
|
||||
CLIENT_GEO_COUNTRY_NAME,
|
||||
|
@ -27,6 +27,17 @@ import {
|
|||
USER_AGENT_OS,
|
||||
USER_AGENT_VERSION,
|
||||
} from '../constants/elasticsearch_fieldnames';
|
||||
import {
|
||||
BACKEND_TIME_LABEL,
|
||||
CLS_LABEL,
|
||||
FCP_LABEL,
|
||||
FID_LABEL,
|
||||
LCP_LABEL,
|
||||
PAGE_LOAD_TIME_LABEL,
|
||||
PAGES_LOADED_LABEL,
|
||||
TBT_LABEL,
|
||||
WEB_APPLICATION_LABEL,
|
||||
} from '../constants/labels';
|
||||
|
||||
export function getPerformanceDistLensConfig({ seriesId, indexPattern }: ConfigProps): DataSeries {
|
||||
return {
|
||||
|
@ -39,8 +50,8 @@ export function getPerformanceDistLensConfig({ seriesId, indexPattern }: ConfigP
|
|||
},
|
||||
yAxisColumns: [
|
||||
{
|
||||
sourceField: 'Records',
|
||||
label: 'Pages loaded',
|
||||
sourceField: RECORDS_FIELD,
|
||||
label: PAGES_LOADED_LABEL,
|
||||
},
|
||||
],
|
||||
hasOperationType: false,
|
||||
|
@ -71,14 +82,13 @@ export function getPerformanceDistLensConfig({ seriesId, indexPattern }: ConfigP
|
|||
custom: true,
|
||||
defaultValue: TRANSACTION_DURATION,
|
||||
options: [
|
||||
{ label: 'Page load time', field: TRANSACTION_DURATION },
|
||||
{ label: 'Backend time', field: TRANSACTION_TIME_TO_FIRST_BYTE },
|
||||
{ label: 'First contentful paint', field: FCP_FIELD },
|
||||
{ label: 'Total blocking time', field: TBT_FIELD },
|
||||
// FIXME, review if we need these descriptions
|
||||
{ label: 'Largest contentful paint', field: LCP_FIELD, description: 'Core web vital' },
|
||||
{ label: 'First input delay', field: FID_FIELD, description: 'Core web vital' },
|
||||
{ label: 'Cumulative layout shift', field: CLS_FIELD, description: 'Core web vital' },
|
||||
{ label: PAGE_LOAD_TIME_LABEL, field: TRANSACTION_DURATION },
|
||||
{ label: BACKEND_TIME_LABEL, field: TRANSACTION_TIME_TO_FIRST_BYTE },
|
||||
{ label: FCP_LABEL, field: FCP_FIELD },
|
||||
{ label: TBT_LABEL, field: TBT_FIELD },
|
||||
{ label: LCP_LABEL, field: LCP_FIELD },
|
||||
{ label: FID_LABEL, field: FID_FIELD },
|
||||
{ label: CLS_LABEL, field: CLS_FIELD },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -88,8 +98,8 @@ export function getPerformanceDistLensConfig({ seriesId, indexPattern }: ConfigP
|
|||
],
|
||||
labels: {
|
||||
...FieldLabels,
|
||||
[SERVICE_NAME]: 'Web Application',
|
||||
[TRANSACTION_DURATION]: 'Page load time (Seconds)',
|
||||
[SERVICE_NAME]: WEB_APPLICATION_LABEL,
|
||||
[TRANSACTION_DURATION]: PAGE_LOAD_TIME_LABEL,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import { ConfigProps, DataSeries } from '../../types';
|
||||
import { FieldLabels } from '../constants';
|
||||
import { buildExistsFilter } from '../utils';
|
||||
import { MONITORS_DURATION_LABEL } from '../constants/labels';
|
||||
|
||||
export function getMonitorDurationConfig({ seriesId, indexPattern }: ConfigProps): DataSeries {
|
||||
return {
|
||||
|
@ -22,7 +23,7 @@ export function getMonitorDurationConfig({ seriesId, indexPattern }: ConfigProps
|
|||
{
|
||||
operationType: 'average',
|
||||
sourceField: 'monitor.duration.us',
|
||||
label: 'Monitor duration (ms)',
|
||||
label: MONITORS_DURATION_LABEL,
|
||||
},
|
||||
],
|
||||
hasOperationType: true,
|
||||
|
@ -44,6 +45,6 @@ export function getMonitorDurationConfig({ seriesId, indexPattern }: ConfigProps
|
|||
field: 'url.full',
|
||||
},
|
||||
],
|
||||
labels: { ...FieldLabels, 'monitor.duration.us': 'Monitor duration' },
|
||||
labels: { ...FieldLabels, 'monitor.duration.us': MONITORS_DURATION_LABEL },
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import { ConfigProps, DataSeries } from '../../types';
|
||||
import { FieldLabels } from '../constants';
|
||||
import { buildExistsFilter } from '../utils';
|
||||
import { DOWN_LABEL, UP_LABEL } from '../constants/labels';
|
||||
|
||||
export function getMonitorPingsConfig({ seriesId, indexPattern }: ConfigProps): DataSeries {
|
||||
return {
|
||||
|
@ -22,12 +23,12 @@ export function getMonitorPingsConfig({ seriesId, indexPattern }: ConfigProps):
|
|||
{
|
||||
operationType: 'sum',
|
||||
sourceField: 'summary.up',
|
||||
label: 'Up',
|
||||
label: UP_LABEL,
|
||||
},
|
||||
{
|
||||
operationType: 'sum',
|
||||
sourceField: 'summary.down',
|
||||
label: 'Down',
|
||||
label: DOWN_LABEL,
|
||||
},
|
||||
],
|
||||
yTitle: 'Pings',
|
||||
|
|
|
@ -21,7 +21,7 @@ export const sampleAttribute = {
|
|||
columns: {
|
||||
'x-axis-column': {
|
||||
sourceField: 'transaction.duration.us',
|
||||
label: 'Page load time (Seconds)',
|
||||
label: 'Page load time',
|
||||
dataType: 'number',
|
||||
operationType: 'range',
|
||||
isBucketed: true,
|
||||
|
|
|
@ -14,6 +14,10 @@ import { useFetcher } from '../../../../..';
|
|||
import { useUrlStorage } from '../../hooks/use_url_storage';
|
||||
import { SeriesType } from '../../../../../../../lens/public';
|
||||
|
||||
const CHART_TYPE_LABEL = i18n.translate('xpack.observability.expView.chartTypes.label', {
|
||||
defaultMessage: 'Chart type',
|
||||
});
|
||||
|
||||
export function SeriesChartTypesSelect({
|
||||
seriesId,
|
||||
defaultChartType,
|
||||
|
@ -38,9 +42,7 @@ export function SeriesChartTypesSelect({
|
|||
onChange={onChange}
|
||||
value={seriesType}
|
||||
excludeChartTypes={['bar_percentage_stacked']}
|
||||
label={i18n.translate('xpack.observability.expView.chartTypes.label', {
|
||||
defaultMessage: 'Chart type',
|
||||
})}
|
||||
label={CHART_TYPE_LABEL}
|
||||
includeChartTypes={['bar', 'bar_horizontal', 'line', 'area', 'bar_stacked', 'area_stacked']}
|
||||
/>
|
||||
);
|
||||
|
@ -96,7 +98,7 @@ export function XYChartTypesSelect({
|
|||
<EuiSuperSelect
|
||||
fullWidth
|
||||
compressed
|
||||
prepend="Chart type"
|
||||
prepend={CHART_TYPE_LABEL}
|
||||
valueOfSelected={value}
|
||||
isLoading={loading}
|
||||
options={options}
|
||||
|
|
|
@ -75,7 +75,9 @@ export function OperationTypeSelect({
|
|||
return (
|
||||
<EuiSuperSelect
|
||||
fullWidth
|
||||
prepend="Calculation"
|
||||
prepend={i18n.translate('xpack.observability.expView.operationType.label', {
|
||||
defaultMessage: 'Calculation',
|
||||
})}
|
||||
data-test-subj="operationTypeSelect"
|
||||
compressed
|
||||
valueOfSelected={operationType || defaultOperationType}
|
||||
|
|
|
@ -60,5 +60,6 @@ export { useChartTheme } from './hooks/use_chart_theme';
|
|||
export { useTheme } from './hooks/use_theme';
|
||||
export { getApmTraceUrl } from './utils/get_apm_trace_url';
|
||||
export { createExploratoryViewUrl } from './components/shared/exploratory_view/configurations/utils';
|
||||
export type { SeriesUrl } from './components/shared/exploratory_view/types';
|
||||
|
||||
export { FormatterRuleRegistry } from './rules/formatter_rule_registry';
|
||||
|
|
|
@ -6,22 +6,60 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useKibana } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
import { HeaderMenuPortal } from '../../../../../observability/public';
|
||||
import {
|
||||
createExploratoryViewUrl,
|
||||
HeaderMenuPortal,
|
||||
SeriesUrl,
|
||||
} from '../../../../../observability/public';
|
||||
import { AppMountParameters } from '../../../../../../../src/core/public';
|
||||
import { useUptimeSettingsContext } from '../../../contexts/uptime_settings_context';
|
||||
import { useGetUrlParams } from '../../../hooks';
|
||||
|
||||
const ADD_DATA_LABEL = i18n.translate('xpack.uptime.addDataButtonLabel', {
|
||||
defaultMessage: 'Add data',
|
||||
});
|
||||
|
||||
const ANALYZE_DATA = i18n.translate('xpack.uptime.analyzeDataButtonLabel', {
|
||||
defaultMessage: 'Analyze data',
|
||||
});
|
||||
|
||||
const ANALYZE_MESSAGE = i18n.translate('xpack.uptime.analyzeDataButtonLabel.message', {
|
||||
defaultMessage:
|
||||
'EXPERIMENTAL - Analyze Data allows you to select and filter result data in any dimension and look for the cause or impact of performance problems.',
|
||||
});
|
||||
|
||||
export const ActionMenu = ({ appMountParameters }: { appMountParameters: AppMountParameters }) => {
|
||||
const kibana = useKibana();
|
||||
const { basePath } = useUptimeSettingsContext();
|
||||
const { dateRangeStart, dateRangeEnd } = useGetUrlParams();
|
||||
|
||||
const syntheticExploratoryViewLink = createExploratoryViewUrl(
|
||||
{
|
||||
'synthetics-series': {
|
||||
dataType: 'synthetics',
|
||||
time: { from: dateRangeStart, to: dateRangeEnd },
|
||||
} as SeriesUrl,
|
||||
},
|
||||
basePath
|
||||
);
|
||||
|
||||
return (
|
||||
<HeaderMenuPortal setHeaderActionMenu={appMountParameters.setHeaderActionMenu}>
|
||||
<EuiFlexGroup alignItems="flexEnd" responsive={false} style={{ paddingRight: 20 }}>
|
||||
<EuiFlexItem>
|
||||
<EuiToolTip position="top" content={<p>{ANALYZE_MESSAGE}</p>}>
|
||||
<EuiButtonEmpty
|
||||
href={syntheticExploratoryViewLink}
|
||||
color="primary"
|
||||
iconType="visBarVerticalStacked"
|
||||
>
|
||||
{ANALYZE_DATA}
|
||||
</EuiButtonEmpty>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty
|
||||
href={kibana.services?.application?.getUrlForApp('/home#/tutorial/uptimeMonitors')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue