({
const { httpAgent, httpsAgent } = getProxyAgents(proxySettings, logger);
return await axios(url, {
+ ...rest,
method,
data: data ?? {},
- params,
- auth,
// use httpAgent and httpsAgent and set axios proxy: false, to be able to handle fail on invalid certs
httpAgent,
httpsAgent,
proxy: false,
- headers,
- validateStatus,
});
};
diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts
index bd2e18b66c8e3..a41faba2e9382 100644
--- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts
+++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts
@@ -125,7 +125,7 @@ export const generalSettings: RawSettingDefinition[] = [
defaultMessage:
'When recording, the agent instruments incoming HTTP requests, tracks errors, and collects and sends metrics. When set to non-recording, the agent works as a noop, not collecting data and not communicating with the APM Server except for polling for updated configuration. As this is a reversible switch, agent threads are not being killed when set to non-recording, but they will be mostly idle in this state, so the overhead should be negligible. You can use this setting to dynamically control whether Elastic APM is enabled or disabled.',
}),
- excludeAgents: ['nodejs'],
+ excludeAgents: ['nodejs', 'rum-js', 'js-base'],
},
// SERVER_TIMEOUT
diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts
index f7209d8b46edb..4f319e4dd7016 100644
--- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts
+++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts
@@ -87,14 +87,12 @@ describe('filterByAgent', () => {
it('js-base', () => {
expect(getSettingKeysForAgent('js-base')).toEqual([
- 'recording',
'transaction_sample_rate',
]);
});
it('rum-js', () => {
expect(getSettingKeysForAgent('rum-js')).toEqual([
- 'recording',
'transaction_sample_rate',
]);
});
diff --git a/x-pack/plugins/apm/common/utils/join_by_key/index.ts b/x-pack/plugins/apm/common/utils/join_by_key/index.ts
index 6678bf68afbae..d296fc44c1f24 100644
--- a/x-pack/plugins/apm/common/utils/join_by_key/index.ts
+++ b/x-pack/plugins/apm/common/utils/join_by_key/index.ts
@@ -9,11 +9,11 @@ import { isEqual, pull, merge, castArray } from 'lodash';
/**
* Joins a list of records by a given key. Key can be any type of value, from
* strings to plain objects, as long as it is present in all records. `isEqual`
- * is used for comparing keys.
- *
+ * is used for comparing keys.
+ *
* UnionToIntersection is needed to get all keys of union types, see below for
* example.
- *
+ *
const agentNames = [{ serviceName: '', agentName: '' }];
const transactionRates = [{ serviceName: '', transactionsPerMinute: 1 }];
const flattened = joinByKey(
diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx
index 3b737c6fa4170..f7a4a322e99eb 100644
--- a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx
+++ b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx
@@ -56,8 +56,7 @@ export function ServiceStatsFetcher({
}
);
- const isLoading =
- status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING;
+ const isLoading = status === FETCH_STATUS.LOADING;
if (isLoading) {
return ;
diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx
index e7ce4bb24b38f..c6f82e3492750 100644
--- a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx
+++ b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx
@@ -11,7 +11,6 @@ import React, { ReactNode } from 'react';
import { createKibanaReactContext } from 'src/plugins/kibana_react/public';
import { License } from '../../../../../licensing/common/license';
import { EuiThemeProvider } from '../../../../../observability/public';
-import { FETCH_STATUS } from '../../../../../observability/public/hooks/use_fetcher';
import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context';
import { LicenseContext } from '../../../context/license/license_context';
import * as useFetcherModule from '../../../hooks/use_fetcher';
@@ -92,7 +91,7 @@ describe('ServiceMap', () => {
jest.spyOn(useFetcherModule, 'useFetcher').mockReturnValueOnce({
data: { elements: [] },
refetch: () => {},
- status: FETCH_STATUS.SUCCESS,
+ status: useFetcherModule.FETCH_STATUS.SUCCESS,
});
expect(
diff --git a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx
index 9f3a65583ddb7..23f688e66966d 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx
@@ -61,29 +61,38 @@ export function AgentConfigurationList({ status, data, refetch }: Props) {
}
body={
- <>
-
- {i18n.translate(
- 'xpack.apm.agentConfig.configTable.emptyPromptText',
+
+ {i18n.translate('xpack.apm.agentConfig.configTable.emptyPromptText', {
+ defaultMessage:
+ "Let's change that! You can fine-tune agent configuration directly from Kibana without having to redeploy. Get started by creating your first configuration.",
+ })}
+
+ }
+ actions={
+
- >
- }
- actions={
-
- {i18n.translate(
- 'xpack.apm.agentConfig.configTable.createConfigButtonLabel',
- { defaultMessage: 'Create configuration' }
- )}
-
+
+ {i18n.translate(
+ 'xpack.apm.agentConfig.configTable.createConfigButtonLabel',
+ { defaultMessage: 'Create configuration' }
+ )}
+
+
}
/>
);
diff --git a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx
index ba08af32d65b6..8c10b96c51ce2 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx
@@ -248,7 +248,7 @@ export function ApmIndices() {
fill
onClick={handleApplyChangesEvent}
isLoading={isSaving}
- disabled={!canSave}
+ isDisabled={!canSave}
>
{i18n.translate(
'xpack.apm.settings.apmIndices.applyButton',
diff --git a/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx b/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx
index 4477ee5a99be3..63dd486544124 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx
@@ -219,7 +219,8 @@ describe('CustomLink', () => {
expect(saveCustomLinkSpy).toHaveBeenCalledTimes(1);
});
- it('deletes a custom link', async () => {
+ // FLAKY: https://github.com/elastic/kibana/issues/75106
+ it.skip('deletes a custom link', async () => {
const mockContext = getMockAPMContext({ canSave: true });
const component = render(
diff --git a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
index e709c7e104472..16aad0a9a8420 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
@@ -71,8 +71,7 @@ export function AddEnvironments({
);
}
- const isLoading =
- status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING;
+ const isLoading = status === FETCH_STATUS.LOADING;
return (
diff --git a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx
index b185685f0720a..c180ffb523f8e 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx
@@ -124,8 +124,7 @@ export function JobsList({ data, status, onAddEnvironments }: Props) {
function getNoItemsMessage({ status }: { status: FETCH_STATUS }) {
// loading state
- const isLoading =
- status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING;
+ const isLoading = status === FETCH_STATUS.LOADING;
if (isLoading) {
return ;
}
diff --git a/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx b/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx
index 5fe371c33475a..4ee4e793ef4ef 100644
--- a/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx
@@ -35,10 +35,7 @@ export function IconPopover({
if (!icon) {
return null;
}
- const isLoading =
- detailsFetchStatus === FETCH_STATUS.LOADING ||
- detailsFetchStatus === FETCH_STATUS.PENDING;
-
+ const isLoading = detailsFetchStatus === FETCH_STATUS.LOADING;
return (
;
diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx
index 1f8ff6fdcaf19..2991264b5c0c1 100644
--- a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx
@@ -137,9 +137,7 @@ export function getServiceColumns({
field: 'transactionType',
name: i18n.translate(
'xpack.apm.servicesTable.transactionColumnLabel',
- {
- defaultMessage: 'Transaction type',
- }
+ { defaultMessage: 'Transaction type' }
),
width: px(unit * 10),
sortable: true,
@@ -148,12 +146,9 @@ export function getServiceColumns({
: []),
{
field: 'avgResponseTime',
- name: i18n.translate(
- 'xpack.apm.servicesTable.avgResponseTimeColumnLabel',
- {
- defaultMessage: 'Avg. response time',
- }
- ),
+ name: i18n.translate('xpack.apm.servicesTable.latencyAvgColumnLabel', {
+ defaultMessage: 'Latency (avg.)',
+ }),
sortable: true,
dataType: 'number',
render: (_, { avgResponseTime }) => (
@@ -168,12 +163,9 @@ export function getServiceColumns({
},
{
field: 'transactionsPerMinute',
- name: i18n.translate(
- 'xpack.apm.servicesTable.transactionsPerMinuteColumnLabel',
- {
- defaultMessage: 'Trans. per minute',
- }
- ),
+ name: i18n.translate('xpack.apm.servicesTable.throughputColumnLabel', {
+ defaultMessage: 'Throughput',
+ }),
sortable: true,
dataType: 'number',
render: (_, { transactionsPerMinute }) => (
diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx
index 45a4afeb53235..275ea3aa13a20 100644
--- a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx
@@ -76,13 +76,13 @@ describe('ServiceList', () => {
expect(healthHeading).toBeNull();
});
- it('sorts by transactions per minute', async () => {
+ it('sorts by throughput', async () => {
const { findByTitle } = renderWithTheme( , {
wrapper: Wrapper,
});
expect(
- await findByTitle('Trans. per minute; Sorted in descending order')
+ await findByTitle('Throughput; Sorted in descending order')
).toBeInTheDocument();
});
});
diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx
index ae297b840ebc8..6ea1c7f7c5b41 100644
--- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx
@@ -102,9 +102,7 @@ export function ServiceOverviewDependenciesTable({ serviceName }: Props) {
field: 'throughputValue',
name: i18n.translate(
'xpack.apm.serviceOverview.dependenciesTableColumnThroughput',
- {
- defaultMessage: 'Traffic',
- }
+ { defaultMessage: 'Throughput' }
),
width: px(unit * 10),
render: (_, { throughput }) => {
diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx
index 51a4ef649a3ba..611f3499d40c2 100644
--- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx
@@ -117,9 +117,7 @@ export function ServiceOverviewInstancesTable({ serviceName }: Props) {
field: 'throughputValue',
name: i18n.translate(
'xpack.apm.serviceOverview.instancesTableColumnThroughput',
- {
- defaultMessage: 'Traffic',
- }
+ { defaultMessage: 'Throughput' }
),
width: px(unit * 10),
render: (_, { throughput }) => {
@@ -232,8 +230,7 @@ export function ServiceOverviewInstancesTable({ serviceName }: Props) {
memoryUsageValue: item.memoryUsage?.value ?? 0,
}));
- const isLoading =
- status === FETCH_STATUS.LOADING || status === FETCH_STATUS.PENDING;
+ const isLoading = status === FETCH_STATUS.LOADING;
return (
diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx
index e63d30022360e..b79e011bde488 100644
--- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx
@@ -51,7 +51,7 @@ export function ServiceOverviewThroughputChart({
{i18n.translate('xpack.apm.serviceOverview.throughtputChartTitle', {
- defaultMessage: 'Traffic',
+ defaultMessage: 'Throughput',
})}
@@ -66,10 +66,8 @@ export function ServiceOverviewThroughputChart({
type: 'linemark',
color: theme.eui.euiColorVis0,
title: i18n.translate(
- 'xpack.apm.serviceOverview.throughputChart.traffic',
- {
- defaultMessage: 'Traffic',
- }
+ 'xpack.apm.serviceOverview.throughtputChartTitle',
+ { defaultMessage: 'Throughput' }
),
},
]}
diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
index 307997731e5ef..0cb0ec4311043 100644
--- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
@@ -55,30 +55,29 @@ const DEFAULT_SORT = {
function getLatencyAggregationTypeLabel(latencyAggregationType?: string) {
switch (latencyAggregationType) {
- case 'avg': {
- i18n.translate(
+ case 'avg':
+ return i18n.translate(
'xpack.apm.serviceOverview.transactionsTableColumnLatency.avg',
{
defaultMessage: 'Latency (avg.)',
}
);
- }
- case 'p95': {
+
+ case 'p95':
return i18n.translate(
'xpack.apm.serviceOverview.transactionsTableColumnLatency.p95',
{
defaultMessage: 'Latency (95th)',
}
);
- }
- case 'p99': {
+
+ case 'p99':
return i18n.translate(
'xpack.apm.serviceOverview.transactionsTableColumnLatency.p99',
{
defaultMessage: 'Latency (99th)',
}
);
- }
}
}
@@ -210,10 +209,8 @@ export function ServiceOverviewTransactionsTable(props: Props) {
{
field: 'throughput',
name: i18n.translate(
- 'xpack.apm.serviceOverview.transactionsTableColumnTroughput',
- {
- defaultMessage: 'Traffic',
- }
+ 'xpack.apm.serviceOverview.transactionsTableColumnThroughput',
+ { defaultMessage: 'Throughput' }
),
width: px(unit * 10),
render: (_, { throughput }) => {
diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx
index 1699b7e7474fe..d2a3dc54c2a48 100644
--- a/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx
@@ -101,10 +101,8 @@ export function TransactionList({ items, isLoading }: Props) {
{
field: 'transactionsPerMinute',
name: i18n.translate(
- 'xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel',
- {
- defaultMessage: 'Trans. per minute',
- }
+ 'xpack.apm.transactionsTable.throughputColumnLabel',
+ { defaultMessage: 'Throughput' }
),
sortable: true,
dataType: 'number',
diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx
index ad2b68ae8a4ef..948facae222e7 100644
--- a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx
@@ -83,6 +83,7 @@ export function TransactionOverview({ serviceName }: TransactionOverviewProps) {
typeof LocalUIFilters
> = useMemo(
() => ({
+ shouldFetch: !!transactionType,
filterNames: [
'transactionResult',
'host',
@@ -101,7 +102,7 @@ export function TransactionOverview({ serviceName }: TransactionOverviewProps) {
// TODO: improve urlParams typings.
// `serviceName` or `transactionType` will never be undefined here, and this check should not be needed
- if (!serviceName || !transactionType) {
+ if (!serviceName) {
return null;
}
diff --git a/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx b/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx
index 65164a43bf10e..eaecd86820524 100644
--- a/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx
@@ -24,6 +24,7 @@ interface Props {
params?: Record;
showCount?: boolean;
children?: React.ReactNode;
+ shouldFetch?: boolean;
}
const ButtonWrapper = styled.div`
@@ -36,11 +37,13 @@ function LocalUIFilters({
filterNames,
children,
showCount = true,
+ shouldFetch = true,
}: Props) {
const { filters, setFilterValue, clearValues } = useLocalUIFilters({
filterNames,
projection,
params,
+ shouldFetch,
});
const hasValues = filters.some((filter) => filter.value.length > 0);
diff --git a/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx b/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx
index 359eadfc55cff..6d430d4c8f49c 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx
@@ -11,7 +11,7 @@ import { ChartContainer } from './chart_container';
describe('ChartContainer', () => {
describe('loading indicator', () => {
it('shows loading when status equals to Loading or Pending and has no data', () => {
- [FETCH_STATUS.PENDING, FETCH_STATUS.LOADING].map((status) => {
+ [FETCH_STATUS.NOT_INITIATED, FETCH_STATUS.LOADING].map((status) => {
const { queryAllByTestId } = render(
{
});
});
it('does not show loading when status equals to Loading or Pending and has data', () => {
- [FETCH_STATUS.PENDING, FETCH_STATUS.LOADING].map((status) => {
+ [FETCH_STATUS.NOT_INITIATED, FETCH_STATUS.LOADING].map((status) => {
const { queryAllByText } = render(
My amazing component
diff --git a/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx b/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx
index ef58430e1e31e..06a2b879f0622 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx
@@ -17,10 +17,7 @@ interface Props {
}
export function ChartContainer({ children, height, status, hasData }: Props) {
- if (
- !hasData &&
- (status === FETCH_STATUS.LOADING || status === FETCH_STATUS.PENDING)
- ) {
+ if (!hasData && status === FETCH_STATUS.LOADING) {
return ;
}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts
index 585eef546e754..057b04c2ecc2b 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts
+++ b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts
@@ -3,8 +3,9 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import { onBrushEnd } from './helper';
+import { onBrushEnd, isTimeseriesEmpty } from './helper';
import { History } from 'history';
+import { TimeSeries } from '../../../../../typings/timeseries';
describe('Chart helper', () => {
describe('onBrushEnd', () => {
@@ -36,4 +37,60 @@ describe('Chart helper', () => {
});
});
});
+
+ describe('isTimeseriesEmpty', () => {
+ it('returns true when timeseries is undefined', () => {
+ expect(isTimeseriesEmpty()).toBeTruthy();
+ });
+ it('returns true when timeseries data is empty', () => {
+ const timeseries = [
+ {
+ title: 'foo',
+ data: [],
+ type: 'line',
+ color: 'red',
+ },
+ ] as TimeSeries[];
+ expect(isTimeseriesEmpty(timeseries)).toBeTruthy();
+ });
+ it('returns true when y coordinate is null', () => {
+ const timeseries = [
+ {
+ title: 'foo',
+ data: [{ x: 1, y: null }],
+ type: 'line',
+ color: 'red',
+ },
+ ] as TimeSeries[];
+ expect(isTimeseriesEmpty(timeseries)).toBeTruthy();
+ });
+ it('returns true when y coordinate is undefined', () => {
+ const timeseries = [
+ {
+ title: 'foo',
+ data: [{ x: 1, y: undefined }],
+ type: 'line',
+ color: 'red',
+ },
+ ] as TimeSeries[];
+ expect(isTimeseriesEmpty(timeseries)).toBeTruthy();
+ });
+ it('returns false when at least one coordinate is filled', () => {
+ const timeseries = [
+ {
+ title: 'foo',
+ data: [{ x: 1, y: undefined }],
+ type: 'line',
+ color: 'red',
+ },
+ {
+ title: 'bar',
+ data: [{ x: 1, y: 1 }],
+ type: 'line',
+ color: 'green',
+ },
+ ] as TimeSeries[];
+ expect(isTimeseriesEmpty(timeseries)).toBeFalsy();
+ });
+ });
});
diff --git a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts
index a9c1337feac99..5239b3bd49bd4 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts
+++ b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts
@@ -6,6 +6,7 @@
import { XYBrushArea } from '@elastic/charts';
import { History } from 'history';
+import { TimeSeries } from '../../../../../typings/timeseries';
import { fromQuery, toQuery } from '../../Links/url_helpers';
export const onBrushEnd = ({
@@ -33,3 +34,16 @@ export const onBrushEnd = ({
});
}
};
+
+export function isTimeseriesEmpty(timeseries?: TimeSeries[]) {
+ return (
+ !timeseries ||
+ timeseries
+ .map((serie) => serie.data)
+ .flat()
+ .every(
+ ({ y }: { x?: number | null; y?: number | null }) =>
+ y === null || y === undefined
+ )
+ );
+}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
index 2c71e75994a4a..07c18ac766ace 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
@@ -36,7 +36,7 @@ import { useAnnotationsContext } from '../../../context/annotations/use_annotati
import { useChartPointerEventContext } from '../../../context/chart_pointer_event/use_chart_pointer_event_context';
import { unit } from '../../../style/variables';
import { ChartContainer } from './chart_container';
-import { onBrushEnd } from './helper/helper';
+import { onBrushEnd, isTimeseriesEmpty } from './helper/helper';
import { getLatencyChartSelector } from '../../../selectors/latency_chart_selectors';
interface Props {
@@ -86,13 +86,7 @@ export function TimeseriesChart({
const xFormatter = niceTimeFormatter([min, max]);
- const isEmpty = timeseries
- .map((serie) => serie.data)
- .flat()
- .every(
- ({ y }: { x?: number | null; y?: number | null }) =>
- y === null || y === undefined
- );
+ const isEmpty = isTimeseriesEmpty(timeseries);
const annotationColor = theme.eui.euiColorSecondary;
diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx
index 38a980fbcd90a..bbae0cd61264f 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx
@@ -26,7 +26,7 @@ export function TransactionBreakdownChart({
{i18n.translate('xpack.apm.transactionBreakdown.chartTitle', {
- defaultMessage: 'Average duration by span type',
+ defaultMessage: 'Time spent by span type',
})}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx
index 19c29815ab655..f1b29fe4b87bd 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx
@@ -35,7 +35,7 @@ import { useAnnotationsContext } from '../../../../context/annotations/use_annot
import { useChartPointerEventContext } from '../../../../context/chart_pointer_event/use_chart_pointer_event_context';
import { unit } from '../../../../style/variables';
import { ChartContainer } from '../../charts/chart_container';
-import { onBrushEnd } from '../../charts/helper/helper';
+import { isTimeseriesEmpty, onBrushEnd } from '../../charts/helper/helper';
interface Props {
fetchStatus: FETCH_STATUS;
@@ -66,8 +66,10 @@ export function TransactionBreakdownChartContents({
const annotationColor = theme.eui.euiColorSecondary;
+ const isEmpty = isTimeseriesEmpty(timeseries);
+
return (
-
+
onBrushEnd({ x, history })}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx
index 0ea0ee3e5a456..297cf050c4bbc 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx
@@ -13,11 +13,9 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
-import { TRANSACTION_REQUEST } from '../../../../../common/transaction_types';
import { asTransactionRate } from '../../../../../common/utils/formatters';
import { AnnotationsContextProvider } from '../../../../context/annotations/annotations_context';
import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context';
-import { useUrlParams } from '../../../../context/url_params_context/use_url_params';
import { useTransactionThroughputChartsFetcher } from '../../../../hooks/use_transaction_throughput_chart_fetcher';
import { LatencyChart } from '../latency_chart';
import { TimeseriesChart } from '../timeseries_chart';
@@ -25,9 +23,6 @@ import { TransactionBreakdownChart } from '../transaction_breakdown_chart';
import { TransactionErrorRateChart } from '../transaction_error_rate_chart/';
export function TransactionCharts() {
- const { urlParams } = useUrlParams();
- const { transactionType } = urlParams;
-
const {
throughputChartsData,
throughputChartsStatus,
@@ -49,11 +44,16 @@ export function TransactionCharts() {
- {tpmLabel(transactionType)}
+
+ {i18n.translate(
+ 'xpack.apm.metrics.transactionChart.throughputLabel',
+ { defaultMessage: 'Throughput' }
+ )}
+
@@ -76,19 +76,3 @@ export function TransactionCharts() {
>
);
}
-
-function tpmLabel(type?: string) {
- return type === TRANSACTION_REQUEST
- ? i18n.translate(
- 'xpack.apm.metrics.transactionChart.requestsPerMinuteLabel',
- {
- defaultMessage: 'Requests per minute',
- }
- )
- : i18n.translate(
- 'xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel',
- {
- defaultMessage: 'Transactions per minute',
- }
- );
-}
diff --git a/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts b/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts
new file mode 100644
index 0000000000000..587cb172eeab7
--- /dev/null
+++ b/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts
@@ -0,0 +1,77 @@
+/*
+ * 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 datemath from '@elastic/datemath';
+import moment from 'moment-timezone';
+import * as helpers from './helpers';
+
+describe('url_params_context helpers', () => {
+ describe('getParsedDate', () => {
+ describe('given undefined', () => {
+ it('returns undefined', () => {
+ expect(helpers.getParsedDate(undefined)).toBeUndefined();
+ });
+ });
+
+ describe('given a parsable date', () => {
+ it('returns the parsed date', () => {
+ expect(helpers.getParsedDate('1970-01-01T00:00:00.000Z')).toEqual(
+ '1970-01-01T00:00:00.000Z'
+ );
+ });
+ });
+
+ describe('given a non-parsable date', () => {
+ it('returns null', () => {
+ expect(helpers.getParsedDate('nope')).toEqual(null);
+ });
+ });
+ });
+
+ describe('getDateRange', () => {
+ describe('when rangeFrom and rangeTo are not changed', () => {
+ it('returns the previous state', () => {
+ expect(
+ helpers.getDateRange({
+ state: {
+ rangeFrom: 'now-1m',
+ rangeTo: 'now',
+ start: '1970-01-01T00:00:00.000Z',
+ end: '1971-01-01T00:00:00.000Z',
+ },
+ rangeFrom: 'now-1m',
+ rangeTo: 'now',
+ })
+ ).toEqual({
+ start: '1970-01-01T00:00:00.000Z',
+ end: '1971-01-01T00:00:00.000Z',
+ });
+ });
+ });
+
+ describe('when rangeFrom or rangeTo have changed', () => {
+ it('returns new state', () => {
+ jest.spyOn(datemath, 'parse').mockReturnValue(moment(0).utc());
+
+ expect(
+ helpers.getDateRange({
+ state: {
+ rangeFrom: 'now-1m',
+ rangeTo: 'now',
+ start: '1972-01-01T00:00:00.000Z',
+ end: '1973-01-01T00:00:00.000Z',
+ },
+ rangeFrom: 'now-2m',
+ rangeTo: 'now',
+ })
+ ).toEqual({
+ start: '1970-01-01T00:00:00.000Z',
+ end: '1970-01-01T00:00:00.000Z',
+ });
+ });
+ });
+ });
+});
diff --git a/x-pack/plugins/apm/public/context/url_params_context/helpers.ts b/x-pack/plugins/apm/public/context/url_params_context/helpers.ts
index 45db4dcc94cce..bff2ef5deb86c 100644
--- a/x-pack/plugins/apm/public/context/url_params_context/helpers.ts
+++ b/x-pack/plugins/apm/public/context/url_params_context/helpers.ts
@@ -17,18 +17,23 @@ export function getParsedDate(rawDate?: string, opts = {}) {
}
}
-export function getStart(prevState: IUrlParams, rangeFrom?: string) {
- if (prevState.rangeFrom !== rangeFrom) {
- return getParsedDate(rangeFrom);
+export function getDateRange({
+ state,
+ rangeFrom,
+ rangeTo,
+}: {
+ state: IUrlParams;
+ rangeFrom?: string;
+ rangeTo?: string;
+}) {
+ if (state.rangeFrom === rangeFrom && state.rangeTo === rangeTo) {
+ return { start: state.start, end: state.end };
}
- return prevState.start;
-}
-export function getEnd(prevState: IUrlParams, rangeTo?: string) {
- if (prevState.rangeTo !== rangeTo) {
- return getParsedDate(rangeTo, { roundUp: true });
- }
- return prevState.end;
+ return {
+ start: getParsedDate(rangeFrom),
+ end: getParsedDate(rangeTo, { roundUp: true }),
+ };
}
export function toNumber(value?: string) {
diff --git a/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts b/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts
index 6d9f982f92751..0596d649116a0 100644
--- a/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts
+++ b/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts
@@ -11,8 +11,7 @@ import { pickKeys } from '../../../common/utils/pick_keys';
import { localUIFilterNames } from '../../../server/lib/ui_filters/local_ui_filters/config';
import { toQuery } from '../../components/shared/Links/url_helpers';
import {
- getEnd,
- getStart,
+ getDateRange,
removeUndefinedProps,
toBoolean,
toNumber,
@@ -56,8 +55,7 @@ export function resolveUrlParams(location: Location, state: TimeUrlParams) {
return removeUndefinedProps({
// date params
- start: getStart(state, rangeFrom),
- end: getEnd(state, rangeTo),
+ ...getDateRange({ state, rangeFrom, rangeTo }),
rangeFrom,
rangeTo,
refreshPaused: refreshPaused ? toBoolean(refreshPaused) : undefined,
diff --git a/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts b/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts
index 551e92f8ba034..dabdf41c63f04 100644
--- a/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts
+++ b/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts
@@ -34,10 +34,12 @@ export function useLocalUIFilters({
projection,
filterNames,
params,
+ shouldFetch,
}: {
projection: Projection;
filterNames: LocalUIFilterName[];
params?: Record;
+ shouldFetch: boolean;
}) {
const history = useHistory();
const { uiFilters, urlParams } = useUrlParams();
@@ -68,17 +70,19 @@ export function useLocalUIFilters({
};
const { data = getInitialData(filterNames), status } = useFetcher(() => {
- return callApi({
- method: 'GET',
- pathname: `/api/apm/ui_filters/local_filters/${projection}`,
- query: {
- uiFilters: JSON.stringify(uiFilters),
- start: urlParams.start,
- end: urlParams.end,
- filterNames: JSON.stringify(filterNames),
- ...params,
- },
- });
+ if (shouldFetch) {
+ return callApi({
+ method: 'GET',
+ pathname: `/api/apm/ui_filters/local_filters/${projection}`,
+ query: {
+ uiFilters: JSON.stringify(uiFilters),
+ start: urlParams.start,
+ end: urlParams.end,
+ filterNames: JSON.stringify(filterNames),
+ ...params,
+ },
+ });
+ }
}, [
callApi,
projection,
@@ -87,6 +91,7 @@ export function useLocalUIFilters({
urlParams.end,
filterNames,
params,
+ shouldFetch,
]);
const filters = data.map((filter) => ({
diff --git a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx
index a9a4871dc8707..8174f06e06b8b 100644
--- a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx
+++ b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx
@@ -15,7 +15,7 @@ export enum FETCH_STATUS {
LOADING = 'loading',
SUCCESS = 'success',
FAILURE = 'failure',
- PENDING = 'pending',
+ NOT_INITIATED = 'not_initiated',
}
export interface FetcherResult {
@@ -46,7 +46,7 @@ export function useFetcher(
FetcherResult>
>({
data: undefined,
- status: FETCH_STATUS.PENDING,
+ status: FETCH_STATUS.NOT_INITIATED,
});
const [counter, setCounter] = useState(0);
diff --git a/x-pack/plugins/apm/server/lib/services/get_throughput.ts b/x-pack/plugins/apm/server/lib/services/get_throughput.ts
index 0ac0ad17ef8fa..29071f96e3a06 100644
--- a/x-pack/plugins/apm/server/lib/services/get_throughput.ts
+++ b/x-pack/plugins/apm/server/lib/services/get_throughput.ts
@@ -28,7 +28,10 @@ interface Options {
type ESResponse = PromiseReturnType;
function transform(response: ESResponse) {
- const buckets = response.aggregations?.throughput?.buckets ?? [];
+ if (response.hits.total.value === 0) {
+ return [];
+ }
+ const buckets = response.aggregations?.throughput.buckets ?? [];
return buckets.map(({ key: x, doc_count: y }) => ({ x, y }));
}
diff --git a/x-pack/plugins/console_extensions/tsconfig.json b/x-pack/plugins/console_extensions/tsconfig.json
new file mode 100644
index 0000000000000..5ad28f230a0bb
--- /dev/null
+++ b/x-pack/plugins/console_extensions/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "composite": true,
+ "outDir": "./target/types",
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "declarationMap": true
+ },
+ "include": [
+ "server/**/*"
+ ],
+ "references": [
+ { "path": "../../../src/core/tsconfig.json" },
+ { "path": "../../../src/plugins/console/tsconfig.json" }
+ ]
+}
diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts
index fc6c860f907f6..d1bb672b985f4 100644
--- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts
+++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts
@@ -373,7 +373,7 @@ describe('EnhancedSearchInterceptor', () => {
test('should NOT DELETE a running SAVED async search on abort', async () => {
const sessionId = 'sessionId';
- sessionService.getSessionId.mockImplementation(() => sessionId);
+ sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId);
const responses = [
{
time: 10,
@@ -479,6 +479,7 @@ describe('EnhancedSearchInterceptor', () => {
test('should track searches', async () => {
const sessionId = 'sessionId';
+ sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId);
sessionService.getSessionId.mockImplementation(() => sessionId);
const untrack = jest.fn();
@@ -496,6 +497,7 @@ describe('EnhancedSearchInterceptor', () => {
test('session service should be able to cancel search', async () => {
const sessionId = 'sessionId';
+ sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId);
sessionService.getSessionId.mockImplementation(() => sessionId);
const untrack = jest.fn();
@@ -519,6 +521,7 @@ describe('EnhancedSearchInterceptor', () => {
test("don't track non current session searches", async () => {
const sessionId = 'sessionId';
+ sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId);
sessionService.getSessionId.mockImplementation(() => sessionId);
const untrack = jest.fn();
@@ -539,6 +542,7 @@ describe('EnhancedSearchInterceptor', () => {
test("don't track if no current session", async () => {
sessionService.getSessionId.mockImplementation(() => undefined);
+ sessionService.isCurrentSession.mockImplementation((_sessionId) => false);
const untrack = jest.fn();
sessionService.trackSearch.mockImplementation(() => untrack);
diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts
index b0f194115f0b8..72d2cce49477b 100644
--- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts
+++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts
@@ -64,20 +64,24 @@ export class EnhancedSearchInterceptor extends SearchInterceptor {
const search = () => this.runSearch({ id, ...request }, searchOptions);
this.pendingCount$.next(this.pendingCount$.getValue() + 1);
- const isCurrentSession = () =>
- !!options.sessionId && options.sessionId === this.deps.session.getSessionId();
- const untrackSearch = isCurrentSession() && this.deps.session.trackSearch({ abort });
+ const untrackSearch =
+ this.deps.session.isCurrentSession(options.sessionId) &&
+ this.deps.session.trackSearch({ abort });
// track if this search's session will be send to background
// if yes, then we don't need to cancel this search when it is aborted
let isSavedToBackground = false;
const savedToBackgroundSub =
- isCurrentSession() &&
+ this.deps.session.isCurrentSession(options.sessionId) &&
this.deps.session.state$
.pipe(
skip(1), // ignore any state, we are only interested in transition x -> BackgroundLoading
- filter((state) => isCurrentSession() && state === SearchSessionState.BackgroundLoading),
+ filter(
+ (state) =>
+ this.deps.session.isCurrentSession(options.sessionId) &&
+ state === SearchSessionState.BackgroundLoading
+ ),
take(1)
)
.subscribe(() => {
@@ -93,7 +97,8 @@ export class EnhancedSearchInterceptor extends SearchInterceptor {
finalize(() => {
this.pendingCount$.next(this.pendingCount$.getValue() - 1);
cleanup();
- if (untrackSearch && isCurrentSession()) {
+ if (untrackSearch && this.deps.session.isCurrentSession(options.sessionId)) {
+ // untrack if this search still belongs to current session
untrackSearch();
}
if (savedToBackgroundSub) {
diff --git a/x-pack/plugins/discover_enhanced/tsconfig.json b/x-pack/plugins/discover_enhanced/tsconfig.json
new file mode 100644
index 0000000000000..38a55e557909b
--- /dev/null
+++ b/x-pack/plugins/discover_enhanced/tsconfig.json
@@ -0,0 +1,24 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "composite": true,
+ "outDir": "./target/types",
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "declarationMap": true
+ },
+ "include": ["*.ts", "common/**/*", "public/**/*", "server/**/*"],
+ "references": [
+ { "path": "../../../src/core/tsconfig.json" },
+ { "path": "../../../src/plugins/data/tsconfig.json" },
+ { "path": "../../../src/plugins/discover/tsconfig.json" },
+ { "path": "../../../src/plugins/share/tsconfig.json" },
+ { "path": "../../../src/plugins/kibana_legacy/tsconfig.json" },
+ { "path": "../../../src/plugins/kibana_utils/tsconfig.json" },
+ { "path": "../../../src/plugins/url_forwarding/tsconfig.json" },
+ { "path": "../../../src/plugins/usage_collection/tsconfig.json" },
+ { "path": "../../../src/plugins/embeddable/tsconfig.json" },
+ { "path": "../../../src/plugins/visualizations/tsconfig.json" },
+ { "path": "../../../src/plugins/ui_actions/tsconfig.json" }
+ ]
+}
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx
new file mode 100644
index 0000000000000..6b04a668b1489
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx
@@ -0,0 +1,21 @@
+/*
+ * 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 { shallow } from 'enzyme';
+import { Route, Switch } from 'react-router-dom';
+
+import { AnalyticsRouter } from './';
+
+describe('AnalyticsRouter', () => {
+ // Detailed route testing is better done via E2E tests
+ it('renders', () => {
+ const wrapper = shallow( );
+
+ expect(wrapper.find(Switch)).toHaveLength(1);
+ expect(wrapper.find(Route)).toHaveLength(8);
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx
new file mode 100644
index 0000000000000..117d14f7ca836
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx
@@ -0,0 +1,72 @@
+/*
+ * 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 { Route, Switch } from 'react-router-dom';
+
+import { APP_SEARCH_PLUGIN } from '../../../../../common/constants';
+import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
+import { NotFound } from '../../../shared/not_found';
+import {
+ ENGINE_PATH,
+ ENGINE_ANALYTICS_PATH,
+ ENGINE_ANALYTICS_TOP_QUERIES_PATH,
+ ENGINE_ANALYTICS_TOP_QUERIES_NO_RESULTS_PATH,
+ ENGINE_ANALYTICS_TOP_QUERIES_NO_CLICKS_PATH,
+ ENGINE_ANALYTICS_TOP_QUERIES_WITH_CLICKS_PATH,
+ ENGINE_ANALYTICS_RECENT_QUERIES_PATH,
+ ENGINE_ANALYTICS_QUERY_DETAIL_PATH,
+} from '../../routes';
+import {
+ ANALYTICS_TITLE,
+ TOP_QUERIES,
+ TOP_QUERIES_NO_RESULTS,
+ TOP_QUERIES_NO_CLICKS,
+ TOP_QUERIES_WITH_CLICKS,
+ RECENT_QUERIES,
+} from './constants';
+
+interface Props {
+ engineBreadcrumb: string[];
+}
+export const AnalyticsRouter: React.FC = ({ engineBreadcrumb }) => {
+ const ANALYTICS_BREADCRUMB = [...engineBreadcrumb, ANALYTICS_TITLE];
+
+ return (
+
+
+
+ TODO: Analytics overview
+
+
+
+ TODO: Top queries
+
+
+
+ TODO: Top queries with no results
+
+
+
+ TODO: Top queries with no clicks
+
+
+
+ TODO: Top queries with clicks
+
+
+
+ TODO: Recent queries
+
+
+ TODO: Query detail page
+
+
+
+
+
+ );
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts
index 9985753d09700..c1087bf4cb2f0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts
@@ -11,26 +11,46 @@ export const ANALYTICS_TITLE = i18n.translate(
{ defaultMessage: 'Analytics' }
);
+// Total card titles
export const TOTAL_DOCUMENTS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments',
{ defaultMessage: 'Total documents' }
);
-
export const TOTAL_API_OPERATIONS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalApiOperations',
{ defaultMessage: 'Total API operations' }
);
-
export const TOTAL_QUERIES = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalQueries',
{ defaultMessage: 'Total queries' }
);
-
export const TOTAL_CLICKS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalClicks',
{ defaultMessage: 'Total clicks' }
);
+// Queries sub-pages
+export const TOP_QUERIES = i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesTitle',
+ { defaultMessage: 'Top queries' }
+);
+export const TOP_QUERIES_NO_RESULTS = i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesNoResultsTitle',
+ { defaultMessage: 'Top queries with no results' }
+);
+export const TOP_QUERIES_NO_CLICKS = i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesNoClicksTitle',
+ { defaultMessage: 'Top queries with no clicks' }
+);
+export const TOP_QUERIES_WITH_CLICKS = i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesWithClicksTitle',
+ { defaultMessage: 'Top queries with clicks' }
+);
+export const RECENT_QUERIES = i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.analytics.recentQueriesTitle',
+ { defaultMessage: 'Recent queries' }
+);
+
// Moment date format conversions
export const SERVER_DATE_FORMAT = 'YYYY-MM-DD';
export const TOOLTIP_DATE_FORMAT = 'MMMM D, YYYY';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts
index 3b201b38703d9..0ab5ab80e8353 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts
@@ -5,5 +5,6 @@
*/
export { ANALYTICS_TITLE } from './constants';
+export { AnalyticsRouter } from './analytics_router';
export { AnalyticsChart } from './components';
export { convertToChartData } from './utils';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx
index 418ab33457d0a..40ae2cef0acb8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx
@@ -103,7 +103,11 @@ export const EngineNav: React.FC = () => {
{OVERVIEW_TITLE}
{canViewEngineAnalytics && (
-
+
{ANALYTICS_TITLE}
)}
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx
index cbaa347d65732..26c7b3f677fc1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx
@@ -19,6 +19,7 @@ import { setQueuedErrorMessage } from '../../../shared/flash_messages';
import { Loading } from '../../../shared/loading';
import { EngineOverview } from '../engine_overview';
+import { AnalyticsRouter } from '../analytics';
import { EngineRouter } from './';
@@ -93,6 +94,6 @@ describe('EngineRouter', () => {
setMockValues({ ...values, myRole: { canViewEngineAnalytics: true } });
const wrapper = shallow( );
- expect(wrapper.find('[data-test-subj="AnalyticsTODO"]')).toHaveLength(1);
+ expect(wrapper.find(AnalyticsRouter)).toHaveLength(1);
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
index 1d2f3f640f341..47fe302ac7014 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
@@ -33,13 +33,13 @@ import {
} from '../../routes';
import { ENGINES_TITLE } from '../engines';
import { OVERVIEW_TITLE } from '../engine_overview';
-import { ANALYTICS_TITLE } from '../analytics';
import { Loading } from '../../../shared/loading';
import { EngineOverview } from '../engine_overview';
+import { AnalyticsRouter } from '../analytics';
+import { DocumentDetail, Documents } from '../documents';
import { EngineLogic } from './';
-import { DocumentDetail, Documents } from '../documents';
export const EngineRouter: React.FC = () => {
const {
@@ -87,8 +87,7 @@ export const EngineRouter: React.FC = () => {
{canViewEngineAnalytics && (
-
- Just testing right now
+
)}
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx
new file mode 100644
index 0000000000000..027dea0aec77b
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx
@@ -0,0 +1,23 @@
+/*
+ * 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 { shallow } from 'enzyme';
+
+import { EngineIcon } from './engine_icon';
+import { MetaEngineIcon } from './meta_engine_icon';
+
+describe('Engines icons', () => {
+ it('renders an engine icon', () => {
+ const wrapper = shallow( );
+ expect(wrapper.hasClass('engineIcon')).toBe(true);
+ });
+
+ it('renders a meta engine icon', () => {
+ const wrapper = shallow( );
+ expect(wrapper.hasClass('engineIcon')).toBe(true);
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts
new file mode 100644
index 0000000000000..157ae396319ac
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts
@@ -0,0 +1,169 @@
+/*
+ * 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 { LogicMounter } from '../../../__mocks__/kea.mock';
+
+jest.mock('../../../shared/http', () => ({
+ HttpLogic: { values: { http: { get: jest.fn() } } },
+}));
+import { HttpLogic } from '../../../shared/http';
+
+import { EngineDetails } from '../engine/types';
+import { EnginesLogic } from './';
+
+describe('EnginesLogic', () => {
+ const DEFAULT_VALUES = {
+ dataLoading: true,
+ engines: [],
+ enginesTotal: 0,
+ enginesPage: 1,
+ metaEngines: [],
+ metaEnginesTotal: 0,
+ metaEnginesPage: 1,
+ };
+
+ const MOCK_ENGINE = {
+ name: 'hello-world',
+ created_at: 'Fri, 1 Jan 1970 12:00:00 +0000',
+ document_count: 50,
+ field_count: 10,
+ } as EngineDetails;
+ const MOCK_ENGINES_API_RESPONSE = {
+ results: [MOCK_ENGINE],
+ meta: {
+ page: {
+ current: 1,
+ total_pages: 10,
+ total_results: 100,
+ size: 10,
+ },
+ },
+ };
+
+ const { mount } = new LogicMounter(EnginesLogic);
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('has expected default values', () => {
+ mount();
+ expect(EnginesLogic.values).toEqual(DEFAULT_VALUES);
+ });
+
+ describe('actions', () => {
+ describe('onEnginesLoad', () => {
+ describe('dataLoading', () => {
+ it('should be set to false', () => {
+ mount();
+ EnginesLogic.actions.onEnginesLoad({ engines: [], total: 0 });
+
+ expect(EnginesLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ dataLoading: false,
+ });
+ });
+ });
+
+ describe('engines & enginesTotal', () => {
+ it('should be set to the provided value', () => {
+ mount();
+ EnginesLogic.actions.onEnginesLoad({ engines: [MOCK_ENGINE], total: 100 });
+
+ expect(EnginesLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ dataLoading: false,
+ engines: [MOCK_ENGINE],
+ enginesTotal: 100,
+ });
+ });
+ });
+ });
+
+ describe('onMetaEnginesLoad', () => {
+ describe('engines & enginesTotal', () => {
+ it('should be set to the provided value', () => {
+ mount();
+ EnginesLogic.actions.onMetaEnginesLoad({ engines: [MOCK_ENGINE], total: 1 });
+
+ expect(EnginesLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ metaEngines: [MOCK_ENGINE],
+ metaEnginesTotal: 1,
+ });
+ });
+ });
+ });
+
+ describe('onEnginesPagination', () => {
+ describe('enginesPage', () => {
+ it('should be set to the provided value', () => {
+ mount();
+ EnginesLogic.actions.onEnginesPagination(2);
+
+ expect(EnginesLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ enginesPage: 2,
+ });
+ });
+ });
+ });
+
+ describe('onMetaEnginesPagination', () => {
+ describe('metaEnginesPage', () => {
+ it('should be set to the provided value', () => {
+ mount();
+ EnginesLogic.actions.onMetaEnginesPagination(99);
+
+ expect(EnginesLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ metaEnginesPage: 99,
+ });
+ });
+ });
+ });
+
+ describe('loadEngines', () => {
+ it('should call the engines API endpoint and set state based on the results', async () => {
+ const promise = Promise.resolve(MOCK_ENGINES_API_RESPONSE);
+ (HttpLogic.values.http.get as jest.Mock).mockReturnValueOnce(promise);
+ mount({ enginesPage: 10 });
+ jest.spyOn(EnginesLogic.actions, 'onEnginesLoad');
+
+ EnginesLogic.actions.loadEngines();
+ await promise;
+
+ expect(HttpLogic.values.http.get).toHaveBeenCalledWith('/api/app_search/engines', {
+ query: { type: 'indexed', pageIndex: 10 },
+ });
+ expect(EnginesLogic.actions.onEnginesLoad).toHaveBeenCalledWith({
+ engines: [MOCK_ENGINE],
+ total: 100,
+ });
+ });
+ });
+
+ describe('loadMetaEngines', () => {
+ it('should call the engines API endpoint and set state based on the results', async () => {
+ const promise = Promise.resolve(MOCK_ENGINES_API_RESPONSE);
+ (HttpLogic.values.http.get as jest.Mock).mockReturnValueOnce(promise);
+ mount({ metaEnginesPage: 99 });
+ jest.spyOn(EnginesLogic.actions, 'onMetaEnginesLoad');
+
+ EnginesLogic.actions.loadMetaEngines();
+ await promise;
+
+ expect(HttpLogic.values.http.get).toHaveBeenCalledWith('/api/app_search/engines', {
+ query: { type: 'meta', pageIndex: 99 },
+ });
+ expect(EnginesLogic.actions.onMetaEnginesLoad).toHaveBeenCalledWith({
+ engines: [MOCK_ENGINE],
+ total: 100,
+ });
+ });
+ });
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts
new file mode 100644
index 0000000000000..097b759cf1505
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts
@@ -0,0 +1,116 @@
+/*
+ * 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 { kea, MakeLogicType } from 'kea';
+
+import { HttpLogic } from '../../../shared/http';
+
+import { EngineDetails } from '../engine/types';
+
+interface EnginesValues {
+ dataLoading: boolean;
+ engines: EngineDetails[];
+ enginesTotal: number;
+ enginesPage: number;
+ metaEngines: EngineDetails[];
+ metaEnginesTotal: number;
+ metaEnginesPage: number;
+}
+
+interface OnEnginesLoad {
+ engines: EngineDetails[];
+ total: number;
+}
+interface EnginesActions {
+ onEnginesLoad({ engines, total }: OnEnginesLoad): OnEnginesLoad;
+ onMetaEnginesLoad({ engines, total }: OnEnginesLoad): OnEnginesLoad;
+ onEnginesPagination(page: number): { page: number };
+ onMetaEnginesPagination(page: number): { page: number };
+ loadEngines(): void;
+ loadMetaEngines(): void;
+}
+
+export const EnginesLogic = kea>({
+ path: ['enterprise_search', 'app_search', 'engines_logic'],
+ actions: {
+ onEnginesLoad: ({ engines, total }) => ({ engines, total }),
+ onMetaEnginesLoad: ({ engines, total }) => ({ engines, total }),
+ onEnginesPagination: (page) => ({ page }),
+ onMetaEnginesPagination: (page) => ({ page }),
+ loadEngines: true,
+ loadMetaEngines: true,
+ },
+ reducers: {
+ dataLoading: [
+ true,
+ {
+ onEnginesLoad: () => false,
+ },
+ ],
+ engines: [
+ [],
+ {
+ onEnginesLoad: (_, { engines }) => engines,
+ },
+ ],
+ enginesTotal: [
+ 0,
+ {
+ onEnginesLoad: (_, { total }) => total,
+ },
+ ],
+ enginesPage: [
+ 1,
+ {
+ onEnginesPagination: (_, { page }) => page,
+ },
+ ],
+ metaEngines: [
+ [],
+ {
+ onMetaEnginesLoad: (_, { engines }) => engines,
+ },
+ ],
+ metaEnginesTotal: [
+ 0,
+ {
+ onMetaEnginesLoad: (_, { total }) => total,
+ },
+ ],
+ metaEnginesPage: [
+ 1,
+ {
+ onMetaEnginesPagination: (_, { page }) => page,
+ },
+ ],
+ },
+ listeners: ({ actions, values }) => ({
+ loadEngines: async () => {
+ const { http } = HttpLogic.values;
+ const { enginesPage } = values;
+
+ const response = await http.get('/api/app_search/engines', {
+ query: { type: 'indexed', pageIndex: enginesPage },
+ });
+ actions.onEnginesLoad({
+ engines: response.results,
+ total: response.meta.page.total_results,
+ });
+ },
+ loadMetaEngines: async () => {
+ const { http } = HttpLogic.values;
+ const { metaEnginesPage } = values;
+
+ const response = await http.get('/api/app_search/engines', {
+ query: { type: 'meta', pageIndex: metaEnginesPage },
+ });
+ actions.onMetaEnginesLoad({
+ engines: response.results,
+ total: response.meta.page.total_results,
+ });
+ },
+ }),
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx
index 61f783a8b6c2e..2cedec3c670b5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx
@@ -4,14 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import '../../../__mocks__/kea.mock';
-import '../../../__mocks__/react_router_history.mock';
+import '../../../__mocks__/shallow_useeffect.mock';
+import { rerender } from '../../../__mocks__';
+import { setMockValues, setMockActions } from '../../../__mocks__/kea.mock';
import React from 'react';
-import { act } from 'react-dom/test-utils';
-import { shallow, ReactWrapper } from 'enzyme';
-
-import { mountAsync, mockHttpValues, setMockValues } from '../../../__mocks__';
+import { shallow, ShallowWrapper } from 'enzyme';
import { LoadingState, EmptyState } from './components';
import { EnginesTable } from './engines_table';
@@ -19,91 +17,85 @@ import { EnginesTable } from './engines_table';
import { EnginesOverview } from './';
describe('EnginesOverview', () => {
+ const values = {
+ hasPlatinumLicense: false,
+ dataLoading: false,
+ engines: [],
+ enginesTotal: 0,
+ enginesPage: 1,
+ metaEngines: [],
+ metaEnginesTotal: 0,
+ metaEnginesPage: 1,
+ };
+ const actions = {
+ loadEngines: jest.fn(),
+ loadMetaEngines: jest.fn(),
+ onEnginesPagination: jest.fn(),
+ onMetaEnginesPagination: jest.fn(),
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ setMockValues(values);
+ setMockActions(actions);
+ });
+
describe('non-happy-path states', () => {
it('isLoading', () => {
+ setMockValues({ ...values, dataLoading: true });
const wrapper = shallow( );
expect(wrapper.find(LoadingState)).toHaveLength(1);
});
- it('isEmpty', async () => {
- setMockValues({
- http: {
- ...mockHttpValues.http,
- get: () => ({
- results: [],
- meta: { page: { total_results: 0 } },
- }),
- },
- });
- const wrapper = await mountAsync( , { i18n: true });
+ it('isEmpty', () => {
+ setMockValues({ ...values, engines: [] });
+ const wrapper = shallow( );
expect(wrapper.find(EmptyState)).toHaveLength(1);
});
});
describe('happy-path states', () => {
- const mockedApiResponse = {
- results: [
- {
- name: 'hello-world',
- created_at: 'Fri, 1 Jan 1970 12:00:00 +0000',
- document_count: 50,
- field_count: 10,
- },
- ],
- meta: {
- page: {
- current: 1,
- total_pages: 10,
- total_results: 100,
- size: 10,
- },
- },
+ const valuesWithEngines = {
+ ...values,
+ dataLoading: false,
+ engines: ['dummy-engine'],
+ enginesTotal: 100,
+ enginesPage: 1,
};
- const mockApi = jest.fn(() => mockedApiResponse);
beforeEach(() => {
- jest.clearAllMocks();
- setMockValues({ http: { ...mockHttpValues.http, get: mockApi } });
+ setMockValues(valuesWithEngines);
});
it('renders and calls the engines API', async () => {
- const wrapper = await mountAsync( , { i18n: true });
+ const wrapper = shallow( );
expect(wrapper.find(EnginesTable)).toHaveLength(1);
- expect(mockApi).toHaveBeenNthCalledWith(1, '/api/app_search/engines', {
- query: {
- type: 'indexed',
- pageIndex: 1,
- },
- });
+ expect(actions.loadEngines).toHaveBeenCalled();
});
describe('when on a platinum license', () => {
it('renders a 2nd meta engines table & makes a 2nd meta engines API call', async () => {
setMockValues({
+ ...valuesWithEngines,
hasPlatinumLicense: true,
- http: { ...mockHttpValues.http, get: mockApi },
+ metaEngines: ['dummy-meta-engine'],
});
- const wrapper = await mountAsync( , { i18n: true });
+ const wrapper = shallow( );
expect(wrapper.find(EnginesTable)).toHaveLength(2);
- expect(mockApi).toHaveBeenNthCalledWith(2, '/api/app_search/engines', {
- query: {
- type: 'meta',
- pageIndex: 1,
- },
- });
+ expect(actions.loadMetaEngines).toHaveBeenCalled();
});
});
describe('pagination', () => {
- const getTablePagination = (wrapper: ReactWrapper) =>
+ const getTablePagination = (wrapper: ShallowWrapper) =>
wrapper.find(EnginesTable).prop('pagination');
it('passes down page data from the API', async () => {
- const wrapper = await mountAsync( , { i18n: true });
+ const wrapper = shallow( );
const pagination = getTablePagination(wrapper);
expect(pagination.totalEngines).toEqual(100);
@@ -111,17 +103,13 @@ describe('EnginesOverview', () => {
});
it('re-polls the API on page change', async () => {
- const wrapper = await mountAsync( , { i18n: true });
- await act(async () => getTablePagination(wrapper).onPaginate(5));
- wrapper.update();
-
- expect(mockApi).toHaveBeenLastCalledWith('/api/app_search/engines', {
- query: {
- type: 'indexed',
- pageIndex: 5,
- },
- });
- expect(getTablePagination(wrapper).pageIndex).toEqual(4);
+ const wrapper = shallow( );
+
+ setMockValues({ ...valuesWithEngines, enginesPage: 51 });
+ rerender(wrapper);
+
+ expect(actions.loadEngines).toHaveBeenCalledTimes(2);
+ expect(getTablePagination(wrapper).pageIndex).toEqual(50);
});
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx
index 0381c3806fec7..8a24ee746ed14 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React, { useEffect, useState } from 'react';
-import { useValues } from 'kea';
+import React, { useEffect } from 'react';
+import { useValues, useActions } from 'kea';
import {
EuiPageContent,
EuiPageContentHeader,
@@ -17,7 +17,6 @@ import {
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import { FlashMessages } from '../../../shared/flash_messages';
-import { HttpLogic } from '../../../shared/http';
import { LicensingLogic } from '../../../shared/licensing';
import { EngineIcon } from './assets/engine_icon';
@@ -25,61 +24,34 @@ import { MetaEngineIcon } from './assets/meta_engine_icon';
import { ENGINES_TITLE, META_ENGINES_TITLE } from './constants';
import { EnginesOverviewHeader, LoadingState, EmptyState } from './components';
import { EnginesTable } from './engines_table';
+import { EnginesLogic } from './engines_logic';
import './engines_overview.scss';
-interface GetEnginesParams {
- type: string;
- pageIndex: number;
-}
-interface SetEnginesCallbacks {
- setResults: React.Dispatch>;
- setResultsTotal: React.Dispatch>;
-}
-
export const EnginesOverview: React.FC = () => {
- const { http } = useValues(HttpLogic);
const { hasPlatinumLicense } = useValues(LicensingLogic);
-
- const [isLoading, setIsLoading] = useState(true);
- const [engines, setEngines] = useState([]);
- const [enginesPage, setEnginesPage] = useState(1);
- const [enginesTotal, setEnginesTotal] = useState(0);
- const [metaEngines, setMetaEngines] = useState([]);
- const [metaEnginesPage, setMetaEnginesPage] = useState(1);
- const [metaEnginesTotal, setMetaEnginesTotal] = useState(0);
-
- const getEnginesData = async ({ type, pageIndex }: GetEnginesParams) => {
- return await http.get('/api/app_search/engines', {
- query: { type, pageIndex },
- });
- };
- const setEnginesData = async (params: GetEnginesParams, callbacks: SetEnginesCallbacks) => {
- const response = await getEnginesData(params);
-
- callbacks.setResults(response.results);
- callbacks.setResultsTotal(response.meta.page.total_results);
-
- setIsLoading(false);
- };
+ const {
+ dataLoading,
+ engines,
+ enginesTotal,
+ enginesPage,
+ metaEngines,
+ metaEnginesTotal,
+ metaEnginesPage,
+ } = useValues(EnginesLogic);
+ const { loadEngines, loadMetaEngines, onEnginesPagination, onMetaEnginesPagination } = useActions(
+ EnginesLogic
+ );
useEffect(() => {
- const params = { type: 'indexed', pageIndex: enginesPage };
- const callbacks = { setResults: setEngines, setResultsTotal: setEnginesTotal };
-
- setEnginesData(params, callbacks);
+ loadEngines();
}, [enginesPage]);
useEffect(() => {
- if (hasPlatinumLicense) {
- const params = { type: 'meta', pageIndex: metaEnginesPage };
- const callbacks = { setResults: setMetaEngines, setResultsTotal: setMetaEnginesTotal };
-
- setEnginesData(params, callbacks);
- }
+ if (hasPlatinumLicense) loadMetaEngines();
}, [hasPlatinumLicense, metaEnginesPage]);
- if (isLoading) return ;
+ if (dataLoading) return ;
if (!engines.length) return ;
return (
@@ -103,7 +75,7 @@ export const EnginesOverview: React.FC = () => {
pagination={{
totalEngines: enginesTotal,
pageIndex: enginesPage - 1,
- onPaginate: setEnginesPage,
+ onPaginate: onEnginesPagination,
}}
/>
@@ -124,7 +96,7 @@ export const EnginesOverview: React.FC = () => {
pagination={{
totalEngines: metaEnginesTotal,
pageIndex: metaEnginesPage - 1,
- onPaginate: setMetaEnginesPage,
+ onPaginate: onMetaEnginesPagination,
}}
/>
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx
index ea7eeea750cc4..1dde4db15a425 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx
@@ -12,6 +12,7 @@ import React from 'react';
import { EuiBasicTable, EuiPagination, EuiButtonEmpty } from '@elastic/eui';
import { EuiLinkTo } from '../../../shared/react_router_helpers';
+import { EngineDetails } from '../engine/types';
import { EnginesTable } from './engines_table';
describe('EnginesTable', () => {
@@ -25,7 +26,7 @@ describe('EnginesTable', () => {
isMeta: false,
document_count: 99999,
field_count: 10,
- },
+ } as EngineDetails,
];
const pagination = {
totalEngines: 50,
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx
index e9805ab8f2711..e8944c37efa47 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx
@@ -16,22 +16,15 @@ import { getEngineRoute } from '../../routes';
import { ENGINES_PAGE_SIZE } from '../../../../../common/constants';
import { UNIVERSAL_LANGUAGE } from '../../constants';
+import { EngineDetails } from '../engine/types';
-interface EnginesTableData {
- name: string;
- created_at: string;
- document_count: number;
- field_count: number;
- language: string | null;
- isMeta: boolean;
-}
interface EnginesTablePagination {
totalEngines: number;
pageIndex: number;
onPaginate(pageIndex: number): void;
}
interface EnginesTableProps {
- data: EnginesTableData[];
+ data: EngineDetails[];
pagination: EnginesTablePagination;
}
interface OnChange {
@@ -55,7 +48,7 @@ export const EnginesTable: React.FC = ({
}),
});
- const columns: Array> = [
+ const columns: Array> = [
{
field: 'name',
name: i18n.translate('xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name', {
@@ -100,7 +93,7 @@ export const EnginesTable: React.FC = ({
}
),
dataType: 'string',
- render: (language: string, engine: EnginesTableData) =>
+ render: (language: string, engine: EngineDetails) =>
engine.isMeta ? '' : language || UNIVERSAL_LANGUAGE,
},
{
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts
index 76ca9239a3c7e..e26a813553b83 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts
@@ -4,5 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
+export { EnginesLogic } from './engines_logic';
export { EnginesOverview } from './engines_overview';
export { ENGINES_TITLE, META_ENGINES_TITLE } from './constants';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts
new file mode 100644
index 0000000000000..0e007f5d8d1d1
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts
@@ -0,0 +1,9 @@
+/*
+ * 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 { LogRetentionLogic } from './log_retention_logic';
+export * from './types';
+export * from './messaging';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts
similarity index 97%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts
index 8310e2abe045b..801a8d36cc403 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts
@@ -4,18 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { LogicMounter } from '../../../../__mocks__/kea.mock';
+import { LogicMounter } from '../../../__mocks__/kea.mock';
-import { mockHttpValues } from '../../../../__mocks__';
-jest.mock('../../../../shared/http', () => ({
+import { mockHttpValues } from '../../../__mocks__';
+jest.mock('../../../shared/http', () => ({
HttpLogic: { values: mockHttpValues },
}));
const { http } = mockHttpValues;
-jest.mock('../../../../shared/flash_messages', () => ({
+jest.mock('../../../shared/flash_messages', () => ({
flashAPIErrors: jest.fn(),
}));
-import { flashAPIErrors } from '../../../../shared/flash_messages';
+import { flashAPIErrors } from '../../../shared/flash_messages';
import { LogRetentionOptions } from './types';
import { LogRetentionLogic } from './log_retention_logic';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts
similarity index 96%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts
index 31fc41213492d..46c91e5c3c45a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts
@@ -6,9 +6,10 @@
import { kea, MakeLogicType } from 'kea';
+import { HttpLogic } from '../../../shared/http';
+import { flashAPIErrors } from '../../../shared/flash_messages';
+
import { LogRetentionOptions, LogRetention, LogRetentionServer } from './types';
-import { HttpLogic } from '../../../../shared/http';
-import { flashAPIErrors } from '../../../../shared/flash_messages';
import { convertLogRetentionFromServerToClient } from './utils/convert_log_retention';
interface LogRetentionActions {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/constants.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.test.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.test.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.test.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx
similarity index 95%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx
index b65ffc04ad700..13692bb3e415d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import '../../../../../__mocks__/kea.mock';
-import { setMockValues } from '../../../../../__mocks__';
+import '../../../../__mocks__/kea.mock';
+import { setMockValues } from '../../../../__mocks__';
import React from 'react';
import { shallow } from 'enzyme';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx
similarity index 96%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx
index 21267738f61ad..3b0761950ee3d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx
@@ -9,7 +9,7 @@ import React from 'react';
import { useValues } from 'kea';
import moment from 'moment';
-import { AppLogic } from '../../../../app_logic';
+import { AppLogic } from '../../../app_logic';
import { LogRetentionLogic } from '../log_retention_logic';
import { LogRetentionOptions } from '../types';
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/types.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/types.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/types.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/types.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts
similarity index 99%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts
index b49b2afe50831..88090dbb5ea1f 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts
@@ -3,6 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+
import { convertLogRetentionFromServerToClient } from './convert_log_retention';
describe('convertLogRetentionFromServerToClient', () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts
similarity index 100%
rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.ts
rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx
index 6d802b0c5cfaf..5b2e439436b55 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx
@@ -55,7 +55,7 @@ export const GenericConfirmationModal: React.FC =
{subheading}
- {description}
+ {description}
', () => {
const actions = {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx
index 67421bb78fa71..25f90df4e541b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx
@@ -10,10 +10,8 @@ import { i18n } from '@kbn/i18n';
import { EuiTextColor, EuiOverlayMask } from '@elastic/eui';
import { useActions, useValues } from 'kea';
+import { LogRetentionLogic, LogRetentionOptions } from '../../log_retention';
import { GenericConfirmationModal } from './generic_confirmation_modal';
-import { LogRetentionLogic } from './log_retention_logic';
-
-import { LogRetentionOptions } from './types';
export const LogRetentionConfirmationModal: React.FC = () => {
const CANNOT_BE_RECOVERED_TEXT = i18n.translate(
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx
index c44418a1eb5a2..9140704ece3f8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx
@@ -12,8 +12,8 @@ import { setMockActions, setMockValues } from '../../../../__mocks__';
import React from 'react';
import { shallow } from 'enzyme';
+import { LogRetention } from '../../log_retention/types';
import { LogRetentionPanel } from './log_retention_panel';
-import { LogRetention } from './types';
describe(' ', () => {
const actions = {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx
index 3297f0df4d7bd..a3aa463ad069a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx
@@ -12,9 +12,12 @@ import { useActions, useValues } from 'kea';
import { DOCS_PREFIX } from '../../../routes';
-import { LogRetentionLogic } from './log_retention_logic';
-import { AnalyticsLogRetentionMessage, ApiLogRetentionMessage } from './messaging';
-import { LogRetentionOptions } from './types';
+import {
+ LogRetentionLogic,
+ LogRetentionOptions,
+ AnalyticsLogRetentionMessage,
+ ApiLogRetentionMessage,
+} from '../../log_retention';
export const LogRetentionPanel: React.FC = () => {
const { toggleLogRetention, fetchLogRetention } = useActions(LogRetentionLogic);
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx
index dbd6627a3b9ce..993da9e563185 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx
@@ -16,9 +16,8 @@ import {
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { FlashMessages } from '../../../shared/flash_messages';
-import { LogRetentionPanel } from './log_retention/log_retention_panel';
-import { LogRetentionConfirmationModal } from './log_retention/log_retention_confirmation_modal';
+import { LogRetentionPanel, LogRetentionConfirmationModal } from './log_retention';
import { SETTINGS_TITLE } from './';
export const Settings: React.FC = () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
index ca2ce177617b8..e8c6948438fe0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
@@ -25,7 +25,12 @@ export const SAMPLE_ENGINE_PATH = '/engines/national-parks-demo';
export const getEngineRoute = (engineName: string) => generatePath(ENGINE_PATH, { engineName });
export const ENGINE_ANALYTICS_PATH = '/analytics';
-// TODO: Analytics sub-pages
+export const ENGINE_ANALYTICS_TOP_QUERIES_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries`;
+export const ENGINE_ANALYTICS_TOP_QUERIES_NO_CLICKS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_no_clicks`;
+export const ENGINE_ANALYTICS_TOP_QUERIES_NO_RESULTS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_no_results`;
+export const ENGINE_ANALYTICS_TOP_QUERIES_WITH_CLICKS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_with_clicks`;
+export const ENGINE_ANALYTICS_RECENT_QUERIES_PATH = `${ENGINE_ANALYTICS_PATH}/recent_queries`;
+export const ENGINE_ANALYTICS_QUERY_DETAIL_PATH = `${ENGINE_ANALYTICS_PATH}/query_detail/:query`;
export const ENGINE_DOCUMENTS_PATH = '/documents';
export const ENGINE_DOCUMENT_DETAIL_PATH = `${ENGINE_DOCUMENTS_PATH}/:documentId`;
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx
index 62c0af31cffd9..083173c8e7a4c 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx
@@ -13,6 +13,7 @@ import { shallow } from 'enzyme';
import { EuiButton as EuiButtonExternal, EuiEmptyPrompt } from '@elastic/eui';
import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../../../../common/constants';
+import { SetAppSearchChrome } from '../kibana_chrome';
import { AppSearchLogo } from './assets/app_search_logo';
import { WorkplaceSearchLogo } from './assets/workplace_search_logo';
@@ -51,6 +52,14 @@ describe('NotFound', () => {
expect(prompt.find(EuiButtonExternal).prop('href')).toEqual('https://support.elastic.co');
});
+ it('passes down optional custom breadcrumbs', () => {
+ const wrapper = shallow(
+
+ );
+
+ expect(wrapper.find(SetAppSearchChrome).prop('trail')).toEqual(['Hello', 'World']);
+ });
+
it('does not render anything without a valid product', () => {
const wrapper = shallow( );
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx
index d0140b8730229..5c76b5dae1e43 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx
@@ -23,6 +23,7 @@ import {
} from '../../../../common/constants';
import { EuiButtonTo } from '../react_router_helpers';
+import { BreadcrumbTrail } from '../kibana_chrome/generate_breadcrumbs';
import { SetAppSearchChrome, SetWorkplaceSearchChrome } from '../kibana_chrome';
import { SendAppSearchTelemetry, SendWorkplaceSearchTelemetry } from '../telemetry';
import { LicensingLogic } from '../licensing';
@@ -37,9 +38,11 @@ interface NotFoundProps {
ID: string;
SUPPORT_URL: string;
};
+ // Optional breadcrumbs
+ breadcrumbs?: BreadcrumbTrail;
}
-export const NotFound: React.FC = ({ product = {} }) => {
+export const NotFound: React.FC = ({ product = {}, breadcrumbs }) => {
const { hasGoldLicense } = useValues(LicensingLogic);
const supportUrl = hasGoldLicense ? LICENSED_SUPPORT_URL : product.SUPPORT_URL;
@@ -64,7 +67,7 @@ export const NotFound: React.FC = ({ product = {} }) => {
return (
<>
-
+
diff --git a/x-pack/plugins/fleet/common/services/agent_status.ts b/x-pack/plugins/fleet/common/services/agent_status.ts
index 30b52bcb28748..4cf35398bab24 100644
--- a/x-pack/plugins/fleet/common/services/agent_status.ts
+++ b/x-pack/plugins/fleet/common/services/agent_status.ts
@@ -49,7 +49,7 @@ export function buildKueryForUnenrollingAgents() {
}
export function buildKueryForOnlineAgents() {
- return `not (${buildKueryForOfflineAgents()}) AND not (${buildKueryForErrorAgents()}) AND not (${buildKueryForEnrollingAgents()}) AND not (${buildKueryForUnenrollingAgents()})`;
+ return `not (${buildKueryForOfflineAgents()}) AND not (${buildKueryForErrorAgents()}) AND not (${buildKueryForUpdatingAgents()})`;
}
export function buildKueryForErrorAgents() {
@@ -59,11 +59,11 @@ export function buildKueryForErrorAgents() {
export function buildKueryForOfflineAgents() {
return `${AGENT_SAVED_OBJECT_TYPE}.last_checkin < now-${
(4 * AGENT_POLLING_THRESHOLD_MS) / 1000
- }s AND not (${buildKueryForErrorAgents()})`;
+ }s AND not (${buildKueryForErrorAgents()}) AND not ( ${buildKueryForUpdatingAgents()} )`;
}
export function buildKueryForUpgradingAgents() {
- return `${AGENT_SAVED_OBJECT_TYPE}.upgrade_started_at:*`;
+ return `(${AGENT_SAVED_OBJECT_TYPE}.upgrade_started_at:*) and not (${AGENT_SAVED_OBJECT_TYPE}.upgraded_at:*)`;
}
export function buildKueryForUpdatingAgents() {
diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts
index 36972270de011..3523c73ee64e1 100644
--- a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts
+++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts
@@ -27,6 +27,14 @@ describe('Fleet - packageToPackagePolicy', () => {
index_pattern: [],
map: [],
},
+ elasticsearch: {
+ ingest_pipeline: [],
+ component_template: [],
+ index_template: [],
+ transform: [],
+ ilm_policy: [],
+ data_stream_ilm_policy: [],
+ },
},
status: 'not_installed',
release: 'experimental',
diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts
index 08f92f406b90f..6724863557411 100644
--- a/x-pack/plugins/fleet/common/types/models/epm.ts
+++ b/x-pack/plugins/fleet/common/types/models/epm.ts
@@ -187,8 +187,8 @@ export type AssetTypeToParts = KibanaAssetTypeToParts & ElasticsearchAssetTypeTo
export type AssetsGroupedByServiceByType = Record<
Extract,
KibanaAssetTypeToParts
->;
-// & Record, ElasticsearchAssetTypeToParts>;
+> &
+ Record, ElasticsearchAssetTypeToParts>;
export type KibanaAssetParts = AssetParts & {
service: Extract;
diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts
index 236fc586bf528..f758ca0921a08 100644
--- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts
+++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts
@@ -219,5 +219,6 @@ export interface GetAgentStatusResponse {
error: number;
offline: number;
other: number;
+ updating: number;
};
}
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx
index 95c630e3b3686..7326d2efb8565 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx
@@ -15,6 +15,8 @@ import {
EuiFilterGroup,
EuiPanel,
EuiButtonEmpty,
+ EuiCallOut,
+ EuiLink,
} from '@elastic/eui';
import useMeasure from 'react-use/lib/useMeasure';
import { FormattedMessage } from '@kbn/i18n/react';
@@ -184,7 +186,7 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen
const [logsPanelRef, { height: logPanelHeight }] = useMeasure();
const agentVersion = agent.local_metadata?.elastic?.agent?.version;
- const isLogLevelSelectionAvailable = useMemo(() => {
+ const isLogFeatureAvailable = useMemo(() => {
if (!agentVersion) {
return false;
}
@@ -195,6 +197,31 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen
return semverGte(agentVersionWithPrerelease, '7.11.0');
}, [agentVersion]);
+ if (!isLogFeatureAvailable) {
+ return (
+
+
+
+ ),
+ }}
+ />
+ }
+ />
+ );
+ }
+
return (
@@ -271,11 +298,9 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen
/>
- {isLogLevelSelectionAvailable && (
-
-
-
- )}
+
+
+
);
});
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx
index 2067a2bd91c58..fb7dc78e85770 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx
@@ -47,7 +47,7 @@ import { AgentTableHeader } from './components/table_header';
import { SelectionMode } from './components/bulk_actions';
import { SearchAndFilterBar } from './components/search_and_filter_bar';
-const REFRESH_INTERVAL_MS = 10000;
+const REFRESH_INTERVAL_MS = 30000;
const RowActions = React.memo<{
agent: Agent;
@@ -282,7 +282,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
healthy: agentsStatusRequest.data.results.online,
unhealthy: agentsStatusRequest.data.results.error,
offline: agentsStatusRequest.data.results.offline,
- updating: agentsStatusRequest.data.results.other,
+ updating: agentsStatusRequest.data.results.updating,
inactive: agentsRequest.data.totalInactive,
});
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx
index 45fd380a06f34..a87dd0c6d35eb 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx
@@ -37,7 +37,7 @@ export const ConfirmEnrollmentTokenDelete = (props: Props) => {
= {
data_stream_ilm_policy: 'Data Stream ILM Policy',
};
-export const ServiceTitleMap: Record, string> = {
+export const ServiceTitleMap: Record = {
kibana: 'Kibana',
+ elasticsearch: 'Elasticsearch',
};
export const AssetIcons: Record = {
diff --git a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts
index f42f5da2695d0..4820f25c05f96 100644
--- a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts
+++ b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts
@@ -9,7 +9,7 @@ import { GetDataStreamsResponse, KibanaAssetType, KibanaSavedObjectType } from '
import { getPackageSavedObjects, getKibanaSavedObject } from '../../services/epm/packages/get';
import { defaultIngestErrorHandler } from '../../errors';
-const DATA_STREAM_INDEX_PATTERN = 'logs-*-*,metrics-*-*';
+const DATA_STREAM_INDEX_PATTERN = 'logs-*-*,metrics-*-*,traces-*-*';
export const getListHandler: RequestHandler = async (context, request, response) => {
const callCluster = context.core.elasticsearch.legacy.client.callAsCurrentUser;
diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts
index 0dfa6db7df9be..74faedc8e2931 100644
--- a/x-pack/plugins/fleet/server/services/agents/status.ts
+++ b/x-pack/plugins/fleet/server/services/agents/status.ts
@@ -5,6 +5,7 @@
*/
import { SavedObjectsClientContract } from 'src/core/server';
+import pMap from 'p-map';
import { getAgent, listAgents } from './crud';
import { AGENT_EVENT_SAVED_OBJECT_TYPE, AGENT_SAVED_OBJECT_TYPE } from '../../constants';
import { AgentStatus } from '../../types';
@@ -21,18 +22,32 @@ export async function getAgentStatusById(
export const getAgentStatus = AgentStatusKueryHelper.getAgentStatus;
+function joinKuerys(...kuerys: Array) {
+ return kuerys
+ .filter((kuery) => kuery !== undefined)
+ .reduce((acc, kuery) => {
+ if (acc === '') {
+ return `(${kuery})`;
+ }
+
+ return `${acc} and (${kuery})`;
+ }, '');
+}
+
export async function getAgentStatusForAgentPolicy(
soClient: SavedObjectsClientContract,
agentPolicyId?: string,
filterKuery?: string
) {
- const [all, online, error, offline] = await Promise.all(
+ const [all, online, error, offline, updating] = await pMap(
[
undefined,
AgentStatusKueryHelper.buildKueryForOnlineAgents(),
AgentStatusKueryHelper.buildKueryForErrorAgents(),
AgentStatusKueryHelper.buildKueryForOfflineAgents(),
- ].map((kuery) =>
+ AgentStatusKueryHelper.buildKueryForUpdatingAgents(),
+ ],
+ (kuery) =>
listAgents(soClient, {
showInactive: false,
perPage: 0,
@@ -44,28 +59,19 @@ export async function getAgentStatusForAgentPolicy(
agentPolicyId ? `${AGENT_SAVED_OBJECT_TYPE}.policy_id:"${agentPolicyId}"` : undefined,
]
),
- })
- )
+ }),
+ {
+ concurrency: 1,
+ }
);
- function joinKuerys(...kuerys: Array) {
- return kuerys
- .filter((kuery) => kuery !== undefined)
- .reduce((acc, kuery) => {
- if (acc === '') {
- return `(${kuery})`;
- }
-
- return `${acc} and (${kuery})`;
- }, '');
- }
-
return {
events: await getEventsCount(soClient, agentPolicyId),
total: all.total,
online: online.total,
error: error.total,
offline: offline.total,
+ updating: updating.total,
other: all.total - online.total - error.total - offline.total,
};
}
diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts
index dc4f02c94acde..61bbb4cddd085 100644
--- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts
+++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts
@@ -208,7 +208,10 @@ export function groupPathsByService(paths: string[]): AssetsGroupedByServiceByTy
// ASK: best way, if any, to avoid `any`?
const assets = paths.reduce((map: any, path) => {
const parts = getPathParts(path.replace(/^\/package\//, ''));
- if (parts.service === 'kibana' && kibanaAssetTypes.includes(parts.type)) {
+ if (
+ (parts.service === 'kibana' && kibanaAssetTypes.includes(parts.type)) ||
+ parts.service === 'elasticsearch'
+ ) {
if (!map[parts.service]) map[parts.service] = {};
if (!map[parts.service][parts.type]) map[parts.service][parts.type] = [];
map[parts.service][parts.type].push(parts);
@@ -219,6 +222,6 @@ export function groupPathsByService(paths: string[]): AssetsGroupedByServiceByTy
return {
kibana: assets.kibana,
- // elasticsearch: assets.elasticsearch,
+ elasticsearch: assets.elasticsearch,
};
}
diff --git a/x-pack/plugins/global_search_providers/tsconfig.json b/x-pack/plugins/global_search_providers/tsconfig.json
new file mode 100644
index 0000000000000..381d314b2e530
--- /dev/null
+++ b/x-pack/plugins/global_search_providers/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "composite": true,
+ "outDir": "./target/types",
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "declarationMap": true
+ },
+ "include": [
+ "public/**/*",
+ "server/**/*",
+ "../../typings/**/*",
+ ],
+ "references": [
+ { "path": "../../../src/core/tsconfig.json" },
+ { "path": "../global_search/tsconfig.json" }
+ ]
+}
diff --git a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts
index fc5f369e588f1..1cf84c70ff907 100644
--- a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts
+++ b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts
@@ -43,7 +43,7 @@ async function addLinkedIndices(client: ElasticsearchClient, policiesMap: Polici
const response = await client.ilm.explainLifecycle<{
indices: { [indexName: string]: IndexLifecyclePolicy };
- }>({ index: '*' }, options);
+ }>({ index: '*,.*' }, options); // '*,.*' will include hidden indices
const policyExplanation = response.body;
Object.entries(policyExplanation.indices).forEach(([indexName, { policy }]) => {
if (policy && policiesMap[policy]) {
diff --git a/x-pack/plugins/index_management/kibana.json b/x-pack/plugins/index_management/kibana.json
index af3d61c8808ef..5dcff0ba942e1 100644
--- a/x-pack/plugins/index_management/kibana.json
+++ b/x-pack/plugins/index_management/kibana.json
@@ -9,6 +9,6 @@
"requiredBundles": [
"kibanaReact",
"esUiShared",
- "runtimeFieldEditor"
+ "runtimeFields"
]
}
diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts
index 652925a977fa0..36f7fecbcff21 100644
--- a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts
+++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts
@@ -58,7 +58,7 @@ export {
RuntimeField,
RuntimeFieldEditorFlyoutContent,
RuntimeFieldEditorFlyoutContentProps,
-} from '../../../../../runtime_field_editor/public';
+} from '../../../../../runtime_fields/public';
export { createKibanaReactContext } from '../../../../../../../src/plugins/kibana_react/public';
diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx
index 1144a1043c5b1..fd62b8ca962ab 100644
--- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx
+++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx
@@ -220,6 +220,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
'data-test-subj': `lns-indexPatternDimension-${operationType}${
compatibleWithCurrentField ? '' : ' incompatible'
}`,
+ [`aria-pressed`]: isActive,
onClick() {
if (
operationDefinitionMap[operationType].input === 'none' ||
diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx
index 625084000fa93..fae086506f015 100644
--- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx
+++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx
@@ -259,7 +259,7 @@ export const termsOperation: OperationDefinition {
- setPopoverOpen(true);
+ setPopoverOpen(!popoverOpen);
}}
>
{i18n.translate('xpack.lens.indexPattern.terms.advancedSettings', {
diff --git a/x-pack/plugins/lens/public/persistence/filter_references.test.ts b/x-pack/plugins/lens/public/persistence/filter_references.test.ts
index 23c0cd1d11f1b..02b99c1b63ee5 100644
--- a/x-pack/plugins/lens/public/persistence/filter_references.test.ts
+++ b/x-pack/plugins/lens/public/persistence/filter_references.test.ts
@@ -56,6 +56,18 @@ describe('filter saved object references', () => {
`);
});
+ it('should remove index and value from persistable filter', () => {
+ const { persistableFilters } = extractFilterReferences([
+ { ...filters[0], meta: { ...filters[0].meta, value: 'CN' } },
+ { ...filters[1], meta: { ...filters[1].meta, value: 'US' } },
+ ]);
+ expect(persistableFilters.length).toBe(2);
+ persistableFilters.forEach((filter) => {
+ expect(filter.meta.hasOwnProperty('index')).toBe(false);
+ expect(filter.meta.hasOwnProperty('value')).toBe(false);
+ });
+ });
+
it('should restore the same filter after extracting and injecting', () => {
const { persistableFilters, references } = extractFilterReferences(filters);
expect(injectFilterReferences(persistableFilters, references)).toEqual(filters);
diff --git a/x-pack/plugins/lens/public/persistence/filter_references.ts b/x-pack/plugins/lens/public/persistence/filter_references.ts
index 47564e510ce9c..0dca0941662c7 100644
--- a/x-pack/plugins/lens/public/persistence/filter_references.ts
+++ b/x-pack/plugins/lens/public/persistence/filter_references.ts
@@ -22,14 +22,18 @@ export function extractFilterReferences(
type: 'index-pattern',
id: filterRow.meta.index,
});
- return {
+ const newFilter = {
...filterRow,
meta: {
...filterRow.meta,
indexRefName: refName,
- index: undefined,
},
};
+ // remove index because it's specified by indexRefName
+ delete newFilter.meta.index;
+ // remove value because it can't be persisted
+ delete newFilter.meta.value;
+ return newFilter;
});
return { persistableFilters, references };
diff --git a/x-pack/plugins/maps/public/api/create_layer_descriptors.ts b/x-pack/plugins/maps/public/api/create_layer_descriptors.ts
index 5d3eca2200ad5..fbe8da55ed702 100644
--- a/x-pack/plugins/maps/public/api/create_layer_descriptors.ts
+++ b/x-pack/plugins/maps/public/api/create_layer_descriptors.ts
@@ -6,6 +6,7 @@
import { LayerDescriptor } from '../../common/descriptor_types';
import { lazyLoadMapModules } from '../lazy_load_bundle';
+import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source';
export const createLayerDescriptors = {
async createSecurityLayerDescriptors(
@@ -19,4 +20,10 @@ export const createLayerDescriptors = {
const mapModules = await lazyLoadMapModules();
return mapModules.createBasemapLayerDescriptor();
},
+ async createESSearchSourceLayerDescriptor(
+ params: CreateLayerDescriptorParams
+ ): Promise {
+ const mapModules = await lazyLoadMapModules();
+ return mapModules.createESSearchSourceLayerDescriptor(params);
+ },
};
diff --git a/x-pack/plugins/maps/public/api/start_api.ts b/x-pack/plugins/maps/public/api/start_api.ts
index 7109ca8ce5c9d..5877520e9227b 100644
--- a/x-pack/plugins/maps/public/api/start_api.ts
+++ b/x-pack/plugins/maps/public/api/start_api.ts
@@ -7,6 +7,7 @@
import { LayerDescriptor } from '../../common/descriptor_types';
import { SourceRegistryEntry } from '../classes/sources/source_registry';
import { LayerWizard } from '../classes/layers/layer_wizard_registry';
+import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source';
export interface MapsStartApi {
createLayerDescriptors: {
@@ -15,6 +16,9 @@ export interface MapsStartApi {
indexPatternTitle: string
) => Promise;
createBasemapLayerDescriptor: () => Promise;
+ createESSearchSourceLayerDescriptor: (
+ params: CreateLayerDescriptorParams
+ ) => Promise;
};
registerLayerWizard(layerWizard: LayerWizard): Promise;
registerSource(entry: SourceRegistryEntry): Promise;
diff --git a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx
index 5d234f5be44af..1321593f015c0 100644
--- a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx
+++ b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx
@@ -6,7 +6,6 @@
import { SCALING_TYPES, SOURCE_TYPES } from '../../../../common/constants';
import { BlendedVectorLayer } from './blended_vector_layer';
-// @ts-expect-error
import { ESSearchSource } from '../../sources/es_search_source';
import { ESGeoGridSourceDescriptor } from '../../../../common/descriptor_types';
diff --git a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx
index 2db12db33ff27..a0029c5c64e0b 100644
--- a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx
+++ b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx
@@ -16,7 +16,6 @@ import {
import { getFileUploadComponent } from '../../../kibana_services';
import { GeojsonFileSource } from '../../sources/geojson_file_source';
import { VectorLayer } from '../../layers/vector_layer/vector_layer';
-// @ts-expect-error
import { createDefaultLayerDescriptor } from '../../sources/es_search_source';
import { RenderWizardArguments } from '../../layers/layer_wizard_registry';
import { FileUploadComponentProps } from '../../../../../file_upload/public';
diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts
new file mode 100644
index 0000000000000..b734186b52c93
--- /dev/null
+++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts
@@ -0,0 +1,51 @@
+/*
+ * 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 { createLayerDescriptor } from './create_layer_descriptor';
+import { ES_GEO_FIELD_TYPE } from '../../../../common/constants';
+
+jest.mock('../../../kibana_services', () => {
+ return {
+ getIsDarkMode() {
+ return false;
+ },
+ };
+});
+jest.mock('../../../licensed_features', () => {
+ return {
+ getIsGoldPlus() {
+ return true;
+ },
+ };
+});
+jest.mock('uuid/v4', () => {
+ return function () {
+ return '12345';
+ };
+});
+
+test('Should create layer descriptor', () => {
+ const layerDescriptor = createLayerDescriptor({
+ indexPatternId: 'myIndexPattern',
+ geoFieldName: 'myGeoField',
+ geoFieldType: ES_GEO_FIELD_TYPE.GEO_POINT,
+ });
+ expect(layerDescriptor.sourceDescriptor).toEqual({
+ applyGlobalQuery: true,
+ applyGlobalTime: true,
+ filterByMapBounds: true,
+ geoField: 'myGeoField',
+ id: '12345',
+ indexPatternId: 'myIndexPattern',
+ scalingType: 'CLUSTERS',
+ sortField: '',
+ sortOrder: 'desc',
+ tooltipProperties: [],
+ topHitsSize: 1,
+ topHitsSplitField: '',
+ type: 'ES_SEARCH',
+ });
+});
diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts
new file mode 100644
index 0000000000000..4d5d14ef3b2a3
--- /dev/null
+++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts
@@ -0,0 +1,40 @@
+/*
+ * 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 { Query } from 'src/plugins/data/public';
+import { LayerDescriptor } from '../../../../common/descriptor_types';
+import { ES_GEO_FIELD_TYPE, SCALING_TYPES } from '../../../../common/constants';
+import { ESSearchSource } from './es_search_source';
+import { VectorLayer } from '../../layers/vector_layer/vector_layer';
+import { getIsGoldPlus } from '../../../licensed_features';
+
+export interface CreateLayerDescriptorParams {
+ indexPatternId: string;
+ geoFieldName: string;
+ geoFieldType: ES_GEO_FIELD_TYPE;
+ query?: Query;
+}
+
+export function createLayerDescriptor({
+ indexPatternId,
+ geoFieldName,
+ geoFieldType,
+ query,
+}: CreateLayerDescriptorParams): LayerDescriptor {
+ // Prefer clusters for geo_shapes if liscensing is enabled.
+ const scalingType =
+ geoFieldType === ES_GEO_FIELD_TYPE.GEO_POINT ||
+ (geoFieldType === ES_GEO_FIELD_TYPE.GEO_SHAPE && getIsGoldPlus())
+ ? SCALING_TYPES.CLUSTERS
+ : SCALING_TYPES.LIMIT;
+ const sourceDescriptor = ESSearchSource.createDescriptor({
+ indexPatternId,
+ geoField: geoFieldName,
+ scalingType,
+ });
+
+ return VectorLayer.createDescriptor({ sourceDescriptor, query });
+}
diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.js b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts
similarity index 80%
rename from x-pack/plugins/maps/public/classes/sources/es_search_source/index.js
rename to x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts
index 6ae327a18b7c2..44e39b7c637d8 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.js
+++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+export { createLayerDescriptor, CreateLayerDescriptorParams } from './create_layer_descriptor';
export { ESSearchSource } from './es_search_source';
export {
createDefaultLayerDescriptor,
diff --git a/x-pack/plugins/maps/public/lazy_load_bundle/index.ts b/x-pack/plugins/maps/public/lazy_load_bundle/index.ts
index ce574713608d7..020c25967f4dc 100644
--- a/x-pack/plugins/maps/public/lazy_load_bundle/index.ts
+++ b/x-pack/plugins/maps/public/lazy_load_bundle/index.ts
@@ -12,6 +12,7 @@ import { LayerDescriptor } from '../../common/descriptor_types';
import { MapEmbeddableConfig, MapEmbeddableInput, MapEmbeddableOutput } from '../embeddable/types';
import { SourceRegistryEntry } from '../classes/sources/source_registry';
import { LayerWizard } from '../classes/layers/layer_wizard_registry';
+import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source';
let loadModulesPromise: Promise;
@@ -71,6 +72,7 @@ interface LazyLoadedMapModules {
metricFieldName?: string;
}) => LayerDescriptor | null;
createBasemapLayerDescriptor: () => LayerDescriptor | null;
+ createESSearchSourceLayerDescriptor: (params: CreateLayerDescriptorParams) => LayerDescriptor;
}
export async function lazyLoadMapModules(): Promise {
@@ -90,6 +92,7 @@ export async function lazyLoadMapModules(): Promise {
createTileMapLayerDescriptor,
createRegionMapLayerDescriptor,
createBasemapLayerDescriptor,
+ createESSearchSourceLayerDescriptor,
} = await import('./lazy');
resolve({
@@ -103,6 +106,7 @@ export async function lazyLoadMapModules(): Promise {
createTileMapLayerDescriptor,
createRegionMapLayerDescriptor,
createBasemapLayerDescriptor,
+ createESSearchSourceLayerDescriptor,
});
});
return loadModulesPromise;
diff --git a/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts b/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts
index 4d816fd2f2c61..4e78db9cbde23 100644
--- a/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts
+++ b/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts
@@ -4,9 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-// These are map-dependencies of the embeddable.
-// By lazy-loading these, the Maps-app can register the embeddable when the plugin mounts, without actually pulling all the code.
-
export * from '../../embeddable/map_embeddable';
export * from '../../kibana_services';
export { renderApp } from '../../render_app';
@@ -16,3 +13,4 @@ export { registerSource } from '../../classes/sources/source_registry';
export { createTileMapLayerDescriptor } from '../../classes/layers/create_tile_map_layer_descriptor';
export { createRegionMapLayerDescriptor } from '../../classes/layers/create_region_map_layer_descriptor';
export { createBasemapLayerDescriptor } from '../../classes/layers/create_basemap_layer_descriptor';
+export { createLayerDescriptor as createESSearchSourceLayerDescriptor } from '../../classes/sources/es_search_source';
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap
index 3713b28a103ec..e2e1140f5c5b4 100644
--- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap
+++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap
@@ -47,6 +47,7 @@ Object {
"jobId": "mock-job-id",
"metricFieldName": "responsetime",
"metricFunction": "avg",
+ "summaryCountFieldName": undefined,
"timeField": "@timestamp",
}
`;
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap
index ecb7fc07711e8..80ad6ed6bfab0 100644
--- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap
+++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap
@@ -53,6 +53,7 @@ Object {
"loading": true,
"metricFieldName": "responsetime",
"metricFunction": "avg",
+ "summaryCountFieldName": undefined,
"timeField": "@timestamp",
},
],
@@ -600,6 +601,7 @@ Object {
"plotLatest": 1486783800000,
"selectedEarliest": 1486656000000,
"selectedLatest": 1486670399999,
+ "summaryCountFieldName": undefined,
"timeField": "@timestamp",
},
],
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js
index a2c530c9ca494..3dc1c0234584d 100644
--- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js
+++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js
@@ -126,6 +126,7 @@ export const anomalyDataChange = function (
datafeedQuery,
config.metricFunction,
config.metricFieldName,
+ config.summaryCountFieldName,
config.timeField,
range.min,
range.max,
diff --git a/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts b/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts
index 79afe2ba5a0ad..514449385bf0b 100644
--- a/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts
+++ b/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts
@@ -22,6 +22,7 @@ import { CriteriaField } from './index';
import { findAggField } from '../../../../common/util/validation_utils';
import { getDatafeedAggregations } from '../../../../common/util/datafeed_utils';
import { aggregationTypeTransform } from '../../../../common/util/anomaly_utils';
+import { ES_AGGREGATION } from '../../../../common/constants/aggregation_types';
interface ResultResponse {
success: boolean;
@@ -68,6 +69,7 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) {
query: object | undefined,
metricFunction: string, // ES aggregation name
metricFieldName: string,
+ summaryCountFieldName: string | undefined,
timeFieldName: string,
earliestMs: number,
latestMs: number,
@@ -153,9 +155,8 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) {
body.query.bool.minimum_should_match = shouldCriteria.length / 2;
}
+ body.aggs.byTime.aggs = {};
if (metricFieldName !== undefined && metricFieldName !== '') {
- body.aggs.byTime.aggs = {};
-
const metricAgg: any = {
[metricFunction]: {},
};
@@ -186,8 +187,23 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) {
} else {
body.aggs.byTime.aggs.metric = metricAgg;
}
+ } else {
+ // if metricFieldName is not defined, it's probably a variation of the non zero count function
+ // refer to buildConfigFromDetector
+ if (summaryCountFieldName !== undefined && metricFunction === ES_AGGREGATION.CARDINALITY) {
+ // if so, check if summaryCountFieldName is an aggregation field
+ if (typeof aggFields === 'object' && Object.keys(aggFields).length > 0) {
+ // first item under aggregations can be any name, not necessarily 'buckets'
+ const accessor = Object.keys(aggFields)[0];
+ const tempAggs = { ...(aggFields[accessor].aggs ?? aggFields[accessor].aggregations) };
+ const foundCardinalityField = findAggField(tempAggs, summaryCountFieldName);
+ if (foundCardinalityField !== undefined) {
+ tempAggs.metric = foundCardinalityField;
+ }
+ body.aggs.byTime.aggs = tempAggs;
+ }
+ }
}
-
return mlApiServices.esSearch$({ index, body }).pipe(
map((resp: any) => {
const obj: MetricData = { success: true, results: {} };
diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts
index 90c39497a9a18..0fbac571d1bdf 100644
--- a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts
+++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts
@@ -91,6 +91,7 @@ function getMetricData(
chartConfig.datafeedConfig.query,
esMetricFunction ?? chartConfig.metricFunction,
chartConfig.metricFieldName,
+ chartConfig.summaryCountFieldName,
chartConfig.timeField,
earliestMs,
latestMs,
diff --git a/x-pack/plugins/ml/public/application/util/chart_config_builder.js b/x-pack/plugins/ml/public/application/util/chart_config_builder.js
index 2fa869b058aa2..a30280f1220c0 100644
--- a/x-pack/plugins/ml/public/application/util/chart_config_builder.js
+++ b/x-pack/plugins/ml/public/application/util/chart_config_builder.js
@@ -28,6 +28,7 @@ export function buildConfigFromDetector(job, detectorIndex) {
timeField: job.data_description.time_field,
interval: job.analysis_config.bucket_span,
datafeedConfig: job.datafeed_config,
+ summaryCountFieldName: job.analysis_config.summary_count_field_name,
};
if (detector.field_name !== undefined) {
@@ -63,10 +64,17 @@ export function buildConfigFromDetector(job, detectorIndex) {
'field',
]);
}
-
- if (detector.function === ML_JOB_AGGREGATION.NON_ZERO_COUNT && cardinalityField !== undefined) {
+ if (
+ (detector.function === ML_JOB_AGGREGATION.NON_ZERO_COUNT ||
+ detector.function === ML_JOB_AGGREGATION.LOW_NON_ZERO_COUNT ||
+ detector.function === ML_JOB_AGGREGATION.HIGH_NON_ZERO_COUNT ||
+ detector.function === ML_JOB_AGGREGATION.COUNT ||
+ detector.function === ML_JOB_AGGREGATION.HIGH_COUNT ||
+ detector.function === ML_JOB_AGGREGATION.LOW_COUNT) &&
+ cardinalityField !== undefined
+ ) {
config.metricFunction = ES_AGGREGATION.CARDINALITY;
- config.metricFieldName = cardinalityField;
+ config.metricFieldName = undefined;
} else {
// For count detectors using summary_count_field, plot sum(summary_count_field_name)
config.metricFunction = ES_AGGREGATION.SUM;
diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx
index 9fdc59d61257e..b0fedf5a44cba 100644
--- a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx
+++ b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx
@@ -65,7 +65,7 @@ describe('APMSection', () => {
expect(getByText('APM')).toBeInTheDocument();
expect(getByText('View in app')).toBeInTheDocument();
expect(getByText('Services 11')).toBeInTheDocument();
- expect(getByText('Transactions per minute 312.00k')).toBeInTheDocument();
+ expect(getByText('Throughput 312.00k tpm')).toBeInTheDocument();
expect(queryAllByTestId('loading')).toEqual([]);
});
it('shows loading state', () => {
@@ -80,6 +80,6 @@ describe('APMSection', () => {
expect(getByTestId('loading')).toBeInTheDocument();
expect(queryAllByText('View in app')).toEqual([]);
expect(queryAllByText('Services 11')).toEqual([]);
- expect(queryAllByText('Transactions per minute 312.00k')).toEqual([]);
+ expect(queryAllByText('Throughput 312.00k tpm')).toEqual([]);
});
});
diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx
index 91d20d3478960..620604562cc13 100644
--- a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx
+++ b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx
@@ -92,9 +92,9 @@ export function APMSection({ bucketSize }: Props) {
/x-pack/plugins/runtime_field_editor'],
+ roots: ['/x-pack/plugins/runtime_fields'],
};
diff --git a/x-pack/plugins/runtime_field_editor/kibana.json b/x-pack/plugins/runtime_fields/kibana.json
similarity index 88%
rename from x-pack/plugins/runtime_field_editor/kibana.json
rename to x-pack/plugins/runtime_fields/kibana.json
index 3270ada544ba4..65932c723c474 100644
--- a/x-pack/plugins/runtime_field_editor/kibana.json
+++ b/x-pack/plugins/runtime_fields/kibana.json
@@ -1,5 +1,5 @@
{
- "id": "runtimeFieldEditor",
+ "id": "runtimeFields",
"version": "kibana",
"server": false,
"ui": true,
diff --git a/x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx b/x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx
rename to x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/index.ts b/x-pack/plugins/runtime_fields/public/components/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/index.ts
rename to x-pack/plugins/runtime_fields/public/components/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts
rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/constants.ts b/x-pack/plugins/runtime_fields/public/constants.ts
similarity index 75%
rename from x-pack/plugins/runtime_field_editor/public/constants.ts
rename to x-pack/plugins/runtime_fields/public/constants.ts
index eebc3007d79d5..017b58c246afe 100644
--- a/x-pack/plugins/runtime_field_editor/public/constants.ts
+++ b/x-pack/plugins/runtime_fields/public/constants.ts
@@ -3,7 +3,11 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import { ComboBoxOption, RuntimeType } from './types';
+import { ComboBoxOption } from './types';
+
+export const RUNTIME_FIELD_TYPES = ['keyword', 'long', 'double', 'date', 'ip', 'boolean'] as const;
+
+type RuntimeType = typeof RUNTIME_FIELD_TYPES[number];
export const RUNTIME_FIELD_OPTIONS: Array> = [
{
diff --git a/x-pack/plugins/runtime_field_editor/public/index.ts b/x-pack/plugins/runtime_fields/public/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/index.ts
rename to x-pack/plugins/runtime_fields/public/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/lib/documentation.ts b/x-pack/plugins/runtime_fields/public/lib/documentation.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/lib/documentation.ts
rename to x-pack/plugins/runtime_fields/public/lib/documentation.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/lib/index.ts b/x-pack/plugins/runtime_fields/public/lib/index.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/lib/index.ts
rename to x-pack/plugins/runtime_fields/public/lib/index.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/load_editor.tsx b/x-pack/plugins/runtime_fields/public/load_editor.tsx
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/load_editor.tsx
rename to x-pack/plugins/runtime_fields/public/load_editor.tsx
diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.test.ts b/x-pack/plugins/runtime_fields/public/plugin.test.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/plugin.test.ts
rename to x-pack/plugins/runtime_fields/public/plugin.test.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.ts b/x-pack/plugins/runtime_fields/public/plugin.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/plugin.ts
rename to x-pack/plugins/runtime_fields/public/plugin.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/shared_imports.ts b/x-pack/plugins/runtime_fields/public/shared_imports.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/shared_imports.ts
rename to x-pack/plugins/runtime_fields/public/shared_imports.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/test_utils.ts b/x-pack/plugins/runtime_fields/public/test_utils.ts
similarity index 100%
rename from x-pack/plugins/runtime_field_editor/public/test_utils.ts
rename to x-pack/plugins/runtime_fields/public/test_utils.ts
diff --git a/x-pack/plugins/runtime_field_editor/public/types.ts b/x-pack/plugins/runtime_fields/public/types.ts
similarity index 80%
rename from x-pack/plugins/runtime_field_editor/public/types.ts
rename to x-pack/plugins/runtime_fields/public/types.ts
index 984d6ab9f8655..b1bbb06d79655 100644
--- a/x-pack/plugins/runtime_field_editor/public/types.ts
+++ b/x-pack/plugins/runtime_fields/public/types.ts
@@ -4,12 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { DataPublicPluginStart } from 'src/plugins/data/public';
-export type {
- RuntimeField,
- RuntimeType,
- RUNTIME_FIELD_TYPES,
-} from 'src/plugins/runtime_fields/common';
+import { RUNTIME_FIELD_TYPES } from './constants';
import { OpenRuntimeFieldEditorProps } from './load_editor';
export interface LoadEditorResponse {
@@ -30,6 +26,16 @@ export interface StartPlugins {
data: DataPublicPluginStart;
}
+export type RuntimeType = typeof RUNTIME_FIELD_TYPES[number];
+
+export interface RuntimeField {
+ name: string;
+ type: RuntimeType;
+ script: {
+ source: string;
+ };
+}
+
export interface ComboBoxOption {
label: string;
value?: T;
diff --git a/x-pack/plugins/searchprofiler/kibana.json b/x-pack/plugins/searchprofiler/kibana.json
index a5e42f20b5c7a..6c94701c0ec09 100644
--- a/x-pack/plugins/searchprofiler/kibana.json
+++ b/x-pack/plugins/searchprofiler/kibana.json
@@ -2,9 +2,9 @@
"id": "searchprofiler",
"version": "8.0.0",
"kibanaVersion": "kibana",
- "requiredPlugins": ["devTools", "home", "licensing"],
"configPath": ["xpack", "searchprofiler"],
"server": true,
"ui": true,
+ "requiredPlugins": ["devTools", "home", "licensing"],
"requiredBundles": ["esUiShared"]
}
diff --git a/x-pack/plugins/searchprofiler/tsconfig.json b/x-pack/plugins/searchprofiler/tsconfig.json
new file mode 100644
index 0000000000000..f8ac3a61f7812
--- /dev/null
+++ b/x-pack/plugins/searchprofiler/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "composite": true,
+ "outDir": "./target/types",
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "declarationMap": true
+ },
+ "include": [
+ "common/**/*",
+ "public/**/*",
+ "server/**/*",
+ ],
+ "references": [
+ { "path": "../../../src/core/tsconfig.json" },
+ { "path": "../../../src/plugins/es_ui_shared/tsconfig.json" },
+ { "path": "../../../src/plugins/dev_tools/tsconfig.json" },
+ { "path": "../../../src/plugins/home/tsconfig.json" },
+ { "path": "../licensing/tsconfig.json" },
+ ]
+}
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx
index bd9e9f28034cc..50f3b722a0343 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx
@@ -272,24 +272,9 @@ export const sendAlertToTimelineAction = async ({
notes: null,
timeline: {
...timelineDefaults,
- kqlMode: 'search',
+ description: `_id: ${ecsData._id}`,
filters: getFiltersFromRule(ecsData.signal?.rule?.filters as string[]),
- dataProviders: [
- {
- and: [],
- id: `send-alert-to-timeline-action-default-draggable-event-details-value-formatted-field-value-${TimelineId.active}-alert-id-${ecsData._id}`,
- name: ecsData._id,
- enabled: true,
- excluded: false,
- kqlQuery: '',
- queryMatch: {
- field: '_id',
- value: ecsData._id,
- operator: ':',
- },
- },
- ...getThresholdAggregationDataProvider(ecsData, nonEcsData),
- ],
+ dataProviders: [...getThresholdAggregationDataProvider(ecsData, nonEcsData)],
id: TimelineId.active,
indexNames: [],
dateRange: {
diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts
index 889bcc15d8df0..228e8cc1c4385 100644
--- a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts
+++ b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts
@@ -61,7 +61,7 @@ export interface PolicyDetailsState {
/** current location of the application */
location?: Immutable;
/** A summary of stats for the agents associated with a given Fleet Agent Policy */
- agentStatusSummary?: GetAgentStatusResponse['results'];
+ agentStatusSummary?: Omit;
/** Status of an update to the policy */
updateStatus?: {
success: boolean;
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index cb5b3e8bc0934..5701312501dba 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -5147,8 +5147,6 @@
"xpack.apm.metrics.transactionChart.machineLearningLabel": "機械学習:",
"xpack.apm.metrics.transactionChart.machineLearningTooltip": "平均期間の周りのストリームには予測バウンドが表示されます。異常スコアが>= 75の場合、注釈が表示されます。",
"xpack.apm.metrics.transactionChart.machineLearningTooltip.withKuery": "フィルタリングで検索バーを使用しているときには、機械学習結果が表示されません",
- "xpack.apm.metrics.transactionChart.requestsPerMinuteLabel": "1 分あたりのリクエスト",
- "xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel": "1分あたりのトランザクション数",
"xpack.apm.metrics.transactionChart.viewJob": "ジョブを表示",
"xpack.apm.notAvailableLabel": "N/A",
"xpack.apm.propertiesTable.agentFeature.noDataAvailableLabel": "利用可能なデータがありません",
@@ -5288,7 +5286,6 @@
"xpack.apm.serviceOverview.mlNudgeMessage.content": "APM の異常検知統合で、異常なトランザクションを特定し、アップストリームおよびダウンストリームサービスの正常性を確認します。わずか数分で開始できます。",
"xpack.apm.serviceOverview.mlNudgeMessage.dismissButton": "閉じる",
"xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "使ってみる",
- "xpack.apm.serviceOverview.throughputChart.traffic": "トラフィック",
"xpack.apm.serviceOverview.throughtputChartTitle": "トラフィック",
"xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "エラー率",
"xpack.apm.serviceOverview.transactionsTableColumnImpact": "インパクト",
@@ -5296,12 +5293,10 @@
"xpack.apm.serviceOverview.transactionsTableColumnLatency.p95": "レイテンシ(95 番目)",
"xpack.apm.serviceOverview.transactionsTableColumnLatency.p99": "レイテンシ(99 番目)",
"xpack.apm.serviceOverview.transactionsTableColumnName": "名前",
- "xpack.apm.serviceOverview.transactionsTableColumnTroughput": "トラフィック",
"xpack.apm.serviceOverview.transactionsTableLinkText": "トランザクションを表示",
"xpack.apm.serviceOverview.transactionsTableTitle": "トランザクション",
"xpack.apm.servicesTable.7xOldDataMessage": "また、移行が必要な古いデータがある可能性もあります。",
"xpack.apm.servicesTable.7xUpgradeServerMessage": "バージョン7.xより前からのアップグレードですか?また、\n APMサーバーインスタンスを7.0以降にアップグレードしていることも確認してください。",
- "xpack.apm.servicesTable.avgResponseTimeColumnLabel": "平均応答時間",
"xpack.apm.servicesTable.environmentColumnLabel": "環境",
"xpack.apm.servicesTable.environmentCount": "{environmentCount, plural, one {1 個の環境} other {# 個の環境}}",
"xpack.apm.servicesTable.healthColumnLabel": "ヘルス",
@@ -5309,7 +5304,6 @@
"xpack.apm.servicesTable.noServicesLabel": "APM サービスがインストールされていないようです。追加しましょう!",
"xpack.apm.servicesTable.notFoundLabel": "サービスが見つかりません",
"xpack.apm.servicesTable.transactionErrorRate": "エラー率%",
- "xpack.apm.servicesTable.transactionsPerMinuteColumnLabel": "1 分あたりのトランザクション",
"xpack.apm.servicesTable.UpgradeAssistantLink": "Kibana アップグレードアシスタントで詳細をご覧ください",
"xpack.apm.settings.agentConfig": "エージェントの編集",
"xpack.apm.settings.anomaly_detection.legacy_jobs.body": "以前の統合のレガシー機械学習ジョブが見つかりました。これは、APMアプリでは使用されていません。",
@@ -5436,7 +5430,6 @@
"xpack.apm.transactionActionMenu.trace.title": "トレースの詳細",
"xpack.apm.transactionActionMenu.viewInUptime": "ステータス",
"xpack.apm.transactionActionMenu.viewSampleDocumentLinkLabel": "サンプルドキュメントを表示",
- "xpack.apm.transactionBreakdown.chartTitle": "スパンタイプ別平均期間",
"xpack.apm.transactionCardinalityWarning.body": "一意のトランザクション名の数が構成された値{bucketSize}を超えています。エージェントを再構成し、類似したトランザクションをグループ化するか、{codeBlock}の値を増やしてください。",
"xpack.apm.transactionCardinalityWarning.docsLink": "詳細はドキュメントをご覧ください",
"xpack.apm.transactionCardinalityWarning.title": "このビューには、報告されたトランザクションのサブセットが表示されます。",
@@ -5500,7 +5493,6 @@
"xpack.apm.transactionsTable.impactColumnLabel": "インパクト",
"xpack.apm.transactionsTable.nameColumnLabel": "名前",
"xpack.apm.transactionsTable.notFoundLabel": "トランザクションが見つかりませんでした。",
- "xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel": "1 分あたりのトランザクション",
"xpack.apm.tutorial.apmServer.title": "APM Server",
"xpack.apm.tutorial.elasticCloud.textPre": "APM Server を有効にするには、[the Elastic Cloud console](https://cloud.elastic.co/deployments?q={cloudId}) に移動し、展開設定で APM を有効にします。有効になったら、このページを更新してください。",
"xpack.apm.tutorial.elasticCloudInstructions.title": "APM エージェント",
@@ -15986,7 +15978,6 @@
"xpack.observability.overview.apm.appLink": "アプリで表示",
"xpack.observability.overview.apm.services": "サービス",
"xpack.observability.overview.apm.title": "APM",
- "xpack.observability.overview.apm.transactionsPerMinute": "1分あたりのトランザクション数",
"xpack.observability.overview.breadcrumb": "概要",
"xpack.observability.overview.loadingObservability": "オブザーバビリティを読み込んでいます",
"xpack.observability.overview.logs.appLink": "アプリで表示",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index 32998d4b28e32..f6e4bfeb9ebde 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -5155,8 +5155,6 @@
"xpack.apm.metrics.transactionChart.machineLearningLabel": "Machine Learning",
"xpack.apm.metrics.transactionChart.machineLearningTooltip": "环绕平均持续时间的流显示预期边界。对 ≥ 75 的异常分数显示标注。",
"xpack.apm.metrics.transactionChart.machineLearningTooltip.withKuery": "使用搜索栏筛选时,Machine Learning 结果处于隐藏状态",
- "xpack.apm.metrics.transactionChart.requestsPerMinuteLabel": "每分钟请求数",
- "xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel": "每分钟事务数",
"xpack.apm.metrics.transactionChart.viewJob": "查看作业",
"xpack.apm.notAvailableLabel": "不可用",
"xpack.apm.percentOfParent": "({parentType, select, transaction {事务} trace {追溯} }的{value})",
@@ -5297,7 +5295,6 @@
"xpack.apm.serviceOverview.mlNudgeMessage.content": "通过 APM 的异常检测集成来查明异常事务,并了解上下游服务的运行状况。只需几分钟即可开始使用。",
"xpack.apm.serviceOverview.mlNudgeMessage.dismissButton": "关闭",
"xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "开始使用",
- "xpack.apm.serviceOverview.throughputChart.traffic": "流量",
"xpack.apm.serviceOverview.throughtputChartTitle": "流量",
"xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "错误率",
"xpack.apm.serviceOverview.transactionsTableColumnImpact": "影响",
@@ -5305,12 +5302,10 @@
"xpack.apm.serviceOverview.transactionsTableColumnLatency.p95": "延迟(第 95 个)",
"xpack.apm.serviceOverview.transactionsTableColumnLatency.p99": "延迟(第 99 个)",
"xpack.apm.serviceOverview.transactionsTableColumnName": "名称",
- "xpack.apm.serviceOverview.transactionsTableColumnTroughput": "流量",
"xpack.apm.serviceOverview.transactionsTableLinkText": "查看事务",
"xpack.apm.serviceOverview.transactionsTableTitle": "事务",
"xpack.apm.servicesTable.7xOldDataMessage": "可能还有需要迁移的旧数据。",
"xpack.apm.servicesTable.7xUpgradeServerMessage": "从 7.x 之前的版本升级?另外,确保您已将\n APM Server 实例升级到至少 7.0。",
- "xpack.apm.servicesTable.avgResponseTimeColumnLabel": "平均响应时间",
"xpack.apm.servicesTable.environmentColumnLabel": "环境",
"xpack.apm.servicesTable.environmentCount": "{environmentCount, plural, one {1 个环境} other {# 个环境}}",
"xpack.apm.servicesTable.healthColumnLabel": "运行状况",
@@ -5318,7 +5313,6 @@
"xpack.apm.servicesTable.noServicesLabel": "似乎您没有安装任何 APM 服务。让我们添加一些!",
"xpack.apm.servicesTable.notFoundLabel": "未找到任何服务",
"xpack.apm.servicesTable.transactionErrorRate": "错误率 %",
- "xpack.apm.servicesTable.transactionsPerMinuteColumnLabel": "每分钟事务数",
"xpack.apm.servicesTable.UpgradeAssistantLink": "通过访问 Kibana 升级助手来了解详情",
"xpack.apm.settings.agentConfig": "代理配置",
"xpack.apm.settings.anomaly_detection.legacy_jobs.body": "我们在以前的集成中发现 APM 应用中不再使用的旧版 Machine Learning 作业",
@@ -5445,7 +5439,6 @@
"xpack.apm.transactionActionMenu.trace.title": "跟踪详情",
"xpack.apm.transactionActionMenu.viewInUptime": "状态",
"xpack.apm.transactionActionMenu.viewSampleDocumentLinkLabel": "查看样例文档",
- "xpack.apm.transactionBreakdown.chartTitle": "平均持续时间(按跨度类型)",
"xpack.apm.transactionCardinalityWarning.body": "唯一事务名称的数目超过 {bucketSize} 的已配置值。尝试重新配置您的代理以对类似的事务分组或增大 {codeBlock} 的值",
"xpack.apm.transactionCardinalityWarning.docsLink": "在文档中了解详情",
"xpack.apm.transactionCardinalityWarning.title": "此视图显示已报告事务的子集。",
@@ -5510,7 +5503,6 @@
"xpack.apm.transactionsTable.impactColumnLabel": "影响",
"xpack.apm.transactionsTable.nameColumnLabel": "名称",
"xpack.apm.transactionsTable.notFoundLabel": "未找到任何事务。",
- "xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel": "每分钟事务数",
"xpack.apm.tutorial.apmServer.title": "APM Server",
"xpack.apm.tutorial.elasticCloud.textPre": "要启用 APM Server,请前往 [Elastic Cloud 控制台](https://cloud.elastic.co/deployments?q={cloudId}) 并在部署设置中启用 APM。启用后,请刷新此页面。",
"xpack.apm.tutorial.elasticCloudInstructions.title": "APM 代理",
@@ -16028,7 +16020,6 @@
"xpack.observability.overview.apm.appLink": "在应用中查看",
"xpack.observability.overview.apm.services": "服务",
"xpack.observability.overview.apm.title": "APM",
- "xpack.observability.overview.apm.transactionsPerMinute": "每分钟事务数",
"xpack.observability.overview.breadcrumb": "概览",
"xpack.observability.overview.loadingObservability": "正在加载可观测性",
"xpack.observability.overview.logs.appLink": "在应用中查看",
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss
index 70ad1cae6c1d1..476c971cfbbff 100644
--- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss
+++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss
@@ -5,7 +5,7 @@
color: $euiColorDarkShade;
}
- .euiLink + .euiIcon {
+ .euiLink + .euiToolTipAnchor {
margin-left: $euiSizeXS;
}
}
diff --git a/x-pack/plugins/uptime/common/constants/rest_api.ts b/x-pack/plugins/uptime/common/constants/rest_api.ts
index be1f498c2e75d..6916a5ea4788c 100644
--- a/x-pack/plugins/uptime/common/constants/rest_api.ts
+++ b/x-pack/plugins/uptime/common/constants/rest_api.ts
@@ -29,4 +29,5 @@ export enum API_URLS {
CREATE_ALERT = '/api/alerts/alert',
ALERT = '/api/alerts/alert/',
ALERTS_FIND = '/api/alerts/_find',
+ ACTION_TYPES = '/api/actions/list_action_types',
}
diff --git a/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts b/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts
index 971a9f51bfae1..8996bad8d4f08 100644
--- a/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts
+++ b/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts
@@ -26,6 +26,7 @@ export const AtomicStatusCheckParamsType = t.intersection([
filters: StatusCheckFiltersType,
shouldCheckStatus: t.boolean,
isAutoGenerated: t.boolean,
+ shouldCheckAvailability: t.boolean,
}),
]);
diff --git a/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx b/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx
new file mode 100644
index 0000000000000..e64b3533c0cc5
--- /dev/null
+++ b/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx
@@ -0,0 +1,48 @@
+/*
+ * 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 { render } from '../../../lib/helper/rtl_helpers';
+import { PageTabs } from './page_tabs';
+import { createMemoryHistory } from 'history';
+
+describe('PageTabs', () => {
+ it('it renders all tabs', () => {
+ const { getByText } = render( );
+ expect(getByText('Overview')).toBeInTheDocument();
+ expect(getByText('Certificates')).toBeInTheDocument();
+ expect(getByText('Settings')).toBeInTheDocument();
+ });
+
+ it('it keep params while switching', () => {
+ const { getByTestId } = render( , {
+ history: createMemoryHistory({
+ initialEntries: ['/settings/?g=%22%22&dateRangeStart=now-10m&dateRangeEnd=now'],
+ }),
+ });
+ expect(getByTestId('uptimeSettingsToOverviewLink')).toHaveAttribute(
+ 'href',
+ '/?dateRangeStart=now-10m'
+ );
+ expect(getByTestId('uptimeCertificatesLink')).toHaveAttribute(
+ 'href',
+ '/certificates?dateRangeStart=now-10m'
+ );
+ expect(getByTestId('settings-page-link')).toHaveAttribute(
+ 'href',
+ '/settings?dateRangeStart=now-10m'
+ );
+ });
+
+ it('it resets params on overview if already on overview', () => {
+ const { getByTestId } = render( , {
+ history: createMemoryHistory({
+ initialEntries: ['/?g=%22%22&dateRangeStart=now-10m&dateRangeEnd=now'],
+ }),
+ });
+ expect(getByTestId('uptimeSettingsToOverviewLink')).toHaveAttribute('href', '/');
+ });
+});
diff --git a/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx b/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx
index 56da7d5f92803..7dfc110dbb6e9 100644
--- a/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx
+++ b/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx
@@ -10,6 +10,8 @@ import { EuiTabs, EuiTab } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useHistory, useRouteMatch } from 'react-router-dom';
import { CERTIFICATES_ROUTE, OVERVIEW_ROUTE, SETTINGS_ROUTE } from '../../../../common/constants';
+import { useGetUrlParams } from '../../../hooks';
+import { stringifyUrlParams } from '../../../lib/helper/stringify_url_params';
const tabs = [
{
@@ -39,6 +41,8 @@ export const PageTabs = () => {
const history = useHistory();
+ const params = useGetUrlParams();
+
const isOverView = useRouteMatch(OVERVIEW_ROUTE);
const isSettings = useRouteMatch(SETTINGS_ROUTE);
const isCerts = useRouteMatch(CERTIFICATES_ROUTE);
@@ -58,6 +62,15 @@ export const PageTabs = () => {
}
}, [isCerts, isSettings, isOverView]);
+ const createHrefForTab = (id: string) => {
+ if (selectedTabId === OVERVIEW_ROUTE && id === OVERVIEW_ROUTE) {
+ // If we are already on overview route and user clicks again on overview tabs,
+ // we will reset the filters
+ return history.createHref({ pathname: id });
+ }
+ return history.createHref({ pathname: id, search: stringifyUrlParams(params, true) });
+ };
+
const renderTabs = () => {
return tabs.map(({ dataTestSubj, name, id }, index) => (
{
isSelected={id === selectedTabId}
key={index}
data-test-subj={dataTestSubj}
- href={history.createHref({ pathname: id })}
+ href={createHrefForTab(id)}
>
{name}
diff --git a/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx b/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx
index 5f40b60420f83..c0ac5d959bda1 100644
--- a/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx
+++ b/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx
@@ -7,11 +7,9 @@
import React from 'react';
import { ExecutedStep } from './executed_step';
import { Ping } from '../../../../common/runtime_types';
-import { mountWithRouter } from '../../../lib';
import { render } from '../../../lib/helper/rtl_helpers';
-// FLAKY: https://github.com/elastic/kibana/issues/85899
-describe.skip('ExecutedStep', () => {
+describe('ExecutedStep', () => {
let step: Ping;
beforeEach(() => {
@@ -42,105 +40,28 @@ describe.skip('ExecutedStep', () => {
});
it('renders a link to the step detail view', () => {
- expect(
- mountWithRouter( ).find(
- 'StepDetailLink'
- )
- ).toMatchInlineSnapshot(`
-
-
-
-
-
-
-
-
-
-
- 4. STEP_NAME
-
-
-
-
-
-
-
-
-
-
- `);
+ const { getByRole, getByText } = render(
+
+ );
+ expect(getByRole('link')).toHaveAttribute('href', '/journey/fake-group/step/4');
+ expect(getByText('4. STEP_NAME'));
});
- it('supplies status badge correct status', () => {
+ it.each([
+ ['succeeded', 'Succeeded'],
+ ['failed', 'Failed'],
+ ['skipped', 'Skipped'],
+ ['somegarbage', '4.'],
+ ])('supplies status badge correct status', (status, expectedStatus) => {
step.synthetics = {
- payload: { status: 'THE_STATUS' },
+ payload: { status },
};
- expect(
- mountWithRouter( ).find(
- 'StatusBadge'
- )
- ).toMatchInlineSnapshot(`
-
-
-
-
-
-
-
-
-
- `);
+ const { getByText } = render( );
+ expect(getByText(expectedStatus));
});
- it('renders accordions for step, error message, and error stack script', () => {
+ it('renders accordion for step', () => {
step.synthetics = {
- error: {
- message: 'There was an error executing the step.',
- stack: 'some.stack.trace.string',
- },
payload: {
source: 'const someVar = "the var"',
},
@@ -150,280 +71,26 @@ describe.skip('ExecutedStep', () => {
},
};
- expect(
- mountWithRouter( ).find(
- 'CodeBlockAccordion'
- )
- ).toMatchInlineSnapshot(`
- Array [
-
-
-
-
-
-
-
-
-
-
-
- Step script
-
-
-
-
-
-
-
-
-
-
-
-
- const someVar = "the var"
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
-
-
-
-
-
-
-
-
- Error
-
-
-
-
-
-
-
-
-
-
-
-
- There was an error executing the step.
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
-
-
-
-
-
-
-
-
- Stack trace
-
-
-
-
-
-
-
-
-
-
-
-
- some.stack.trace.string
-
-
-
-
-
-
-
-
-
-
-
- ,
- ]
- `);
+ const { getByText } = render( );
+
+ expect(getByText('4. STEP_NAME'));
+ expect(getByText('Step script'));
+ expect(getByText(`const someVar = "the var"`));
+ });
+
+ it('renders accordions for error message, and stack trace', () => {
+ step.synthetics = {
+ error: {
+ message: 'There was an error executing the step.',
+ stack: 'some.stack.trace.string',
+ },
+ };
+
+ const { getByText } = render( );
+
+ expect(getByText('4.'));
+ expect(getByText('Error'));
+ expect(getByText('There was an error executing the step.'));
+ expect(getByText('some.stack.trace.string'));
});
});
diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx
index 3953d35cc73db..26a8122f1357f 100644
--- a/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx
+++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx
@@ -35,7 +35,7 @@ const MONITOR_TYPES: Record = {
};
export const MonitorNameColumn = ({ summary }: Props) => {
- const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useGetUrlParams();
+ const params = useGetUrlParams();
const linkParameters = stringifyUrlParams(params, true);
diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx
index 7cf24d447316c..f100659054ac2 100644
--- a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx
+++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx
@@ -34,7 +34,7 @@ interface MostRecentErrorProps {
}
export const MostRecentError = ({ error, monitorId, timestamp }: MostRecentErrorProps) => {
- const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useGetUrlParams();
+ const params = useGetUrlParams();
params.statusFilter = 'down';
const linkParameters = stringifyUrlParams(params, true);
diff --git a/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx b/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx
index 2f0faebdf2487..ce2d0f6ace7e3 100644
--- a/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx
+++ b/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx
@@ -11,6 +11,10 @@ import { EuiButtonEmpty } from '@elastic/eui';
import { TriggersAndActionsUIPublicPluginStart } from '../../../../triggers_actions_ui/public';
import { getConnectorsAction } from '../../state/alerts/alerts';
import { useKibana } from '../../../../../../src/plugins/kibana_react/public';
+import { useFetcher } from '../../../../observability/public';
+import { fetchActionTypes } from '../../state/api/alerts';
+
+import { ActionTypeId } from './types';
interface Props {
focusInput: () => void;
@@ -20,6 +24,17 @@ interface KibanaDeps {
triggersActionsUi: TriggersAndActionsUIPublicPluginStart;
}
+export const ALLOWED_ACTION_TYPES: ActionTypeId[] = [
+ '.slack',
+ '.pagerduty',
+ '.server-log',
+ '.index',
+ '.teams',
+ '.servicenow',
+ '.jira',
+ '.webhook',
+];
+
export const AddConnectorFlyout = ({ focusInput }: Props) => {
const [addFlyoutVisible, setAddFlyoutVisibility] = useState(false);
const {
@@ -30,6 +45,8 @@ export const AddConnectorFlyout = ({ focusInput }: Props) => {
const dispatch = useDispatch();
+ const { data: actionTypes } = useFetcher(() => fetchActionTypes(), []);
+
const ConnectorAddFlyout = useMemo(
() =>
getAddConnectorFlyout({
@@ -39,9 +56,12 @@ export const AddConnectorFlyout = ({ focusInput }: Props) => {
setAddFlyoutVisibility(false);
focusInput();
},
+ actionTypes: (actionTypes ?? []).filter((actionType) =>
+ ALLOWED_ACTION_TYPES.includes(actionType.id as ActionTypeId)
+ ),
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
- []
+ [actionTypes]
);
return (
diff --git a/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx b/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx
index 9c2bd3e86b460..68e9a8297cf33 100644
--- a/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx
+++ b/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx
@@ -19,12 +19,13 @@ import { useSelector } from 'react-redux';
import styled from 'styled-components';
import { SettingsFormProps } from '../../pages/settings';
import { connectorsSelector } from '../../state/alerts/alerts';
-import { AddConnectorFlyout } from './add_connector_flyout';
+import { AddConnectorFlyout, ALLOWED_ACTION_TYPES } from './add_connector_flyout';
import { useGetUrlParams, useUrlParams } from '../../hooks';
import { alertFormI18n } from './translations';
import { useInitApp } from '../../hooks/use_init_app';
import { useKibana } from '../../../../../../src/plugins/kibana_react/public';
import { TriggersAndActionsUIPublicPluginStart } from '../../../../triggers_actions_ui/public/';
+import { ActionTypeId } from './types';
type ConnectorOption = EuiComboBoxOptionOption;
@@ -88,11 +89,13 @@ export const AlertDefaultsForm: React.FC = ({
);
};
- const options = (data ?? []).map((connectorAction) => ({
- value: connectorAction.id,
- label: connectorAction.name,
- 'data-test-subj': connectorAction.name,
- }));
+ const options = (data ?? [])
+ .filter((action) => ALLOWED_ACTION_TYPES.includes(action.actionTypeId as ActionTypeId))
+ .map((connectorAction) => ({
+ value: connectorAction.id,
+ label: connectorAction.name,
+ 'data-test-subj': connectorAction.name,
+ }));
const renderOption = (option: ConnectorOption) => {
const { label, value } = option;
diff --git a/x-pack/plugins/uptime/public/components/settings/types.ts b/x-pack/plugins/uptime/public/components/settings/types.ts
new file mode 100644
index 0000000000000..faa1c7e72e47b
--- /dev/null
+++ b/x-pack/plugins/uptime/public/components/settings/types.ts
@@ -0,0 +1,27 @@
+/*
+ * 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 {
+ IndexActionTypeId,
+ JiraActionTypeId,
+ PagerDutyActionTypeId,
+ ServerLogActionTypeId,
+ ServiceNowActionTypeId,
+ SlackActionTypeId,
+ TeamsActionTypeId,
+ WebhookActionTypeId,
+ // eslint-disable-next-line @kbn/eslint/no-restricted-paths
+} from '../../../../actions/server/builtin_action_types';
+
+export type ActionTypeId =
+ | typeof SlackActionTypeId
+ | typeof PagerDutyActionTypeId
+ | typeof ServerLogActionTypeId
+ | typeof IndexActionTypeId
+ | typeof TeamsActionTypeId
+ | typeof ServiceNowActionTypeId
+ | typeof JiraActionTypeId
+ | typeof WebhookActionTypeId;
diff --git a/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts b/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts
index 2c2fc88ffa480..3806f20813bf1 100644
--- a/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts
+++ b/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts
@@ -38,10 +38,7 @@ function handleBreadcrumbClick(
export const makeBaseBreadcrumb = (href: string, params?: UptimeUrlParams): EuiBreadcrumb => {
if (params) {
const crumbParams: Partial = { ...params };
- // We don't want to encode this values because they are often set to Date.now(), the relative
- // values in dateRangeStart are better for a URL.
- delete crumbParams.absoluteDateRangeStart;
- delete crumbParams.absoluteDateRangeEnd;
+
delete crumbParams.statusFilter;
const query = stringifyUrlParams(crumbParams, true);
href += query === EMPTY_QUERY ? '' : query;
diff --git a/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts b/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts
index 7171aa4828637..86672efc61eb8 100644
--- a/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts
+++ b/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts
@@ -26,9 +26,9 @@ describe('monitor status alert type', () => {
"errors": Object {
"typeCheckFailure": "Provided parameters do not conform to the expected type.",
"typeCheckParsingMessage": Array [
- "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
- "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeCount: number",
- "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeUnit: string",
+ "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
+ "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeCount: number",
+ "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeUnit: string",
],
},
}
@@ -151,7 +151,7 @@ describe('monitor status alert type', () => {
"errors": Object {
"typeCheckFailure": "Provided parameters do not conform to the expected type.",
"typeCheckParsingMessage": Array [
- "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
+ "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
],
},
}
@@ -164,7 +164,7 @@ describe('monitor status alert type', () => {
"errors": Object {
"typeCheckFailure": "Provided parameters do not conform to the expected type.",
"typeCheckParsingMessage": Array [
- "Invalid value \\"this isn't a number\\" supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
+ "Invalid value \\"this isn't a number\\" supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number",
],
},
}
diff --git a/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx b/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx
index e9905e6a706a9..97bd63614141b 100644
--- a/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx
+++ b/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx
@@ -11,6 +11,7 @@ import { createMemoryHistory, History } from 'history';
import { CoreStart } from 'kibana/public';
import { I18nProvider } from '@kbn/i18n/react';
import { coreMock } from 'src/core/public/mocks';
+import { configure } from '@testing-library/dom';
import { mockState } from '../__mocks__/uptime_store.mock';
import { EuiThemeProvider } from '../../../../observability/public';
import {
@@ -91,6 +92,7 @@ export function MockRouter({
);
}
+configure({ testIdAttribute: 'data-test-subj' });
/* Custom react testing library render */
export function render(
diff --git a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts
index 1b5a6ab7c317b..62d7ed44a2911 100644
--- a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts
+++ b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts
@@ -9,6 +9,8 @@ import { stringifyUrlParams } from './stringify_url_params';
describe('stringifyUrlParams', () => {
it('creates expected string value', () => {
const result = stringifyUrlParams({
+ absoluteDateRangeStart: 1000,
+ absoluteDateRangeEnd: 2000,
autorefreshInterval: 50000,
autorefreshIsPaused: false,
dateRangeStart: 'now-15m',
@@ -19,13 +21,15 @@ describe('stringifyUrlParams', () => {
statusFilter: 'up',
});
expect(result).toMatchInlineSnapshot(
- `"?autorefreshInterval=50000&autorefreshIsPaused=false&dateRangeStart=now-15m&dateRangeEnd=now&filters=monitor.id%3A%20bar&focusConnectorField=true&search=monitor.id%3A%20foo&statusFilter=up"`
+ `"?absoluteDateRangeStart=1000&absoluteDateRangeEnd=2000&autorefreshInterval=50000&autorefreshIsPaused=false&dateRangeStart=now-15m&dateRangeEnd=now&filters=monitor.id%3A%20bar&focusConnectorField=true&search=monitor.id%3A%20foo&statusFilter=up"`
);
});
it('creates expected string value when ignore empty is true', () => {
const result = stringifyUrlParams(
{
+ absoluteDateRangeStart: 1000,
+ absoluteDateRangeEnd: 2000,
autorefreshInterval: 50000,
autorefreshIsPaused: false,
dateRangeStart: 'now-15m',
diff --git a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts
index b10af15961401..2fb970a051801 100644
--- a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts
+++ b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts
@@ -18,6 +18,11 @@ const {
export const stringifyUrlParams = (params: Partial, ignoreEmpty = false) => {
if (ignoreEmpty) {
+ // We don't want to encode this values because they are often set to Date.now(), the relative
+ // values in dateRangeStart are better for a URL.
+ delete params.absoluteDateRangeStart;
+ delete params.absoluteDateRangeEnd;
+
Object.keys(params).forEach((key: string) => {
// @ts-ignore
const val = params[key];
diff --git a/x-pack/plugins/uptime/public/state/api/alert_actions.ts b/x-pack/plugins/uptime/public/state/api/alert_actions.ts
new file mode 100644
index 0000000000000..0e8781e5937dd
--- /dev/null
+++ b/x-pack/plugins/uptime/public/state/api/alert_actions.ts
@@ -0,0 +1,144 @@
+/*
+ * 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 { NewAlertParams } from './alerts';
+import { AlertAction } from '../../../../triggers_actions_ui/public';
+import { ACTION_GROUP_DEFINITIONS } from '../../../common/constants/alerts';
+import { MonitorStatusTranslations } from '../../../common/translations';
+import {
+ IndexActionParams,
+ PagerDutyActionParams,
+ ServerLogActionParams,
+ ServiceNowActionParams,
+ JiraActionParams,
+ WebhookActionParams,
+ // eslint-disable-next-line @kbn/eslint/no-restricted-paths
+} from '../../../../actions/server';
+import { ActionTypeId } from '../../components/settings/types';
+
+export const SLACK_ACTION_ID: ActionTypeId = '.slack';
+export const PAGER_DUTY_ACTION_ID: ActionTypeId = '.pagerduty';
+export const SERVER_LOG_ACTION_ID: ActionTypeId = '.server-log';
+export const INDEX_ACTION_ID: ActionTypeId = '.index';
+export const TEAMS_ACTION_ID: ActionTypeId = '.teams';
+export const SERVICE_NOW_ACTION_ID: ActionTypeId = '.servicenow';
+export const JIRA_ACTION_ID: ActionTypeId = '.jira';
+export const WEBHOOK_ACTION_ID: ActionTypeId = '.webhook';
+
+const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS;
+
+export function populateAlertActions({ defaultActions, monitorId, monitorName }: NewAlertParams) {
+ const actions: AlertAction[] = [];
+ defaultActions.forEach((aId) => {
+ const action: AlertAction = {
+ id: aId.id,
+ actionTypeId: aId.actionTypeId,
+ group: MONITOR_STATUS.id,
+ params: {},
+ };
+ switch (aId.actionTypeId) {
+ case PAGER_DUTY_ACTION_ID:
+ action.params = getPagerDutyActionParams(monitorId);
+ break;
+ case SERVER_LOG_ACTION_ID:
+ action.params = getServerLogActionParams();
+ break;
+ case INDEX_ACTION_ID:
+ action.params = getIndexActionParams();
+ break;
+ case SERVICE_NOW_ACTION_ID:
+ action.params = getServiceNowActionParams();
+ break;
+ case JIRA_ACTION_ID:
+ action.params = getJiraActionParams();
+ break;
+ case WEBHOOK_ACTION_ID:
+ action.params = getWebhookActionParams();
+ break;
+ case SLACK_ACTION_ID:
+ case TEAMS_ACTION_ID:
+ default:
+ action.params = {
+ message: MonitorStatusTranslations.defaultActionMessage,
+ };
+ }
+
+ actions.push(action);
+ });
+
+ return actions;
+}
+
+function getIndexActionParams(): IndexActionParams {
+ return {
+ documents: [
+ {
+ monitorName: '{{state.monitorName}}',
+ monitorUrl: '{{{state.monitorUrl}}}',
+ statusMessage: '{{state.statusMessage}}',
+ latestErrorMessage: '{{{state.latestErrorMessage}}}',
+ observerLocation: '{{state.observerLocation}}',
+ },
+ ],
+ };
+}
+
+function getServerLogActionParams(): ServerLogActionParams {
+ return {
+ level: 'warn',
+ message: MonitorStatusTranslations.defaultActionMessage,
+ };
+}
+
+function getWebhookActionParams(): WebhookActionParams {
+ return {
+ body: MonitorStatusTranslations.defaultActionMessage,
+ };
+}
+
+function getPagerDutyActionParams(monitorId: string): PagerDutyActionParams {
+ return {
+ dedupKey: monitorId + MONITOR_STATUS.id,
+ eventAction: 'trigger',
+ severity: 'error',
+ summary: MonitorStatusTranslations.defaultActionMessage,
+ };
+}
+
+function getServiceNowActionParams(): ServiceNowActionParams {
+ return {
+ subAction: 'pushToService',
+ subActionParams: {
+ incident: {
+ short_description: MonitorStatusTranslations.defaultActionMessage,
+ description: MonitorStatusTranslations.defaultActionMessage,
+ impact: '2',
+ severity: '2',
+ urgency: '2',
+ externalId: null,
+ },
+ comments: [],
+ },
+ };
+}
+
+function getJiraActionParams(): JiraActionParams {
+ return {
+ subAction: 'pushToService',
+ subActionParams: {
+ incident: {
+ summary: MonitorStatusTranslations.defaultActionMessage,
+ externalId: null,
+ description: MonitorStatusTranslations.defaultActionMessage,
+ issueType: null,
+ priority: '2',
+ labels: null,
+ parent: null,
+ },
+ comments: [],
+ },
+ };
+}
diff --git a/x-pack/plugins/uptime/public/state/api/alerts.ts b/x-pack/plugins/uptime/public/state/api/alerts.ts
index 9d4dd3a1253c3..dd78be5d08ea0 100644
--- a/x-pack/plugins/uptime/public/state/api/alerts.ts
+++ b/x-pack/plugins/uptime/public/state/api/alerts.ts
@@ -4,17 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ACTION_GROUP_DEFINITIONS, CLIENT_ALERT_TYPES } from '../../../common/constants/alerts';
+import { CLIENT_ALERT_TYPES } from '../../../common/constants/alerts';
import { apiService } from './utils';
import { ActionConnector } from '../alerts/alerts';
import { AlertsResult, MonitorIdParam } from '../actions/types';
-import { AlertAction } from '../../../../triggers_actions_ui/public';
+import { ActionType, AlertAction } from '../../../../triggers_actions_ui/public';
import { API_URLS } from '../../../common/constants';
-import { MonitorStatusTranslations } from '../../../common/translations';
import { Alert, AlertTypeParams } from '../../../../alerts/common';
+import { AtomicStatusCheckParams } from '../../../common/runtime_types/alerts';
-const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS;
+import { populateAlertActions } from './alert_actions';
const UPTIME_AUTO_ALERT = 'UPTIME_AUTO';
@@ -28,24 +28,28 @@ export interface NewAlertParams extends AlertTypeParams {
defaultActions: ActionConnector[];
}
+type NewMonitorStatusAlert = Omit<
+ Alert,
+ | 'id'
+ | 'createdBy'
+ | 'updatedBy'
+ | 'createdAt'
+ | 'updatedAt'
+ | 'apiKey'
+ | 'apiKeyOwner'
+ | 'muteAll'
+ | 'mutedInstanceIds'
+ | 'executionStatus'
+>;
+
export const createAlert = async ({
defaultActions,
monitorId,
monitorName,
}: NewAlertParams): Promise => {
- const actions: AlertAction[] = [];
- defaultActions.forEach((aId) => {
- actions.push({
- id: aId.id,
- actionTypeId: aId.actionTypeId,
- group: MONITOR_STATUS.id,
- params: {
- message: MonitorStatusTranslations.defaultActionMessage,
- },
- });
- });
+ const actions: AlertAction[] = populateAlertActions({ defaultActions, monitorId, monitorName });
- const data = {
+ const data: NewMonitorStatusAlert = {
actions,
params: {
numTimes: 1,
@@ -60,8 +64,11 @@ export const createAlert = async ({
consumer: 'uptime',
alertTypeId: CLIENT_ALERT_TYPES.MONITOR_STATUS,
schedule: { interval: '1m' },
+ notifyWhen: 'onActionGroupChange',
tags: [UPTIME_AUTO_ALERT],
name: `${monitorName} (Simple status alert)`,
+ enabled: true,
+ throttle: null,
};
return await apiService.post(API_URLS.CREATE_ALERT, data);
@@ -99,3 +106,7 @@ export const fetchAlertRecords = async ({
export const disableAlertById = async ({ alertId }: { alertId: string }) => {
return await apiService.delete(API_URLS.ALERT + alertId);
};
+
+export const fetchActionTypes = async (): Promise => {
+ return await apiService.get(API_URLS.ACTION_TYPES);
+};
diff --git a/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json b/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json
new file mode 100644
index 0000000000000..c5ec5571917bd
--- /dev/null
+++ b/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "composite": true,
+ "outDir": "./target/types",
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "declarationMap": true
+ },
+ "include": ["*.ts", "server/**/*"],
+ "references": [
+ { "path": "../../../src/core/tsconfig.json" },
+ { "path": "../../../src/plugins/vis_type_timeseries/tsconfig.json" }
+ ]
+}
diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js
index 358e54d8738f6..cf43ebf01b610 100644
--- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js
+++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js
@@ -13,6 +13,8 @@ import { getRandomString } from './random';
export const initElasticsearchHelpers = (es) => {
let indicesCreated = [];
let templatesCreated = [];
+ let composableTemplatesCreated = [];
+ let dataStreamsCreated = [];
// Indices
const getIndex = (index) => es.indices.get({ index }).then(({ body }) => body);
@@ -30,6 +32,20 @@ export const initElasticsearchHelpers = (es) => {
const deleteAllIndices = () =>
Promise.all(indicesCreated.map(deleteIndex)).then(() => (indicesCreated = []));
+ // Data streams
+ const createDataStream = (dataStream = getRandomString(), document) => {
+ dataStreamsCreated.push(dataStream);
+ return es.index({ index: dataStream, body: document });
+ };
+
+ const deleteDataStream = (dataStream) => {
+ dataStreamsCreated = dataStreamsCreated.filter((i) => i !== dataStream);
+ return es.indices.deleteDataStream({ name: dataStream });
+ };
+
+ const deleteAllDataStreams = () =>
+ Promise.all(dataStreamsCreated.map(deleteDataStream)).then(() => (dataStreamsCreated = []));
+
// Index templates
const getIndexTemplates = () => es.indices.getTemplate();
@@ -39,6 +55,11 @@ export const initElasticsearchHelpers = (es) => {
return es.indices.putTemplate({ name, body: template }, { create: true });
};
+ const createComposableIndexTemplate = (name, template) => {
+ composableTemplatesCreated.push(name);
+ return es.indices.putIndexTemplate({ name, body: template }, { create: true });
+ };
+
const deleteIndexTemplate = (name) => {
templatesCreated = templatesCreated.filter((i) => i !== name);
return es.indices.deleteTemplate({ name }).catch((err) => {
@@ -49,22 +70,45 @@ export const initElasticsearchHelpers = (es) => {
});
};
+ const deleteComposableIndexTemplate = (name) => {
+ composableTemplatesCreated = composableTemplatesCreated.filter((i) => i !== name);
+ return es.indices.deleteIndexTemplate({ name }).catch((err) => {
+ // Silently fail if templates not found
+ if (err.statusCode !== 404) {
+ throw err;
+ }
+ });
+ };
+
const deleteAllTemplates = () =>
Promise.all(templatesCreated.map(deleteIndexTemplate)).then(() => (templatesCreated = []));
- const cleanUp = () => Promise.all([deleteAllIndices(), deleteAllTemplates()]);
+ const deleteAllComposableTemplates = () =>
+ Promise.all(templatesCreated.map(deleteComposableIndexTemplate)).then(
+ () => (composableTemplatesCreated = [])
+ );
+
+ const cleanUp = () =>
+ Promise.all([
+ deleteAllIndices(),
+ deleteAllTemplates(),
+ deleteAllComposableTemplates(),
+ deleteAllDataStreams(),
+ ]);
const getNodesStats = () => es.nodes.stats().then(({ body }) => body);
return {
getIndex,
createIndex,
+ createDataStream,
deleteIndex,
deleteAllIndices,
deleteAllTemplates,
getIndexTemplates,
createIndexTemplate,
deleteIndexTemplate,
+ createComposableIndexTemplate,
getNodesStats,
cleanUp,
};
diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js
index 1589baabb1ded..52979ed208bd6 100644
--- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js
+++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js
@@ -17,7 +17,12 @@ export default function ({ getService }) {
const es = getService('es');
- const { createIndex, cleanUp: cleanUpEsResources } = initElasticsearchHelpers(es);
+ const {
+ createIndex,
+ createComposableIndexTemplate,
+ createDataStream,
+ cleanUp: cleanUpEsResources,
+ } = initElasticsearchHelpers(es);
const {
loadPolicies,
@@ -74,6 +79,34 @@ export default function ({ getService }) {
const fetchedPolicy = body.find((p) => p.name === policyName);
expect(fetchedPolicy.linkedIndices).to.eql([indexName]);
});
+
+ it('should add hidden indices linked to policies', async () => {
+ // Create a policy
+ const policy = getPolicyPayload('hidden-index-link-test-policy');
+ const { name: policyName } = policy;
+ await createPolicy(policy);
+
+ // Create hidden data stream
+ await createComposableIndexTemplate('my_template', {
+ template: {},
+ index_patterns: ['hidden*'],
+ data_stream: {
+ hidden: true,
+ },
+ });
+
+ const indexName = 'hidden_index';
+ await createDataStream(indexName, {
+ '@timestamp': '2020-01-27',
+ });
+
+ await addPolicyToIndex(policyName, indexName);
+
+ const { body } = await loadPolicies(true);
+ const fetchedPolicy = body.find((p) => p.name === policyName);
+ // The index name is dynamically generated as .ds--XXX so we don't check for exact match
+ expect(fetchedPolicy.linkedIndices[0]).to.contain(indexName);
+ });
});
describe('create', () => {
diff --git a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts
index a0c5941d984cd..5b12ba4bf613f 100644
--- a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts
+++ b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts
@@ -36,6 +36,7 @@ export default ({ getService }: FtrProviderContext): void => {
const es = getService('es');
// Failing: See https://github.com/elastic/kibana/issues/88130
+ // FLAKY: https://github.com/elastic/kibana/issues/87988
describe.skip('patch_cases', () => {
afterEach(async () => {
await deleteCases(es);
diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts
index a754966cf18a9..774bfb2863dc6 100644
--- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts
+++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts
@@ -47,7 +47,8 @@ export default ({ getService }: FtrProviderContext): void => {
const supertest = getService('supertest');
const supertestWithoutAuth = getService('supertestWithoutAuth');
- describe('Finalizing signals migrations', () => {
+ // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/88302
+ describe.skip('Finalizing signals migrations', () => {
let legacySignalsIndexName: string;
let outdatedSignalsIndexName: string;
let createdMigrations: CreateResponse[];
diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
index d3de41689244b..3ac85fbeff36e 100644
--- a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
+++ b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
@@ -343,6 +343,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.testExecution.logTestStep('job deletion confirms the delete modal');
await ml.jobTable.confirmDeleteJobModal();
+ await ml.api.waitForAnomalyDetectionJobNotToExist(jobIdClone, 30 * 1000);
await ml.testExecution.logTestStep(
'job deletion does not display the deleted job in the job list any more'
diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts
index dd6310b67d844..e20b5e8b41bdf 100644
--- a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts
+++ b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts
@@ -326,6 +326,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.testExecution.logTestStep('job deletion confirms the delete modal');
await ml.jobTable.confirmDeleteJobModal();
+ await ml.api.waitForAnomalyDetectionJobNotToExist(jobIdClone, 30 * 1000);
await ml.testExecution.logTestStep(
'job deletion does not display the deleted job in the job list any more'
diff --git a/x-pack/test/functional/services/ml/api.ts b/x-pack/test/functional/services/ml/api.ts
index 0a0a80e52de79..e50fb1818273d 100644
--- a/x-pack/test/functional/services/ml/api.ts
+++ b/x-pack/test/functional/services/ml/api.ts
@@ -454,8 +454,8 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) {
return await esSupertest.get(`/_ml/anomaly_detectors/${jobId}`).expect(200);
},
- async waitForAnomalyDetectionJobToExist(jobId: string) {
- await retry.waitForWithTimeout(`'${jobId}' to exist`, 5 * 1000, async () => {
+ async waitForAnomalyDetectionJobToExist(jobId: string, timeout: number = 5 * 1000) {
+ await retry.waitForWithTimeout(`'${jobId}' to exist`, timeout, async () => {
if (await this.getAnomalyDetectionJob(jobId)) {
return true;
} else {
@@ -464,8 +464,8 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) {
});
},
- async waitForAnomalyDetectionJobNotToExist(jobId: string) {
- await retry.waitForWithTimeout(`'${jobId}' to not exist`, 5 * 1000, async () => {
+ async waitForAnomalyDetectionJobNotToExist(jobId: string, timeout: number = 5 * 1000) {
+ await retry.waitForWithTimeout(`'${jobId}' to not exist`, timeout, async () => {
if (await esSupertest.get(`/_ml/anomaly_detectors/${jobId}`).expect(404)) {
return true;
} else {
diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts
index 36812d0cd9eef..ca753e9253bde 100644
--- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts
+++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts
@@ -53,8 +53,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await testSubjects.click('alertsTab');
}
- // Failing: See https://github.com/elastic/kibana/issues/87105
- describe.skip('alerts list', function () {
+ describe('alerts list', function () {
before(async () => {
await pageObjects.common.navigateToApp('triggersActions');
await testSubjects.click('alertsTab');
@@ -407,6 +406,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
).to.equal('Error found in 1 alert.');
});
+ await refreshAlertsList();
expect(await testSubjects.getVisibleText('totalAlertsCount')).to.be(
'Showing: 2 of 2 alerts.'
);
diff --git a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
index ff4ab65a310ed..04cf8bef1a16c 100644
--- a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
+++ b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
@@ -8,7 +8,8 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
export default ({ getPageObjects, getService }: FtrProviderContext) => {
- describe('uptime alerts', () => {
+ // FLAKY: https://github.com/elastic/kibana/issues/88177
+ describe.skip('uptime alerts', () => {
const pageObjects = getPageObjects(['common', 'uptime']);
const supertest = getService('supertest');
const retry = getService('retry');
diff --git a/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts b/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts
index c1696d3205294..4734448f32df5 100644
--- a/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts
+++ b/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts
@@ -17,7 +17,8 @@ export default ({ getService }: FtrProviderContext) => {
const spacesService = getService('spaces');
const supertestWithoutAuth = getService('supertestWithoutAuth');
- describe('read_list_privileges', () => {
+ // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/88302
+ describe.skip('read_list_privileges', () => {
const space1Id = 'space_1';
const user1 = {
diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json
index 2584cedd01523..a0a94f91a1ddb 100644
--- a/x-pack/test/tsconfig.json
+++ b/x-pack/test/tsconfig.json
@@ -9,13 +9,16 @@
"exclude": ["../typings/jest.d.ts"],
"references": [
{ "path": "../../src/core/tsconfig.json" },
+ { "path": "../../src/plugins/telemetry_management_section/tsconfig.json" },
{ "path": "../../src/plugins/management/tsconfig.json" },
{ "path": "../../src/plugins/bfetch/tsconfig.json" },
{ "path": "../../src/plugins/charts/tsconfig.json" },
+ { "path": "../../src/plugins/console/tsconfig.json" },
{ "path": "../../src/plugins/dashboard/tsconfig.json" },
{ "path": "../../src/plugins/discover/tsconfig.json" },
{ "path": "../../src/plugins/data/tsconfig.json" },
{ "path": "../../src/plugins/embeddable/tsconfig.json" },
+ { "path": "../../src/plugins/es_ui_shared/tsconfig.json" },
{ "path": "../../src/plugins/expressions/tsconfig.json" },
{ "path": "../../src/plugins/home/tsconfig.json" },
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
@@ -24,6 +27,7 @@
{ "path": "../../src/plugins/navigation/tsconfig.json" },
{ "path": "../../src/plugins/newsfeed/tsconfig.json" },
{ "path": "../../src/plugins/saved_objects/tsconfig.json" },
+ { "path": "../../src/plugins/saved_objects_management/tsconfig.json" },
{ "path": "../../src/plugins/saved_objects_tagging_oss/tsconfig.json" },
{ "path": "../../src/plugins/share/tsconfig.json" },
{ "path": "../../src/plugins/telemetry_collection_manager/tsconfig.json" },
@@ -32,8 +36,10 @@
{ "path": "../../src/plugins/ui_actions/tsconfig.json" },
{ "path": "../../src/plugins/url_forwarding/tsconfig.json" },
+ { "path": "../plugins/console_extensions/tsconfig.json" },
{ "path": "../plugins/data_enhanced/tsconfig.json" },
{ "path": "../plugins/global_search/tsconfig.json" },
+ { "path": "../plugins/global_search_providers/tsconfig.json" },
{ "path": "../plugins/features/tsconfig.json" },
{ "path": "../plugins/embeddable_enhanced/tsconfig.json" },
{ "path": "../plugins/licensing/tsconfig.json" },
diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json
index 0780251e42f22..dc720fced3063 100644
--- a/x-pack/tsconfig.json
+++ b/x-pack/tsconfig.json
@@ -4,18 +4,23 @@
"exclude": [
"plugins/apm/e2e/cypress/**/*",
"plugins/apm/scripts/**/*",
+ "plugins/console_extensions/**/*",
"plugins/data_enhanced/**/*",
+ "plugins/discover_enhanced/**/*",
"plugins/dashboard_enhanced/**/*",
"plugins/global_search/**/*",
+ "plugins/global_search_providers/**/*",
"plugins/graph/**/*",
"plugins/features/**/*",
"plugins/embeddable_enhanced/**/*",
"plugins/licensing/**/*",
+ "plugins/searchprofiler/**/*",
"plugins/security_solution/cypress/**/*",
"plugins/task_manager/**/*",
"plugins/telemetry_collection_xpack/**/*",
"plugins/translations/**/*",
"plugins/ui_actions_enhanced/**/*",
+ "plugins/vis_type_timeseries_enhanced/**/*",
"test/**/*"
],
"compilerOptions": {
@@ -24,14 +29,17 @@
},
"references": [
{ "path": "../src/core/tsconfig.json" },
+ { "path": "../src/plugins/telemetry_management_section/tsconfig.json" },
{ "path": "../src/plugins/management/tsconfig.json" },
{ "path": "../src/plugins/bfetch/tsconfig.json" },
{ "path": "../src/plugins/charts/tsconfig.json" },
+ { "path": "../src/plugins/console/tsconfig.json" },
{ "path": "../src/plugins/dashboard/tsconfig.json" },
{ "path": "../src/plugins/discover/tsconfig.json" },
{ "path": "../src/plugins/data/tsconfig.json" },
{ "path": "../src/plugins/dev_tools/tsconfig.json" },
{ "path": "../src/plugins/embeddable/tsconfig.json" },
+ { "path": "../src/plugins/es_ui_shared/tsconfig.json" },
{ "path": "../src/plugins/expressions/tsconfig.json" },
{ "path": "../src/plugins/home/tsconfig.json" },
{ "path": "../src/plugins/inspector/tsconfig.json" },
@@ -42,6 +50,7 @@
{ "path": "../src/plugins/navigation/tsconfig.json" },
{ "path": "../src/plugins/newsfeed/tsconfig.json" },
{ "path": "../src/plugins/saved_objects/tsconfig.json" },
+ { "path": "../src/plugins/saved_objects_management/tsconfig.json" },
{ "path": "../src/plugins/saved_objects_tagging_oss/tsconfig.json" },
{ "path": "../src/plugins/presentation_util/tsconfig.json" },
{ "path": "../src/plugins/security_oss/tsconfig.json" },
@@ -53,15 +62,20 @@
{ "path": "../src/plugins/url_forwarding/tsconfig.json" },
{ "path": "../src/plugins/usage_collection/tsconfig.json" },
+ { "path": "./plugins/console_extensions/tsconfig.json" },
{ "path": "./plugins/data_enhanced/tsconfig.json" },
+ { "path": "./plugins/discover_enhanced/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
+ { "path": "./plugins/global_search_providers/tsconfig.json" },
{ "path": "./plugins/features/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/embeddable_enhanced/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
+ { "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
+ { "path": "./plugins/ui_actions_enhanced/tsconfig.json" },
+ { "path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json" },
{ "path": "./plugins/translations/tsconfig.json" },
- { "path": "./plugins/ui_actions_enhanced/tsconfig.json" }
]
}
diff --git a/x-pack/tsconfig.refs.json b/x-pack/tsconfig.refs.json
index 28f77a82f415e..08c81d5f3b802 100644
--- a/x-pack/tsconfig.refs.json
+++ b/x-pack/tsconfig.refs.json
@@ -3,14 +3,19 @@
"references": [
{ "path": "./plugins/dashboard_enhanced/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
+ { "path": "./plugins/console_extensions/tsconfig.json" },
+ { "path": "./plugins/discover_enhanced/tsconfig.json" },
{ "path": "./plugins/data_enhanced/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
+ { "path": "./plugins/global_search_providers/tsconfig.json" },
{ "path": "./plugins/features/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/embeddable_enhanced/tsconfig.json" },
+ { "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
+ { "path": "./plugins/ui_actions_enhanced/tsconfig.json" },
+ { "path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json" },
{ "path": "./plugins/translations/tsconfig.json" },
- { "path": "./plugins/ui_actions_enhanced/tsconfig.json" }
]
}
diff --git a/yarn.lock b/yarn.lock
index 02bd107ea0e65..5a39eacf3e68b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1773,13 +1773,6 @@
"@hapi/boom" "9.x.x"
"@hapi/hoek" "9.x.x"
-"@hapi/address@^4.1.0":
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.1.0.tgz#d60c5c0d930e77456fdcde2598e77302e2955e1d"
- integrity sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==
- dependencies:
- "@hapi/hoek" "^9.0.0"
-
"@hapi/ammo@5.x.x", "@hapi/ammo@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@hapi/ammo/-/ammo-5.0.1.tgz#9d34560f5c214eda563d838c01297387efaab490"
@@ -1869,11 +1862,6 @@
resolved "https://registry.yarnpkg.com/@hapi/file/-/file-2.0.0.tgz#2ecda37d1ae9d3078a67c13b7da86e8c3237dfb9"
integrity sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==
-"@hapi/formula@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-2.0.0.tgz#edade0619ed58c8e4f164f233cda70211e787128"
- integrity sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==
-
"@hapi/good-squeeze@6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@hapi/good-squeeze/-/good-squeeze-6.0.0.tgz#bb72d6869cd7398b615a6b7270f630dc4f76aebf"
@@ -1987,11 +1975,6 @@
"@hapi/hoek" "9.x.x"
"@hapi/nigel" "4.x.x"
-"@hapi/pinpoint@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-2.0.0.tgz#805b40d4dbec04fc116a73089494e00f073de8df"
- integrity sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==
-
"@hapi/podium@4.x.x", "@hapi/podium@^4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@hapi/podium/-/podium-4.1.1.tgz#106e5849f2cb19b8767cc16007e0107f27c3c791"
@@ -3205,22 +3188,22 @@
jsonwebtoken "^8.3.0"
lru-cache "^5.1.1"
-"@octokit/auth-token@^2.4.0":
- version "2.4.2"
- resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a"
- integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==
+"@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4":
+ version "2.4.4"
+ resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56"
+ integrity sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q==
dependencies:
- "@octokit/types" "^5.0.0"
+ "@octokit/types" "^6.0.0"
-"@octokit/core@^3.0.0":
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc"
- integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw==
+"@octokit/core@^3.2.3":
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.4.tgz#5791256057a962eca972e31818f02454897fd106"
+ integrity sha512-d9dTsqdePBqOn7aGkyRFe7pQpCXdibSJ5SFnrTr0axevObZrpz3qkWm7t/NjYv5a66z6vhfteriaq4FRz3e0Qg==
dependencies:
- "@octokit/auth-token" "^2.4.0"
- "@octokit/graphql" "^4.3.1"
- "@octokit/request" "^5.4.0"
- "@octokit/types" "^5.0.0"
+ "@octokit/auth-token" "^2.4.4"
+ "@octokit/graphql" "^4.5.8"
+ "@octokit/request" "^5.4.12"
+ "@octokit/types" "^6.0.3"
before-after-hook "^2.1.0"
universal-user-agent "^6.0.0"
@@ -3243,15 +3226,20 @@
is-plain-object "^5.0.0"
universal-user-agent "^6.0.0"
-"@octokit/graphql@^4.3.1":
- version "4.5.6"
- resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.6.tgz#708143ba15cf7c1879ed6188266e7f270be805d4"
- integrity sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg==
+"@octokit/graphql@^4.5.8":
+ version "4.5.8"
+ resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.8.tgz#d42373633c3015d0eafce64a8ce196be167fdd9b"
+ integrity sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA==
dependencies:
"@octokit/request" "^5.3.0"
- "@octokit/types" "^5.0.0"
+ "@octokit/types" "^6.0.0"
universal-user-agent "^6.0.0"
+"@octokit/openapi-types@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.2.0.tgz#123e0438a0bc718ccdac3b5a2e69b3dd00daa85b"
+ integrity sha512-274lNUDonw10kT8wHg8fCcUc1ZjZHbWv0/TbAwb0ojhBQqZYc1cQ/4yqTVTtPMDeZ//g7xVEYe/s3vURkRghPg==
+
"@octokit/plugin-paginate-rest@^1.1.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc"
@@ -3259,17 +3247,17 @@
dependencies:
"@octokit/types" "^2.0.1"
-"@octokit/plugin-paginate-rest@^2.2.0":
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz#92f951ddc8a1cd505353fa07650752ca25ed7e93"
- integrity sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg==
+"@octokit/plugin-paginate-rest@^2.6.2":
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.0.tgz#6bb7b043c246e0654119a6ec4e72a172c9e2c7f3"
+ integrity sha512-+zARyncLjt9b0FjqPAbJo4ss7HOlBi1nprq+cPlw5vu2+qjy7WvlXhtXFdRHQbSL1Pt+bfAKaLADEkkvg8sP8w==
dependencies:
- "@octokit/types" "^5.5.0"
+ "@octokit/types" "^6.0.1"
-"@octokit/plugin-request-log@^1.0.0":
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e"
- integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==
+"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44"
+ integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==
"@octokit/plugin-rest-endpoint-methods@2.4.0":
version "2.4.0"
@@ -3279,12 +3267,12 @@
"@octokit/types" "^2.0.1"
deprecation "^2.3.1"
-"@octokit/plugin-rest-endpoint-methods@4.2.0":
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba"
- integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==
+"@octokit/plugin-rest-endpoint-methods@4.4.1":
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.4.1.tgz#105cf93255432155de078c9efc33bd4e14d1cd63"
+ integrity sha512-+v5PcvrUcDeFXf8hv1gnNvNLdm4C0+2EiuWt9EatjjUmfriM1pTMM+r4j1lLHxeBQ9bVDmbywb11e3KjuavieA==
dependencies:
- "@octokit/types" "^5.5.0"
+ "@octokit/types" "^6.1.0"
deprecation "^2.3.1"
"@octokit/plugin-retry@^2.2.0":
@@ -3324,14 +3312,14 @@
once "^1.4.0"
universal-user-agent "^2.0.1"
-"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.0":
- version "5.4.9"
- resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365"
- integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==
+"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.12":
+ version "5.4.12"
+ resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.12.tgz#b04826fa934670c56b135a81447be2c1723a2ffc"
+ integrity sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg==
dependencies:
"@octokit/endpoint" "^6.0.1"
"@octokit/request-error" "^2.0.0"
- "@octokit/types" "^5.0.0"
+ "@octokit/types" "^6.0.3"
deprecation "^2.0.0"
is-plain-object "^5.0.0"
node-fetch "^2.6.1"
@@ -3378,15 +3366,15 @@
once "^1.4.0"
universal-user-agent "^4.0.0"
-"@octokit/rest@^18.0.6":
- version "18.0.6"
- resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.6.tgz#76c274f1a68f40741a131768ef483f041e7b98b6"
- integrity sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w==
+"@octokit/rest@^18.0.12":
+ version "18.0.12"
+ resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.12.tgz#278bd41358c56d87c201e787e8adc0cac132503a"
+ integrity sha512-hNRCZfKPpeaIjOVuNJzkEL6zacfZlBPV8vw8ReNeyUkVvbuCvvrrx8K8Gw2eyHHsmd4dPlAxIXIZ9oHhJfkJpw==
dependencies:
- "@octokit/core" "^3.0.0"
- "@octokit/plugin-paginate-rest" "^2.2.0"
- "@octokit/plugin-request-log" "^1.0.0"
- "@octokit/plugin-rest-endpoint-methods" "4.2.0"
+ "@octokit/core" "^3.2.3"
+ "@octokit/plugin-paginate-rest" "^2.6.2"
+ "@octokit/plugin-request-log" "^1.0.2"
+ "@octokit/plugin-rest-endpoint-methods" "4.4.1"
"@octokit/types@^2.0.0", "@octokit/types@^2.0.1":
version "2.16.2"
@@ -3395,37 +3383,45 @@
dependencies:
"@types/node" ">= 8"
-"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0":
+"@octokit/types@^5.0.0", "@octokit/types@^5.0.1":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b"
integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==
dependencies:
"@types/node" ">= 8"
-"@percy/agent@^0.26.0":
- version "0.26.0"
- resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.26.0.tgz#9f06849d752df7368198835d0b5edc16c2d69a0c"
- integrity sha512-PKah93vdcmHWlvDd2/QTir4iboqpLAcbAxhUDJYfp8rTzVy5kBstKyPrQk+8IifnGRWNSjsXOO6+qZr+cYHdjA==
+"@octokit/types@^6.0.0", "@octokit/types@^6.0.1", "@octokit/types@^6.0.3", "@octokit/types@^6.1.0":
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.2.1.tgz#7f881fe44475ab1825776a4a59ca1ae082ed1043"
+ integrity sha512-jHs9OECOiZxuEzxMZcXmqrEO8GYraHF+UzNVH2ACYh8e/Y7YoT+hUf9ldvVd6zIvWv4p3NdxbQ0xx3ku5BnSiA==
+ dependencies:
+ "@octokit/openapi-types" "^2.2.0"
+ "@types/node" ">= 8"
+
+"@percy/agent@^0.28.6":
+ version "0.28.6"
+ resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.28.6.tgz#b220fab6ddcf63ae4e6c343108ba6955a772ce1c"
+ integrity sha512-SDAyBiUmfQMVTayjvEjQ0IJIA7Y3AoeyWn0jmUxNOMRRIJWo4lQJghfhFCgzCkhXDCm67NMN2nAQAsvXrlIdkQ==
dependencies:
"@oclif/command" "1.5.19"
"@oclif/config" "^1"
"@oclif/plugin-help" "^2"
"@oclif/plugin-not-found" "^1.2"
- axios "^0.19.0"
+ axios "^0.21.1"
body-parser "^1.18.3"
colors "^1.3.2"
cors "^2.8.4"
cosmiconfig "^5.2.1"
- cross-spawn "^6.0.5"
+ cross-spawn "^7.0.2"
deepmerge "^4.0.0"
express "^4.16.3"
- follow-redirects "1.9.0"
+ follow-redirects "1.12.1"
generic-pool "^3.7.1"
globby "^10.0.1"
image-size "^0.8.2"
js-yaml "^3.13.1"
percy-client "^3.2.0"
- puppeteer "^2.0.0"
+ puppeteer "^5.3.1"
retry-axios "^1.0.1"
which "^2.0.1"
winston "^3.0.0"
@@ -3510,6 +3506,23 @@
dependencies:
url-pattern "^1.0.3"
+"@sideway/address@^4.1.0":
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.0.tgz#0b301ada10ac4e0e3fa525c90615e0b61a72b78d"
+ integrity sha512-wAH/JYRXeIFQRsxerIuLjgUu2Xszam+O5xKeatJ4oudShOOirfmsQ1D6LL54XOU2tizpCYku+s1wmU0SYdpoSA==
+ dependencies:
+ "@hapi/hoek" "^9.0.0"
+
+"@sideway/formula@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c"
+ integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==
+
+"@sideway/pinpoint@^2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df"
+ integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==
+
"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
@@ -3556,19 +3569,19 @@
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
-"@slack/types@^1.0.0":
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/@slack/types/-/types-1.0.0.tgz#1dc7a63b293c4911e474197585c3feda012df17a"
- integrity sha512-IktC4uD/CHfLQcSitKSmjmRu4a6+Nf/KzfS6dTgUlDzENhh26l8aESKAuIpvYD5VOOE6NxDDIAdPJOXBvUGxlg==
+"@slack/types@^1.2.1":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@slack/types/-/types-1.9.0.tgz#aa8f90b2f66ac54a77e42606644366f93cff4871"
+ integrity sha512-RmwgMWqOtzd2JPXdiaD/tyrDD0vtjjRDFdxN1I3tAxwBbg4aryzDUVqFc8na16A+3Xik/UN8X1hvVTw8J4EB9w==
-"@slack/webhook@^5.0.0":
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/@slack/webhook/-/webhook-5.0.0.tgz#0044a3940afc16cbc607c71acdffddb9e9d4f161"
- integrity sha512-cDj3kz3x9z9271xPNzlwb90DpKTYybG2OWPJHigJL8FegR80rzQyD0v4bGuStGGkHbAYDKE2BMpJambR55hnSg==
+"@slack/webhook@^5.0.4":
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/@slack/webhook/-/webhook-5.0.4.tgz#5d3e947387c1d0ccb176a153cec68c594edb7060"
+ integrity sha512-IC1dpVSc2F/pmwCxOb0QzH2xnGKmyT7MofPGhNkeaoiMrLMU+Oc7xV/AxGnz40mURtCtaDchZSM3tDo9c9x6BA==
dependencies:
- "@slack/types" "^1.0.0"
+ "@slack/types" "^1.2.1"
"@types/node" ">=8.9.0"
- axios "^0.18.0"
+ axios "^0.21.1"
"@storybook/addon-a11y@^6.0.26":
version "6.0.26"
@@ -7642,20 +7655,12 @@ axe-core@^4.0.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.0.2.tgz#c7cf7378378a51fcd272d3c09668002a4990b1cb"
integrity sha512-arU1h31OGFu+LPrOLGZ7nB45v940NMDMEJeNmbutu57P+UFDVnkZg3e+J1I2HJRZ9hT7gO8J91dn/PMrAiKakA==
-axios@^0.18.0:
- version "0.18.1"
- resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3"
- integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==
+axios@^0.21.0, axios@^0.21.1:
+ version "0.21.1"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
+ integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
- follow-redirects "1.5.10"
- is-buffer "^2.0.2"
-
-axios@^0.19.0, axios@^0.19.2:
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
- integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
- dependencies:
- follow-redirects "1.5.10"
+ follow-redirects "^1.10.0"
axobject-query@^2.0.2:
version "2.0.2"
@@ -8189,17 +8194,17 @@ bach@^1.0.0:
async-settle "^1.0.0"
now-and-later "^2.0.0"
-backport@5.6.0:
- version "5.6.0"
- resolved "https://registry.yarnpkg.com/backport/-/backport-5.6.0.tgz#6dcc0485e5eecf66bb6f950983fd0b018217ec20"
- integrity sha512-wz7Ve3uslhGUMtHuctqIEtZFItTGKRRMiNANYso0iw1ar81ILsczDGgxeOlzmmnIQFi1ZvEs6lX3cgypGfef9A==
+backport@^5.6.1:
+ version "5.6.4"
+ resolved "https://registry.yarnpkg.com/backport/-/backport-5.6.4.tgz#8cf4bc750b26d27161306858ee9069218ad7cdfd"
+ integrity sha512-ZhuZcGxOBHBXFBCwweVf02b+KhWe0tdgg71jPSl583YYxlru+JBRH+TFM8S0J6/6YUuTWO81M9funjehJ18jqg==
dependencies:
- "@octokit/rest" "^18.0.6"
+ "@octokit/rest" "^18.0.12"
"@types/lodash.difference" "^4.5.6"
"@types/lodash.intersection" "^4.4.6"
- axios "^0.19.0"
+ axios "^0.21.1"
dedent "^0.7.0"
- del "^5.1.0"
+ del "^6.0.0"
find-up "^5.0.0"
inquirer "^7.3.3"
lodash.difference "^4.5.0"
@@ -8209,11 +8214,11 @@ backport@5.6.0:
lodash.isstring "^4.0.1"
lodash.uniq "^4.5.0"
make-dir "^3.1.0"
- ora "^5.1.0"
+ ora "^5.2.0"
safe-json-stringify "^1.2.0"
strip-json-comments "^3.1.1"
winston "^3.3.3"
- yargs "^16.0.3"
+ yargs "^16.2.0"
bail@^1.0.0:
version "1.0.2"
@@ -9409,17 +9414,18 @@ chrome-trace-event@^1.0.2:
dependencies:
tslib "^1.9.0"
-chromedriver@^87.0.0:
- version "87.0.0"
- resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.0.tgz#e8390deed8ada791719a67ad6bf1116614f1ba2d"
- integrity sha512-PY7FnHOQKfH0oPfSdhpLx5nEy5g4dGYySf2C/WZGkAaCaldYH8/3lPPucZ8MlOCi4bCSGoKoCUTeG6+wYWavvw==
+chromedriver@^87.0.3:
+ version "87.0.5"
+ resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.5.tgz#5a56bae6e23fc5eaa0c5ac3b76f936e4dd0989a1"
+ integrity sha512-bWAKdZANrt3LXMUOKFP+DgW7DjVKfihCbjej6URkUcKsvbQBDYpf5YY5d/dXE3SOSzIFZ7fmLxogusxpsupCJg==
dependencies:
"@testim/chrome-version" "^1.0.7"
- axios "^0.19.2"
- del "^5.1.0"
+ axios "^0.21.0"
+ del "^6.0.0"
extract-zip "^2.0.1"
https-proxy-agent "^5.0.0"
mkdirp "^1.0.4"
+ proxy-from-env "^1.1.0"
tcp-port-used "^1.0.1"
ci-info@^2.0.0:
@@ -9512,10 +9518,10 @@ cli-cursor@^3.1.0:
dependencies:
restore-cursor "^3.1.0"
-cli-spinners@^2.2.0, cli-spinners@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f"
- integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
+cli-spinners@^2.2.0, cli-spinners@^2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047"
+ integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==
cli-table3@0.6.0, cli-table3@~0.6.0:
version "0.6.0"
@@ -9624,10 +9630,10 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"
-cliui@^7.0.0:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.1.tgz#a4cb67aad45cd83d8d05128fc9f4d8fbb887e6b3"
- integrity sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==
+cliui@^7.0.0, cliui@^7.0.2:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.2.tgz#e3a412e1d5ec0ccbe50d1b4120fc8164e97881f4"
+ integrity sha512-lhpKkuUj67j5JgZIPZxLe7nSa4MQoojzRVWQyzMqBp2hBg6gwRjUDAwC1YDeBaC3APDBKNnjWbv2mlDF4XgOSA==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
@@ -10441,7 +10447,7 @@ cross-fetch@2.2.2:
node-fetch "2.1.2"
whatwg-fetch "2.0.4"
-cross-spawn@7.0.1, cross-spawn@^7.0.0:
+cross-spawn@7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14"
integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==
@@ -10469,6 +10475,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"
+cross-spawn@^7.0.0, cross-spawn@^7.0.2:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
crypt@~0.0.1:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
@@ -11226,7 +11241,7 @@ debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.
dependencies:
ms "2.0.0"
-debug@3.1.0, debug@=3.1.0:
+debug@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
@@ -11503,6 +11518,20 @@ del@^5.1.0:
rimraf "^3.0.0"
slash "^3.0.0"
+del@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952"
+ integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==
+ dependencies:
+ globby "^11.0.1"
+ graceful-fs "^4.2.4"
+ is-glob "^4.0.1"
+ is-path-cwd "^2.2.0"
+ is-path-inside "^3.0.2"
+ p-map "^4.0.0"
+ rimraf "^3.0.2"
+ slash "^3.0.0"
+
delaunator@4:
version "4.0.1"
resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-4.0.1.tgz#3d779687f57919a7a418f8ab947d3bddb6846957"
@@ -11659,6 +11688,11 @@ devtools-protocol@0.0.809251:
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.809251.tgz#300b3366be107d5c46114ecb85274173e3999518"
integrity sha512-pf+2OY6ghMDPjKkzSWxHMq+McD+9Ojmq5XVRYpv/kPd9sTMQxzEt21592a31API8qRjro0iYYOc3ag46qF/1FA==
+devtools-protocol@0.0.818844:
+ version "0.0.818844"
+ resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e"
+ integrity sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==
+
dezalgo@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456"
@@ -12620,10 +12654,10 @@ es6-weak-map@^2.0.1, es6-weak-map@^2.0.2:
es6-iterator "^2.0.1"
es6-symbol "^3.1.1"
-escalade@^3.0.2, escalade@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e"
- integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==
+escalade@^3.0.2, escalade@^3.1.0, escalade@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
escape-goat@^2.0.0:
version "2.1.1"
@@ -13348,7 +13382,7 @@ extract-stack@^1.0.0:
resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa"
integrity sha1-uXrK+UQe6iMyUpYktzL8WhyBZfo=
-extract-zip@1.7.0, extract-zip@^1.6.6, extract-zip@^1.7.0:
+extract-zip@1.7.0, extract-zip@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927"
integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==
@@ -13872,19 +13906,15 @@ folktale@2.3.2:
resolved "https://registry.yarnpkg.com/folktale/-/folktale-2.3.2.tgz#38231b039e5ef36989920cbf805bf6b227bf4fd4"
integrity sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ==
-follow-redirects@1.5.10:
- version "1.5.10"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
- integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
- dependencies:
- debug "=3.1.0"
+follow-redirects@1.12.1:
+ version "1.12.1"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6"
+ integrity sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==
-follow-redirects@1.9.0, follow-redirects@^1.0.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f"
- integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==
- dependencies:
- debug "^3.0.0"
+follow-redirects@^1.0.0, follow-redirects@^1.10.0:
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"
+ integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==
font-awesome@4.7.0:
version "4.7.0"
@@ -16557,7 +16587,7 @@ is-buffer@^1.0.2, is-buffer@^1.1.0, is-buffer@^1.1.4, is-buffer@^1.1.5, is-buffe
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-buffer@^2.0.0, is-buffer@^2.0.2, is-buffer@~2.0.3:
+is-buffer@^2.0.0, is-buffer@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725"
integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==
@@ -17946,16 +17976,16 @@ joi@13.x.x, joi@^13.5.2:
isemail "3.x.x"
topo "3.x.x"
-joi@^17.1.1:
- version "17.2.1"
- resolved "https://registry.yarnpkg.com/joi/-/joi-17.2.1.tgz#e5140fdf07e8fecf9bc977c2832d1bdb1e3f2a0a"
- integrity sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA==
+joi@^17.3.0:
+ version "17.3.0"
+ resolved "https://registry.yarnpkg.com/joi/-/joi-17.3.0.tgz#f1be4a6ce29bc1716665819ac361dfa139fff5d2"
+ integrity sha512-Qh5gdU6niuYbUIUV5ejbsMiiFmBdw8Kcp8Buj2JntszCkCfxJ9Cz76OtHxOZMPXrt5810iDIXs+n1nNVoquHgg==
dependencies:
- "@hapi/address" "^4.1.0"
- "@hapi/formula" "^2.0.0"
"@hapi/hoek" "^9.0.0"
- "@hapi/pinpoint" "^2.0.0"
"@hapi/topo" "^5.0.0"
+ "@sideway/address" "^4.1.0"
+ "@sideway/formula" "^3.0.0"
+ "@sideway/pinpoint" "^2.0.0"
jpeg-js@0.0.4:
version "0.0.4"
@@ -19827,7 +19857,7 @@ mime-db@1.44.0, mime-db@1.x.x, "mime-db@>= 1.40.0 < 2":
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
-mime-types@^2.0.1, mime-types@^2.1.12, mime-types@^2.1.25, mime-types@^2.1.26, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24:
+mime-types@^2.0.1, mime-types@^2.1.12, mime-types@^2.1.26, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24:
version "2.1.27"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
@@ -19839,7 +19869,7 @@ mime@1.6.0, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1:
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
-mime@^2.0.3, mime@^2.4.4:
+mime@^2.4.4:
version "2.4.6"
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1"
integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==
@@ -21293,17 +21323,17 @@ ora@^4.0.3, ora@^4.0.4:
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
-ora@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8"
- integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==
+ora@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/ora/-/ora-5.2.0.tgz#de10bfd2d15514384af45f3fa9d9b1aaf344fda1"
+ integrity sha512-+wG2v8TUU8EgzPHun1k/n45pXquQ9fHnbXVetl9rRgO6kjZszGGbraF3XPTIdgeA+s1lbRjSEftAnyT0w8ZMvQ==
dependencies:
+ bl "^4.0.3"
chalk "^4.1.0"
cli-cursor "^3.1.0"
- cli-spinners "^2.4.0"
+ cli-spinners "^2.5.0"
is-interactive "^1.0.0"
log-symbols "^4.0.0"
- mute-stream "0.0.8"
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
@@ -22568,11 +22598,16 @@ proxy-addr@~2.0.5:
forwarded "~0.1.2"
ipaddr.js "1.9.0"
-proxy-from-env@1.0.0, proxy-from-env@^1.0.0:
+proxy-from-env@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=
+proxy-from-env@^1.0.0, proxy-from-env@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
+ integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
+
proxyquire@1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/proxyquire/-/proxyquire-1.8.0.tgz#02d514a5bed986f04cbb2093af16741535f79edc"
@@ -22665,21 +22700,23 @@ pupa@^2.0.1:
dependencies:
escape-goat "^2.0.0"
-puppeteer@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-2.1.1.tgz#ccde47c2a688f131883b50f2d697bd25189da27e"
- integrity sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==
+puppeteer@^5.3.1:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.5.0.tgz#331a7edd212ca06b4a556156435f58cbae08af00"
+ integrity sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg==
dependencies:
- "@types/mime-types" "^2.1.0"
debug "^4.1.0"
- extract-zip "^1.6.6"
+ devtools-protocol "0.0.818844"
+ extract-zip "^2.0.0"
https-proxy-agent "^4.0.0"
- mime "^2.0.3"
- mime-types "^2.1.25"
+ node-fetch "^2.6.1"
+ pkg-dir "^4.2.0"
progress "^2.0.1"
proxy-from-env "^1.0.0"
- rimraf "^2.6.1"
- ws "^6.1.0"
+ rimraf "^3.0.2"
+ tar-fs "^2.0.0"
+ unbzip2-stream "^1.3.3"
+ ws "^7.2.3"
"puppeteer@npm:@elastic/puppeteer@5.4.1-patch.1":
version "5.4.1-patch.1"
@@ -24656,7 +24693,7 @@ right-align@^0.1.1:
dependencies:
align-text "^0.1.1"
-rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
+rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
@@ -24816,10 +24853,10 @@ rxjs-marbles@^5.0.6:
dependencies:
fast-equals "^2.0.0"
-rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.5.3, rxjs@^6.5.5, rxjs@^6.6.0:
- version "6.6.2"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2"
- integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==
+rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.5.3, rxjs@^6.5.5, rxjs@^6.6.0, rxjs@^6.6.3:
+ version "6.6.3"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
+ integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
dependencies:
tslib "^1.9.0"
@@ -29037,16 +29074,16 @@ w3c-xmlserializer@^2.0.0:
dependencies:
xml-name-validator "^3.0.0"
-wait-on@^5.0.1:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.2.0.tgz#6711e74422523279714a36d52cf49fb47c9d9597"
- integrity sha512-U1D9PBgGw2XFc6iZqn45VBubw02VsLwnZWteQ1au4hUVHasTZuFSKRzlTB2dqgLhji16YVI8fgpEpwUdCr8B6g==
+wait-on@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.2.1.tgz#05b66fcb4d7f5da01537f03e7cf96e8836422996"
+ integrity sha512-H2F986kNWMU9hKlI9l/ppO6tN8ZSJd35yBljMLa1/vjzWP++Qh6aXyt77/u7ySJFZQqBtQxnvm/xgG48AObXcw==
dependencies:
- axios "^0.19.2"
- joi "^17.1.1"
- lodash "^4.17.19"
+ axios "^0.21.1"
+ joi "^17.3.0"
+ lodash "^4.17.20"
minimist "^1.2.5"
- rxjs "^6.5.5"
+ rxjs "^6.6.3"
walk@^2.3.14:
version "2.3.14"
@@ -29646,7 +29683,7 @@ write@^0.2.1:
dependencies:
mkdirp "^0.5.1"
-ws@^6.1.0, ws@^6.1.2, ws@^6.2.1:
+ws@^6.1.2, ws@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"
integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==
@@ -29769,7 +29806,7 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
-y18n@^5.0.1:
+y18n@^5.0.1, y18n@^5.0.5:
version "5.0.5"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
@@ -29818,10 +29855,10 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"
-yargs-parser@^20.0.0:
- version "20.2.0"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.0.tgz#944791ca2be2e08ddadd3d87e9de4c6484338605"
- integrity sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A==
+yargs-parser@^20.0.0, yargs-parser@^20.2.2:
+ version "20.2.2"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.2.tgz#84562c6b1c41ccec2f13d346c7dd83f8d1a0dc70"
+ integrity sha512-XmrpXaTl6noDsf1dKpBuUNCOHqjs0g3jRMXf/ztRxdOmb+er8kE5z5b55Lz3p5u2T8KJ59ENBnASS8/iapVJ5g==
yargs-unparser@1.6.0:
version "1.6.0"
@@ -29865,18 +29902,18 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"
-yargs@^16.0.3, yargs@~16.0.3:
- version "16.0.3"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c"
- integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==
+yargs@^16.0.3, yargs@^16.2.0:
+ version "16.2.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
+ integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
dependencies:
- cliui "^7.0.0"
- escalade "^3.0.2"
+ cliui "^7.0.2"
+ escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
- y18n "^5.0.1"
- yargs-parser "^20.0.0"
+ y18n "^5.0.5"
+ yargs-parser "^20.2.2"
yargs@^3.15.0:
version "3.32.0"
@@ -29910,6 +29947,19 @@ yargs@^7.1.0:
y18n "^3.2.1"
yargs-parser "5.0.0-security.0"
+yargs@~16.0.3:
+ version "16.0.3"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c"
+ integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==
+ dependencies:
+ cliui "^7.0.0"
+ escalade "^3.0.2"
+ get-caller-file "^2.0.5"
+ require-directory "^2.1.1"
+ string-width "^4.2.0"
+ y18n "^5.0.1"
+ yargs-parser "^20.0.0"
+
yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"