Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into feat/alert-ac…
Browse files Browse the repository at this point in the history
…tions-timeline
  • Loading branch information
patrykkopycinski committed Aug 29, 2020
2 parents 107faf7 + 1e20cd4 commit a819ae8
Show file tree
Hide file tree
Showing 83 changed files with 1,333 additions and 688 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,7 @@ module.exports = {
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
},
{
target: [
'(src|x-pack)/plugins/*/server/**/*',
'!x-pack/plugins/apm/**/*', // https://github.com/elastic/kibana/issues/67210
],
target: ['(src|x-pack)/plugins/*/server/**/*'],
from: ['(src|x-pack)/plugins/*/public/**/*'],
errorMessage: `Server code can not import from public, use a common directory.`,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ACTION\_GLOBAL\_APPLY\_FILTER](./kibana-plugin-plugins-data-public.action_global_apply_filter.md)

## ACTION\_GLOBAL\_APPLY\_FILTER variable

<b>Signature:</b>

```typescript
ACTION_GLOBAL_APPLY_FILTER = "ACTION_GLOBAL_APPLY_FILTER"
```
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@

| Variable | Description |
| --- | --- |
| [ACTION\_GLOBAL\_APPLY\_FILTER](./kibana-plugin-plugins-data-public.action_global_apply_filter.md) | |
| [AggGroupLabels](./kibana-plugin-plugins-data-public.agggrouplabels.md) | |
| [AggGroupNames](./kibana-plugin-plugins-data-public.agggroupnames.md) | |
| [baseFormattersPublic](./kibana-plugin-plugins-data-public.baseformatterspublic.md) | |
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export {

export { isTimeRange, isQuery, isFilter, isFilters } from '../common';

export { ApplyGlobalFilterActionContext } from './actions';
export { ACTION_GLOBAL_APPLY_FILTER, ApplyGlobalFilterActionContext } from './actions';

export * from '../common/field_mapping';

Expand Down
5 changes: 5 additions & 0 deletions src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ import { UnregisterCallback } from 'history';
import { UnwrapPromiseOrReturn } from '@kbn/utility-types';
import { UserProvidedValues } from 'src/core/server/types';

// Warning: (ae-missing-release-tag) "ACTION_GLOBAL_APPLY_FILTER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ACTION_GLOBAL_APPLY_FILTER = "ACTION_GLOBAL_APPLY_FILTER";

// Warning: (ae-forgotten-export) The symbol "AggConfigSerialized" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "AggConfigOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
Expand Down
14 changes: 14 additions & 0 deletions x-pack/plugins/apm/common/fetch_options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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 { HttpFetchOptions } from 'kibana/public';

export type FetchOptions = Omit<HttpFetchOptions, 'body'> & {
pathname: string;
isCachable?: boolean;
method?: string;
body?: any;
};
3 changes: 2 additions & 1 deletion x-pack/plugins/apm/public/hooks/useCallApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
*/

import { useMemo } from 'react';
import { callApi, FetchOptions } from '../services/rest/callApi';
import { callApi } from '../services/rest/callApi';
import { useApmPluginContext } from './useApmPluginContext';
import { FetchOptions } from '../../common/fetch_options';

export function useCallApi() {
const { http } = useApmPluginContext().core;
Expand Down
10 changes: 2 additions & 8 deletions x-pack/plugins/apm/public/services/rest/callApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { HttpSetup } from 'kibana/public';
import { isString, startsWith } from 'lodash';
import LRU from 'lru-cache';
import hash from 'object-hash';
import { HttpSetup, HttpFetchOptions } from 'kibana/public';

export type FetchOptions = Omit<HttpFetchOptions, 'body'> & {
pathname: string;
isCachable?: boolean;
method?: string;
body?: any;
};
import { FetchOptions } from '../../../common/fetch_options';

function fetchOptionsWithDebug(fetchOptions: FetchOptions) {
const debugEnabled =
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/apm/public/services/rest/createCallApmApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { HttpSetup } from 'kibana/public';
import { callApi, FetchOptions } from './callApi';
import { FetchOptions } from '../../../common/fetch_options';
import { callApi } from './callApi';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { APMAPI } from '../../../server/routes/create_apm_api';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getAllEnvironments } from './get_all_environments';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('getAllEnvironments', () => {
let mock: SearchParamsMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getErrorDistribution } from './get_distribution';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';

describe('error distribution queries', () => {
let mock: SearchParamsMock;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/errors/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getErrorGroups } from './get_error_groups';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('error queries', () => {
let mock: SearchParamsMock;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/metrics/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getThreadCountChart } from './by_agent/java/thread_count';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';
import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes';

describe('metrics queries', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { rangeFilter } from '../../../common/utils/range_filter';
import { Coordinates } from '../../../../observability/public';
import { Coordinates } from '../../../../observability/typings/common';
import { Setup, SetupTimeRange } from '../helpers/setup_request';
import { ProcessorEvent } from '../../../common/processor_event';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/rum_client/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';
import { getClientMetrics } from './get_client_metrics';
import { getPageViewTrends } from './get_page_view_trends';
import { getPageLoadDistribution } from './get_page_load_distribution';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getServiceNodes } from './';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';
import { getServiceNodeMetadata } from '../services/get_service_node_metadata';
import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getDerivedServiceAnnotations } from './get_derived_service_annotations'
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';
import noVersions from './__fixtures__/no_versions.json';
import oneVersion from './__fixtures__/one_version.json';
import multipleVersions from './__fixtures__/multiple_versions.json';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/services/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { hasHistoricalAgentData } from './get_services/has_historical_agent_data
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('services queries', () => {
let mock: SearchParamsMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { searchConfigurations } from './search_configurations';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';
import { findExactConfiguration } from './find_exact_configuration';

describe('agent configuration queries', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { Setup } from '../../helpers/setup_request';
import { mockNow } from '../../../../public/utils/testHelpers';
import { mockNow } from '../../../utils/test_helpers';
import { CustomLink } from '../../../../common/custom_link/custom_link_types';
import { createOrUpdateCustomLink } from './create_or_update_custom_link';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {
inspectSearchParams,
SearchParamsMock,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';
import { getTransaction } from './get_transaction';
import { Setup } from '../../helpers/setup_request';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { listCustomLinks } from './list_custom_links';
import {
inspectSearchParams,
SearchParamsMock,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';
import { Setup } from '../../helpers/setup_request';
import {
SERVICE_NAME,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/traces/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getTraceItems } from './get_trace_items';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('trace queries', () => {
let mock: SearchParamsMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { transactionGroupsFetcher } from './fetcher';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('transaction group queries', () => {
let mock: SearchParamsMock;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/transactions/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getTransaction } from './get_transaction';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { loggerMock } from '../../../../../../src/core/server/logging/logger.mock';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getLocalUIFilters } from './';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../../public/utils/testHelpers';
} from '../../../utils/test_helpers';
import { getServicesProjection } from '../../../projections/services';

describe('local ui filter queries', () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/lib/ui_filters/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getEnvironments } from './get_environments';
import {
SearchParamsMock,
inspectSearchParams,
} from '../../../public/utils/testHelpers';
} from '../../utils/test_helpers';

describe('ui filter queries', () => {
let mock: SearchParamsMock;
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/apm/server/routes/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import { PickByValue, Optional } from 'utility-types';
import { Observable } from 'rxjs';
import { Server } from 'hapi';
import { ObservabilityPluginSetup } from '../../../observability/server';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { FetchOptions } from '../../public/services/rest/callApi';
import { SecurityPluginSetup } from '../../../security/server';
import { MlPluginSetup } from '../../../ml/server';
import { FetchOptions } from '../../common/fetch_options';
import { APMConfig } from '..';

export interface Params {
Expand Down
Loading

0 comments on commit a819ae8

Please sign in to comment.