Skip to content

Commit 58d7c0b

Browse files
Merge branch '7.x' into backport/7.x/pr-76140
2 parents b8254d9 + f6c23b3 commit 58d7c0b

File tree

143 files changed

+2795
-917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2795
-917
lines changed

.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,7 @@ module.exports = {
302302
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
303303
},
304304
{
305-
target: [
306-
'(src|x-pack)/plugins/*/server/**/*',
307-
'!x-pack/plugins/apm/**/*', // https://github.com/elastic/kibana/issues/67210
308-
],
305+
target: ['(src|x-pack)/plugins/*/server/**/*'],
309306
from: ['(src|x-pack)/plugins/*/public/**/*'],
310307
errorMessage: `Server code can not import from public, use a common directory.`,
311308
},

docs/developer/best-practices/index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ guidelines]
4848
* Write all new code on
4949
{kib-repo}blob/{branch}/src/core/README.md[the
5050
platform], and following
51-
{kib-repo}blob/{branch}/src/core/CONVENTIONS.md[conventions]
51+
{kib-repo}blob/{branch}/src/core/CONVENTIONS.md[conventions].
5252
* _Always_ use the `SavedObjectClient` for reading and writing Saved
5353
Objects.
5454
* Add `README`s to all your plugins and services.

docs/developer/best-practices/stability.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ storeinSessions?)
5252
[discrete]
5353
=== Browser coverage
5454

55-
Refer to the list of browsers and OS {kib} supports
55+
Refer to the list of browsers and OS {kib} supports:
5656
https://www.elastic.co/support/matrix
5757

5858
Does the feature work efficiently on the list of supported browsers?
5959

6060
[discrete]
61-
=== Upgrade Scenarios - Migration scenarios-
61+
=== Upgrade and Migration scenarios
6262

63-
Does the feature affect old
64-
indices, saved objects ? - Has the feature been tested with {kib}
65-
aliases - Read/Write privileges of the indices before and after the
63+
* Does the feature affect old indices or saved objects?
64+
* Has the feature been tested with {kib} aliases?
65+
* Read/Write privileges of the indices before and after the
6666
upgrade?

docs/developer/getting-started/building-kibana.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[building-kibana]]
22
== Building a {kib} distributable
33

4-
The following commands will build a {kib} production distributable.
4+
The following command will build a {kib} production distributable:
55

66
[source,bash]
77
----
@@ -36,4 +36,4 @@ To specify a package to build you can add `rpm` or `deb` as an argument.
3636
yarn build --rpm
3737
----
3838

39-
Distributable packages can be found in `target/` after the build completes.
39+
Distributable packages can be found in `target/` after the build completes.

docs/developer/getting-started/index.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ____
4949

5050
(You can also run `yarn kbn` to see the other available commands. For
5151
more info about this tool, see
52-
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}packages/kbn-pm].)
52+
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm].)
5353

5454
When switching branches which use different versions of npm packages you
5555
may need to run:
@@ -137,4 +137,4 @@ include::debugging.asciidoc[leveloffset=+1]
137137

138138
include::building-kibana.asciidoc[leveloffset=+1]
139139

140-
include::development-plugin-resources.asciidoc[leveloffset=+1]
140+
include::development-plugin-resources.asciidoc[leveloffset=+1]

docs/developer/getting-started/running-kibana-advanced.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ settings].
7373
[discrete]
7474
=== Potential Optimization Pitfalls
7575

76-
* Webpack is trying to include a file in the bundle that I deleted and
77-
is now complaining about it is missing
76+
* Webpack is trying to include a file in the bundle that was deleted and
77+
is now complaining about it being missing
7878
* A module id that used to resolve to a single file now resolves to a
7979
directory, but webpack isn’t adapting
8080
* (if you discover other scenarios, please send a PR!)
@@ -84,4 +84,4 @@ directory, but webpack isn’t adapting
8484

8585
{kib} includes self-signed certificates that can be used for
8686
development purposes in the browser and for communicating with
87-
{es}: `yarn start --ssl` & `yarn es snapshot --ssl`.
87+
{es}: `yarn start --ssl` & `yarn es snapshot --ssl`.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[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)
4+
5+
## ACTION\_GLOBAL\_APPLY\_FILTER variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
ACTION_GLOBAL_APPLY_FILTER = "ACTION_GLOBAL_APPLY_FILTER"
11+
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
| Variable | Description |
9191
| --- | --- |
92+
| [ACTION\_GLOBAL\_APPLY\_FILTER](./kibana-plugin-plugins-data-public.action_global_apply_filter.md) | |
9293
| [AggGroupLabels](./kibana-plugin-plugins-data-public.agggrouplabels.md) | |
9394
| [AggGroupNames](./kibana-plugin-plugins-data-public.agggroupnames.md) | |
9495
| [baseFormattersPublic](./kibana-plugin-plugins-data-public.baseformatterspublic.md) | |

src/plugins/data/common/search/aggs/agg_type.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ describe('AggType Class', () => {
9999
expect(aggType.params[1].name).toBe('customLabel');
100100
});
101101

102+
test('disables json param', () => {
103+
const aggType = new AggType({
104+
name: 'name',
105+
title: 'title',
106+
json: false,
107+
});
108+
109+
expect(aggType.params.length).toBe(1);
110+
expect(aggType.params[0].name).toBe('customLabel');
111+
});
112+
102113
test('can disable customLabel', () => {
103114
const aggType = new AggType({
104115
name: 'smart agg',

src/plugins/data/common/search/aggs/agg_type.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface AggTypeConfig<
4747
getRequestAggs?: ((aggConfig: TAggConfig) => TAggConfig[]) | (() => TAggConfig[] | void);
4848
getResponseAggs?: ((aggConfig: TAggConfig) => TAggConfig[]) | (() => TAggConfig[] | void);
4949
customLabels?: boolean;
50+
json?: boolean;
5051
decorateAggConfig?: () => any;
5152
postFlightRequest?: (
5253
resp: any,
@@ -235,13 +236,17 @@ export class AggType<
235236
if (config.params && config.params.length && config.params[0] instanceof BaseParamType) {
236237
this.params = config.params as TParam[];
237238
} else {
238-
// always append the raw JSON param
239+
// always append the raw JSON param unless it is configured to false
239240
const params: any[] = config.params ? [...config.params] : [];
240-
params.push({
241-
name: 'json',
242-
type: 'json',
243-
advanced: true,
244-
});
241+
242+
if (config.json !== false) {
243+
params.push({
244+
name: 'json',
245+
type: 'json',
246+
advanced: true,
247+
});
248+
}
249+
245250
// always append custom label
246251

247252
if (config.customLabels !== false) {

0 commit comments

Comments
 (0)