Skip to content

Commit 3e3a2dc

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 96026-ftl-fleet-setup
2 parents e229c7d + 97feae3 commit 3e3a2dc

299 files changed

Lines changed: 4953 additions & 2686 deletions

File tree

Some content is hidden

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

docs/developer/plugin-list.asciidoc

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -261,52 +261,48 @@ The plugin exposes the static DefaultEditorController class to consume.
261261
|The markdown visualization that can be used to place text panels on dashboards.
262262
263263
264-
|{kib-repo}blob/{branch}/src/plugins/vis_type_metric/README.md[visTypeMetric]
265-
|Contains the metric visualization.
264+
|{kib-repo}blob/{branch}/src/plugins/vis_type_metric[visTypeMetric]
265+
|WARNING: Missing README.
266266
267267
268-
|{kib-repo}blob/{branch}/src/plugins/vis_type_pie/README.md[visTypePie]
269-
|Contains the pie chart implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy charts library advanced setting.
268+
|{kib-repo}blob/{branch}/src/plugins/vis_type_pie[visTypePie]
269+
|WARNING: Missing README.
270270
271271
272272
|{kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable]
273273
|Contains the data table visualization, that allows presenting data in a simple table format.
274274
275275
276-
|{kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud/README.md[visTypeTagcloud]
277-
|Contains the tagcloud visualization.
276+
|{kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud[visTypeTagcloud]
277+
|WARNING: Missing README.
278278
279279
280280
|{kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion]
281281
|Contains the timelion visualization and the timelion backend.
282282
283283
284-
|{kib-repo}blob/{branch}/src/plugins/vis_type_timeseries/README.md[visTypeTimeseries]
285-
|Contains everything around TSVB (the editor, visualizatin implementations and backends).
284+
|{kib-repo}blob/{branch}/src/plugins/vis_type_timeseries[visTypeTimeseries]
285+
|WARNING: Missing README.
286286
287287
288-
|{kib-repo}blob/{branch}/src/plugins/vis_type_vega/README.md[visTypeVega]
289-
|Contains the Vega visualization.
288+
|{kib-repo}blob/{branch}/src/plugins/vis_type_vega[visTypeVega]
289+
|WARNING: Missing README.
290290
291291
292-
|{kib-repo}blob/{branch}/src/plugins/vis_type_vislib/README.md[visTypeVislib]
293-
|Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and
294-
heatmap charts.
292+
|{kib-repo}blob/{branch}/src/plugins/vis_type_vislib[visTypeVislib]
293+
|WARNING: Missing README.
295294
296295
297-
|{kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy]
298-
|Contains the new xy-axis chart using the elastic-charts library, which will eventually
299-
replace the vislib xy-axis charts including bar, area, and line.
296+
|{kib-repo}blob/{branch}/src/plugins/vis_type_xy[visTypeXy]
297+
|WARNING: Missing README.
300298
301299
302-
|{kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations]
303-
|Contains most of the visualization infrastructure, e.g. the visualization type registry or the
304-
visualization embeddable.
300+
|{kib-repo}blob/{branch}/src/plugins/visualizations[visualizations]
301+
|WARNING: Missing README.
305302
306303
307-
|{kib-repo}blob/{branch}/src/plugins/visualize/README.md[visualize]
308-
|Contains the visualize application which includes the listing page and the app frame,
309-
which will load the visualization's editor.
304+
|{kib-repo}blob/{branch}/src/plugins/visualize[visualize]
305+
|WARNING: Missing README.
310306
311307
312308
|===
130 KB
Loading

docs/user/dashboard/lens-advanced.asciidoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,41 @@ image::images/lens_advanced_5_2.png[Line chart with cumulative sum of orders mad
295295

296296
. Click *Save and return*.
297297

298+
[discrete]
299+
[[compare-time-ranges]]
300+
=== Compare time ranges
301+
302+
*Lens* allows you to compare the currently selected time range with historical data using the *Time shift* option.
303+
304+
Time shifts can be used on any metric. The special shift *previous* will show the time window preceding the currently selected one, spanning the same duration.
305+
For example, if *Last 7 days* is selected in the time filter, *previous* will show data from 14 days ago to 7 days ago.
306+
307+
If multiple time shifts are used in a single chart, a multiple of the date histogram interval should be chosen - otherwise data points might not line up in the chart and empty spots can occur.
308+
For example, if a daily interval is used, shifting one series by *36h*, and another one by *1d*, is not recommended. In this scenario, either reduce the interval to *12h*, or create two separate charts.
309+
310+
To compare current sales numbers with sales from a week ago, follow these steps:
311+
312+
. Open *Lens*.
313+
314+
. From the *Chart Type* dropdown, select *Line*.
315+
316+
. From the *Available fields* list, drag and drop *Records* to the visualization builder.
317+
318+
. Copy the *Count of Records* series by dragging it to the empty drop target of the *Vertical axis* dimension group (*Drop a field or click to add*)
319+
320+
. Shift the second *Count of Records* series by one week to do a week-over-week comparison
321+
322+
.. Click the new *Count of Records [1]* dimension
323+
324+
.. Click *Add advanced options* below the field selector
325+
326+
.. Click *Time shift*
327+
328+
.. Click the *1 week* option. You can also define custom shifts by typing amount followed by time unit (like *1w* for a one week shift), then hit enter.
329+
330+
[role="screenshot"]
331+
image::images/lens_time_shift.png[Line chart with week-over-week sales comparison]
332+
298333
[discrete]
299334
[[view-customers-over-time-by-continents]]
300335
=== View table of customers by category over time

docs/user/dashboard/lens.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,3 +315,22 @@ Pagination in a data table is unsupported in *Lens*. However, the <<types-of-vis
315315
===== Is it possible to have more than one y-axis scale in visualizations?
316316

317317
*Lens* lets you pick, for each Y dimension, up to two distinct axis: *left* and *right*. Each axis can have a different scale.
318+
319+
[float]
320+
[[why-is-my-value-with-the-right-color-using-value-based-coloring]]
321+
===== Why is my value with the incorrect color when using value-based coloring?
322+
323+
There could be various reasons for a specific value in the table to have a different color than expected.
324+
325+
Here's a short list of few different aspects to check:
326+
* Make sure the value falls within the desired color stop value defined in the panel. Color stop values are "inclusive".
327+
328+
* Make sure you have the right value precision setup: value formatters could round the numeric values up or down.
329+
330+
* Make sure the right color continuity option is selected: if the number is below the first color stop value, a continuity of type `Below` or `Above and below range` is required.
331+
332+
* The default values set by the Value type are based on the current data range displayed on the data table.
333+
334+
** If a custom `Number` configuration is used, check that the color stop values are covering the current data range.
335+
336+
** If a `Percent` configuration is used, and the data range changes, the colors displayed are affected.

packages/kbn-test/src/functional_test_runner/lib/config/schema.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,19 @@ export const schema = Joi.object()
187187
sourceArgs: Joi.array(),
188188
serverArgs: Joi.array(),
189189
installDir: Joi.string(),
190+
/** Options for how FTR should execute and interact with Kibana */
191+
runOptions: Joi.object()
192+
.keys({
193+
/**
194+
* Log message to wait for before initiating tests, defaults to waiting for Kibana status to be `available`.
195+
* Note that this log message must not be filtered out by the current logging config, for example by the
196+
* log level. If needed, you can adjust the logging level via `kbnTestServer.serverArgs`.
197+
*/
198+
wait: Joi.object()
199+
.regex()
200+
.default(/Kibana is now available/),
201+
})
202+
.default(),
190203
})
191204
.default(),
192205

packages/kbn-test/src/functional_tests/lib/run_kibana_server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function extendNodeOptions(installDir) {
2828

2929
export async function runKibanaServer({ procs, config, options }) {
3030
const { installDir } = options;
31+
const runOptions = config.get('kbnTestServer.runOptions');
3132

3233
await procs.run('kibana', {
3334
cmd: getKibanaCmd(installDir),
@@ -38,7 +39,7 @@ export async function runKibanaServer({ procs, config, options }) {
3839
...extendNodeOptions(installDir),
3940
},
4041
cwd: installDir || KIBANA_ROOT,
41-
wait: /\[Kibana\]\[http\] http server running/,
42+
wait: runOptions.wait,
4243
});
4344
}
4445

packages/kbn-test/src/functional_tests/tasks.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ export async function runTests(options) {
9797
try {
9898
es = await runElasticsearch({ config, options: opts });
9999
await runKibanaServer({ procs, config, options: opts });
100-
// workaround until https://github.com/elastic/kibana/issues/89828 is addressed
101-
await delay(5000);
102100
await runFtr({ configPath, options: opts });
103101
} finally {
104102
try {
@@ -164,7 +162,3 @@ async function silence(log, milliseconds) {
164162
)
165163
.toPromise();
166164
}
167-
168-
async function delay(ms) {
169-
await new Promise((resolve) => setTimeout(resolve, ms));
170-
}

rfcs/text/0011_global_search.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
A new Kibana plugin exposing an API on both public and server side, to allow consumers to search for various objects and
88
register result providers.
99

10-
Note: whether this will be an oss or xpack plugin still depends on https://github.com/elastic/dev/issues/1404.
11-
1210
# Basic example
1311

1412
- registering a result provider:
@@ -43,8 +41,7 @@ Kibana should do its best to assist users searching for and navigating to the va
4341

4442
We should expose an API to make it possible for plugins to search for the various objects present on a Kibana instance.
4543

46-
The first consumer of this API will be the global search bar [#57576](https://github.com/elastic/kibana/issues/57576). This API
47-
should still be generic to answer similar needs from any other consumer, either client or server side.
44+
The first consumer of this API will be the global search bar [#57576](https://github.com/elastic/kibana/issues/57576). This API should still be generic to answer similar needs from any other consumer, either client or server side.
4845

4946
# Detailed design
5047

@@ -84,7 +81,7 @@ interface GlobalSearchProviderFindOptions {
8481
aborted$: Observable<void>;
8582
/**
8683
* The total maximum number of results (including all batches / emissions) that should be returned by the provider for a given `find` request.
87-
* Any result emitted exceeding this quota will be ignored by the service and not emitted to the consumer.
84+
* Any result emitted exceeding this quota will be ignored by the service and not emitted to the consumer.
8885
*/
8986
maxResults: number;
9087
}
@@ -462,8 +459,8 @@ search(
462459

463460
Notes:
464461

465-
- The example implementation is not streaming results from the server, meaning that all results from server-side
466-
registered providers will all be fetched and emitted in a single batch. Ideally, we would leverage the `bfetch` plugin
462+
- The example implementation is not streaming results from the server, meaning that all results from server-side
463+
registered providers will all be fetched and emitted in a single batch. Ideally, we would leverage the `bfetch` plugin
467464
to stream the results to the client instead.
468465

469466
### results sorting

src/core/server/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ export class Server {
261261

262262
await this.plugins.start(this.coreStart);
263263

264+
this.status.start();
264265
await this.http.start();
265266

266267
startTransaction?.end();
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
import { TestScheduler } from 'rxjs/testing';
10+
import { ServiceStatus, ServiceStatusLevels } from './types';
11+
import { getOverallStatusChanges } from './log_overall_status';
12+
13+
const getTestScheduler = () =>
14+
new TestScheduler((actual, expected) => {
15+
expect(actual).toEqual(expected);
16+
});
17+
18+
const createStatus = (parts: Partial<ServiceStatus> = {}): ServiceStatus => ({
19+
level: ServiceStatusLevels.available,
20+
summary: 'summary',
21+
...parts,
22+
});
23+
24+
describe('getOverallStatusChanges', () => {
25+
it('emits an initial message after first overall$ emission', () => {
26+
getTestScheduler().run(({ expectObservable, hot }) => {
27+
const overall$ = hot<ServiceStatus>('--a', {
28+
a: createStatus(),
29+
});
30+
const stop$ = hot<void>('');
31+
const expected = '--a';
32+
33+
expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, {
34+
a: 'Kibana is now available',
35+
});
36+
});
37+
});
38+
39+
it('emits a new message every time the status level changes', () => {
40+
getTestScheduler().run(({ expectObservable, hot }) => {
41+
const overall$ = hot<ServiceStatus>('--a--b', {
42+
a: createStatus({
43+
level: ServiceStatusLevels.degraded,
44+
}),
45+
b: createStatus({
46+
level: ServiceStatusLevels.available,
47+
}),
48+
});
49+
const stop$ = hot<void>('');
50+
const expected = '--a--b';
51+
52+
expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, {
53+
a: 'Kibana is now degraded',
54+
b: 'Kibana is now available (was degraded)',
55+
});
56+
});
57+
});
58+
59+
it('does not emit when the status stays the same', () => {
60+
getTestScheduler().run(({ expectObservable, hot }) => {
61+
const overall$ = hot<ServiceStatus>('--a--b--c', {
62+
a: createStatus({
63+
level: ServiceStatusLevels.degraded,
64+
summary: 'summary 1',
65+
}),
66+
b: createStatus({
67+
level: ServiceStatusLevels.degraded,
68+
summary: 'summary 2',
69+
}),
70+
c: createStatus({
71+
level: ServiceStatusLevels.available,
72+
summary: 'summary 2',
73+
}),
74+
});
75+
const stop$ = hot<void>('');
76+
const expected = '--a-----b';
77+
78+
expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, {
79+
a: 'Kibana is now degraded',
80+
b: 'Kibana is now available (was degraded)',
81+
});
82+
});
83+
});
84+
85+
it('stops emitting once `stop$` emits', () => {
86+
getTestScheduler().run(({ expectObservable, hot }) => {
87+
const overall$ = hot<ServiceStatus>('--a--b', {
88+
a: createStatus({
89+
level: ServiceStatusLevels.degraded,
90+
}),
91+
b: createStatus({
92+
level: ServiceStatusLevels.available,
93+
}),
94+
});
95+
const stop$ = hot<void>('----(s|)');
96+
const expected = '--a-|';
97+
98+
expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, {
99+
a: 'Kibana is now degraded',
100+
});
101+
});
102+
});
103+
});

0 commit comments

Comments
 (0)