Skip to content

Commit 407084a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into kbn-xxx-remove-legacy-es-plugin
2 parents bbf6bf9 + 6122610 commit 407084a

File tree

387 files changed

+12416
-4217
lines changed

Some content is hidden

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

387 files changed

+12416
-4217
lines changed

.ci/Jenkinsfile_baseline_capture

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ kibanaPipeline(timeoutMinutes: 120) {
1111
'CI_PARALLEL_PROCESS_NUMBER=1'
1212
]) {
1313
parallel([
14-
'oss-visualRegression': {
15-
workers.ci(name: 'oss-visualRegression', size: 's-highmem', ramDisk: true) {
16-
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')()
14+
'oss-baseline': {
15+
workers.ci(name: 'oss-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
16+
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
1717
}
1818
},
19-
'xpack-visualRegression': {
20-
workers.ci(name: 'xpack-visualRegression', size: 's-highmem', ramDisk: true) {
21-
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')()
19+
'xpack-baseline': {
20+
workers.ci(name: 'xpack-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
21+
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
2222
}
2323
},
2424
])

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163

164164
# Security
165165
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
166-
/x-pack/legacy/plugins/security/ @elastic/kibana-security
167166
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
168167
/x-pack/plugins/spaces/ @elastic/kibana-security
169168
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
@@ -282,7 +281,6 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
282281
# Core design
283282
/src/plugins/dashboard/**/*.scss @elastic/kibana-core-ui-designers
284283
/x-pack/plugins/canvas/**/*.scss @elastic/kibana-core-ui-designers
285-
/x-pack/legacy/plugins/security/**/*.scss @elastic/kibana-core-ui-designers
286284
/x-pack/legacy/plugins/spaces/**/*.scss @elastic/kibana-core-ui-designers
287285
/x-pack/plugins/spaces/**/*.scss @elastic/kibana-core-ui-designers
288286
/x-pack/plugins/security/**/*.scss @elastic/kibana-core-ui-designers

docs/apm/troubleshooting.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ GET /_template/apm-{version}
4949
*Using Logstash, Kafka, etc.*
5050
If you're not outputting data directly from APM Server to Elasticsearch (perhaps you're using Logstash or Kafka),
5151
then the index template will not be set up automatically. Instead, you'll need to
52-
{apm-server-ref}/configuration-template.html[load the template manually].
52+
{apm-server-ref}/apm-server-template.html[load the template manually].
5353

5454
*Using a custom index names*
5555
This problem can also occur if you've customized the index name that you write APM data to.

docs/settings/reporting-settings.asciidoc

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ security is enabled, `xpack.security.encryptionKey`.
104104
[cols="2*<"]
105105
|===
106106
| `xpack.reporting.queue.pollInterval`
107-
| Specifies the number of milliseconds that the reporting poller waits between polling the
108-
index for any pending Reporting jobs. Defaults to `3000` (3 seconds).
107+
| Specify the {ref}/common-options.html#time-units[time] that the reporting poller waits between polling the index for any
108+
pending Reporting jobs. Can be specified as number of milliseconds. Defaults to `3s`.
109109

110110
| [[xpack-reporting-q-timeout]] `xpack.reporting.queue.timeout` {ess-icon}
111-
| How long each worker has to produce a report. If your machine is slow or under
112-
heavy load, you might need to increase this timeout. Specified in milliseconds.
113-
If a Reporting job execution time goes over this time limit, the job will be
114-
marked as a failure and there will not be a download available.
115-
Defaults to `120000` (two minutes).
111+
| {ref}/common-options.html#time-units[How long] each worker has to produce a report. If your machine is slow or under heavy
112+
load, you might need to increase this timeout. If a Reporting job execution goes over this time limit, the job is marked as a
113+
failure and no download will be available. Can be specified as number of milliseconds.
114+
Defaults to `2m`.
116115

117116
|===
118117

@@ -127,24 +126,24 @@ control the capturing process.
127126
|===
128127
a| `xpack.reporting.capture.timeouts`
129128
`.openUrl` {ess-icon}
130-
| Specify how long to allow the Reporting browser to wait for the "Loading..." screen
131-
to dismiss and find the initial data for the Kibana page. If the time is
132-
exceeded, a page screenshot is captured showing the current state, and the download link shows a warning message.
133-
Defaults to `60000` (1 minute).
129+
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for the "Loading..." screen
130+
to dismiss and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current
131+
page, and the download link shows a warning message. Can be specified as number of milliseconds.
132+
Defaults to `1m`.
134133

135134
a| `xpack.reporting.capture.timeouts`
136135
`.waitForElements` {ess-icon}
137-
| Specify how long to allow the Reporting browser to wait for all visualization
138-
panels to load on the Kibana page. If the time is exceeded, a page screenshot
139-
is captured showing the current state, and the download link shows a warning message. Defaults to `30000` (30
140-
seconds).
136+
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for all visualization panels
137+
to load on the page. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows
138+
a warning message. Can be specified as number of milliseconds.
139+
Defaults to `30s`.
141140

142141
a| `xpack.reporting.capture.timeouts`
143142
`.renderComplete` {ess-icon}
144-
| Specify how long to allow the Reporting browser to wait for all visualizations to
145-
fetch and render the data. If the time is exceeded, a
146-
page screenshot is captured showing the current state, and the download link shows a warning message. Defaults to
147-
`30000` (30 seconds).
143+
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for all visualizations to
144+
fetch and render the data. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows a
145+
warning message. Can be specified as number of milliseconds.
146+
Defaults to `30s`.
148147

149148
|===
150149

@@ -163,11 +162,10 @@ available, but there will likely be errors in the visualizations in the report.
163162
job, as many times as this setting. Defaults to `3`.
164163

165164
| `xpack.reporting.capture.loadDelay`
166-
| When visualizations are not evented, this is the amount of time before
167-
taking a screenshot. All visualizations that ship with {kib} are evented, so this
168-
setting should not have much effect. If you are seeing empty images instead of
169-
visualizations, try increasing this value.
170-
Defaults to `3000` (3 seconds).
165+
| Specify the {ref}/common-options.html#time-units[amount of time] before taking a screenshot when visualizations are not evented.
166+
All visualizations that ship with {kib} are evented, so this setting should not have much effect. If you are seeing empty images
167+
instead of visualizations, try increasing this value.
168+
Defaults to `3s`.
171169

172170
| [[xpack-reporting-browser]] `xpack.reporting.capture.browser.type` {ess-icon}
173171
| Specifies the browser to use to capture screenshots. This setting exists for
@@ -213,17 +211,17 @@ a| `xpack.reporting.capture.browser`
213211
[cols="2*<"]
214212
|===
215213
| [[xpack-reporting-csv]] `xpack.reporting.csv.maxSizeBytes` {ess-icon}
216-
| The maximum size of a CSV file before being truncated. This setting exists to prevent
217-
large exports from causing performance and storage issues.
218-
Defaults to `10485760` (10mB).
214+
| The maximum {ref}/common-options.html#byte-units[byte size] of a CSV file before being truncated. This setting exists to
215+
prevent large exports from causing performance and storage issues. Can be specified as number of bytes.
216+
Defaults to `10mb`.
219217

220218
| `xpack.reporting.csv.scroll.size`
221219
| Number of documents retrieved from {es} for each scroll iteration during a CSV
222220
export.
223221
Defaults to `500`.
224222

225223
| `xpack.reporting.csv.scroll.duration`
226-
| Amount of time allowed before {kib} cleans the scroll context during a CSV export.
224+
| Amount of {ref}/common-options.html#time-units[time] allowed before {kib} cleans the scroll context during a CSV export.
227225
Defaults to `30s`.
228226

229227
| `xpack.reporting.csv.checkForFormulas`

docs/user/alerting/action-types/server-log.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[server-log-action-type]]
33
=== Server log action
44

5-
This action type writes and entry to the {kib} server log.
5+
This action type writes an entry to the {kib} server log.
66

77
[float]
88
[[server-log-connector-configuration]]

docs/user/dashboard/url-drilldown.asciidoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ context.panel.timeRange.indexPatternIds
197197
| ID of saved object behind a panel.
198198

199199
| *Single click*
200+
200201
| event.value
201202
| Value behind clicked data point.
202203

@@ -208,6 +209,22 @@ context.panel.timeRange.indexPatternIds
208209
| event.negate
209210
| Boolean, indicating whether clicked data point resulted in negative filter.
210211

212+
|
213+
| event.points
214+
| Some visualizations have clickable points that emit more than one data point. Use list of data points in case a single value is insufficient. +
215+
216+
Example:
217+
218+
`{{json event.points}}` +
219+
`{{event.points.[0].key}}` +
220+
`{{event.points.[0].value}}`
221+
`{{#each event.points}}key=value&{{/each}}`
222+
223+
Note:
224+
225+
`{{event.value}}` is a shorthand for `{{event.points.[0].value}}` +
226+
`{{event.key}}` is a shorthand for `{{event.points.[0].key}}`
227+
211228
| *Range selection*
212229
| event.from +
213230
event.to

src/dev/build/tasks/os_packages/docker_generator/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function runDockerGenerator(
4040
ubi: boolean = false
4141
) {
4242
// UBI var config
43-
const baseOSImage = ubi ? 'registry.access.redhat.com/ubi8/ubi-minimal:latest' : 'centos:8';
43+
const baseOSImage = ubi ? 'docker.elastic.co/ubi8/ubi-minimal:latest' : 'centos:8';
4444
const ubiVersionTag = 'ubi8';
4545
const ubiImageFlavor = ubi ? `-${ubiVersionTag}` : '';
4646

src/plugins/data/public/ui/query_string_input/query_string_input.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,16 @@ export class QueryStringInputUI extends Component<Props, State> {
546546
this.updateSuggestions.cancel();
547547
this.componentIsUnmounting = true;
548548
window.removeEventListener('resize', this.handleAutoHeight);
549-
window.removeEventListener('scroll', this.handleListUpdate);
549+
window.removeEventListener('scroll', this.handleListUpdate, { capture: true });
550550
}
551551

552-
handleListUpdate = () =>
553-
this.setState({
552+
handleListUpdate = () => {
553+
if (this.componentIsUnmounting) return;
554+
555+
return this.setState({
554556
queryBarRect: this.queryBarInputDivRefInstance.current?.getBoundingClientRect(),
555557
});
558+
};
556559

557560
handleAutoHeight = () => {
558561
if (this.inputRef !== null && document.activeElement === this.inputRef) {

src/plugins/es_ui_shared/public/request/use_request.test.helpers.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import React from 'react';
20+
import React, { useState, useEffect } from 'react';
2121
import { act } from 'react-dom/test-utils';
2222
import { mount, ReactWrapper } from 'enzyme';
2323
import sinon from 'sinon';
@@ -111,6 +111,13 @@ export const createUseRequestHelpers = (): UseRequestHelpers => {
111111
requestConfig
112112
);
113113

114+
// Force a re-render of the component to stress-test the useRequest hook and verify its
115+
// state remains unaffected.
116+
const [, setState] = useState(false);
117+
useEffect(() => {
118+
setState(true);
119+
}, []);
120+
114121
hookResult.isInitialRequest = isInitialRequest;
115122
hookResult.isLoading = isLoading;
116123
hookResult.error = error;

src/plugins/es_ui_shared/public/request/use_request.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const useRequest = <D = any, E = Error>(
4949

5050
// Consumers can use isInitialRequest to implement a polling UX.
5151
const requestCountRef = useRef<number>(0);
52-
const isInitialRequest = requestCountRef.current === 0;
52+
const isInitialRequestRef = useRef<boolean>(true);
5353
const pollIntervalIdRef = useRef<any>(null);
5454

5555
const clearPollInterval = useCallback(() => {
@@ -98,6 +98,9 @@ export const useRequest = <D = any, E = Error>(
9898
return;
9999
}
100100

101+
// Surface to consumers that at least one request has resolved.
102+
isInitialRequestRef.current = false;
103+
101104
setError(responseError);
102105
// If there's an error, keep the data from the last request in case it's still useful to the user.
103106
if (!responseError) {
@@ -146,7 +149,7 @@ export const useRequest = <D = any, E = Error>(
146149
}, [clearPollInterval]);
147150

148151
return {
149-
isInitialRequest,
152+
isInitialRequest: isInitialRequestRef.current,
150153
isLoading,
151154
error,
152155
data,

0 commit comments

Comments
 (0)