Skip to content

Commit 712ddf4

Browse files
committed
Merge branch 'master' of https://github.com/elastic/kibana into event-log/alert-duration
2 parents b2cc047 + 065e378 commit 712ddf4

865 files changed

Lines changed: 41952 additions & 20124 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.

WORKSPACE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1010
# Fetch Node.js rules
1111
http_archive(
1212
name = "build_bazel_rules_nodejs",
13-
sha256 = "10f534e1c80f795cffe1f2822becd4897754d18564612510c59b3c73544ae7c6",
14-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.0/rules_nodejs-3.5.0.tar.gz"],
13+
sha256 = "4a5d654a4ccd4a4c24eca5d319d85a88a650edf119601550c95bf400c8cc897e",
14+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.1/rules_nodejs-3.5.1.tar.gz"],
1515
)
1616

1717
# Now that we have the rules let's import from them to complete the work
1818
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
1919

2020
# Assure we have at least a given rules_nodejs version
21-
check_rules_nodejs_version(minimum_version_string = "3.5.0")
21+
check_rules_nodejs_version(minimum_version_string = "3.5.1")
2222

2323
# Setup the Node.js toolchain for the architectures we want to support
2424
#

dev_docs/tutorials/expressions.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@ tags: ['kibana', 'onboarding', 'dev', 'architecture']
99

1010
## Expressions service
1111

12-
Expression service exposes a registry of reusable functions primary used for fetching and transposing data and a registry of renderer functions that can render data into a DOM element.
13-
Adding functions is easy and so is reusing them. An expression is a chain of functions with provided arguments, which given a single input translates to a single output.
12+
Expression service exposes a registry of reusable functions primary used for fetching and transposing data and a registry of renderer functions that can render data into a DOM element.
13+
Adding functions is easy and so is reusing them. An expression is a chain of functions with provided arguments, which given a single input translates to a single output.
1414
Each expression is representable by a human friendly string which a user can type.
1515

1616
### creating expressions
1717

1818
Here is a very simple expression string:
1919

20-
essql 'select column1, column2 from myindex' | mapColumn name=column3 fn='{ column1 + 3 }' | table
21-
20+
```
21+
essql 'select column1, column2 from myindex' | mapColumn name=column3 fn='{ column1 + 3 }' | table
22+
```
2223

2324
It consists of 3 functions:
2425

2526
- essql which runs given sql query against elasticsearch and returns the results
2627
- `mapColumn`, which computes a new column from existing ones;
2728
- `table`, which prepares the data for rendering in a tabular format.
28-
29+
2930
The same expression could also be constructed in the code:
3031

3132
```ts
@@ -61,7 +62,7 @@ In addition, on the browser side, there are two additional ways to run expressio
6162
6263
#### React expression renderer component
6364
64-
This is the easiest way to get expressions rendered inside your application.
65+
This is the easiest way to get expressions rendered inside your application.
6566
6667
```ts
6768
<ReactExpressionRenderer expression={expression} />

docs/user/dashboard/timelion.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
To use *Timelion*, you define a graph by chaining functions together, using the *Timelion*-specific syntax.
55
The syntax enables some features that classical point series charts don't offer, such as pulling data from different indices or data sources into one graph.
66

7-
deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In the last 7.x minor version and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."]
7+
deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In 7.16 and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."]
88

99
[float]
1010
==== Timelion expressions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@
441441
"@babel/traverse": "^7.12.12",
442442
"@babel/types": "^7.12.12",
443443
"@bazel/ibazel": "^0.15.10",
444-
"@bazel/typescript": "^3.5.0",
444+
"@bazel/typescript": "^3.5.1",
445445
"@cypress/snapshot": "^2.1.7",
446446
"@cypress/webpack-preprocessor": "^5.6.0",
447447
"@elastic/apm-rum": "^5.6.1",

packages/kbn-apm-utils/src/index.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export interface SpanOptions {
1616
labels?: Record<string, string>;
1717
}
1818

19+
type Span = Exclude<typeof agent.currentSpan, undefined | null>;
20+
1921
export function parseSpanOptions(optionsOrName: SpanOptions | string) {
2022
const options = typeof optionsOrName === 'string' ? { name: optionsOrName } : optionsOrName;
2123

@@ -30,7 +32,7 @@ const runInNewContext = <T extends (...args: any[]) => any>(cb: T): ReturnType<T
3032

3133
export async function withSpan<T>(
3234
optionsOrName: SpanOptions | string,
33-
cb: () => Promise<T>
35+
cb: (span?: Span) => Promise<T>
3436
): Promise<T> {
3537
const options = parseSpanOptions(optionsOrName);
3638

@@ -71,13 +73,17 @@ export async function withSpan<T>(
7173
span.addLabels(labels);
7274
}
7375

74-
return cb()
76+
return cb(span)
7577
.then((res) => {
76-
span.outcome = 'success';
78+
if (!span.outcome || span.outcome === 'unknown') {
79+
span.outcome = 'success';
80+
}
7781
return res;
7882
})
7983
.catch((err) => {
80-
span.outcome = 'failure';
84+
if (!span.outcome || span.outcome === 'unknown') {
85+
span.outcome = 'failure';
86+
}
8187
throw err;
8288
})
8389
.finally(() => {

packages/kbn-optimizer/limits.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pageLoadAssetSize:
3434
indexManagement: 140608
3535
indexPatternManagement: 28222
3636
infra: 184320
37-
fleet: 415829
37+
fleet: 450005
3838
ingestPipelines: 58003
3939
inputControlVis: 172675
4040
inspector: 148711
@@ -87,7 +87,6 @@ pageLoadAssetSize:
8787
visDefaultEditor: 50178
8888
visTypeMarkdown: 30896
8989
visTypeMetric: 42790
90-
visTypePie: 34051
9190
visTypeTable: 94934
9291
visTypeTagcloud: 37575
9392
visTypeTimelion: 68883
@@ -111,3 +110,4 @@ pageLoadAssetSize:
111110
timelines: 28613
112111
cases: 162385
113112
screenshotMode: 17856
113+
visTypePie: 35583

src/plugins/discover/public/application/components/discover_grid/discover_grid.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747

4848
// We only truncate if the cell is not a control column.
4949
.euiDataGridHeader {
50+
// This display property is temporary until https://github.com/elastic/eui/issues/4729 is resolved.
51+
display: flex;
52+
5053
.euiDataGridHeaderCell__content {
5154
@include euiTextTruncate;
5255
overflow: hidden;

src/plugins/discover/public/application/components/top_nav/open_options_popover.tsx

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,21 @@ import ReactDOM from 'react-dom';
1111
import { I18nStart } from 'kibana/public';
1212
import { i18n } from '@kbn/i18n';
1313
import { FormattedMessage } from '@kbn/i18n/react';
14-
import { EuiSpacer, EuiButton, EuiText, EuiWrappingPopover, EuiCode } from '@elastic/eui';
14+
import {
15+
EuiSpacer,
16+
EuiButton,
17+
EuiText,
18+
EuiWrappingPopover,
19+
EuiCode,
20+
EuiHorizontalRule,
21+
EuiButtonEmpty,
22+
EuiTextAlign,
23+
} from '@elastic/eui';
1524
import { getServices } from '../../../kibana_services';
1625
import './open_options_popover.scss';
1726
import { DOC_TABLE_LEGACY } from '../../../../common';
1827

28+
const container = document.createElement('div');
1929
let isOpen = false;
2030

2131
interface OptionsPopoverProps {
@@ -77,11 +87,29 @@ export function OptionsPopover(props: OptionsPopoverProps) {
7787
defaultMessage: 'Get started',
7888
})}
7989
</EuiButton>
90+
<EuiHorizontalRule margin="s" />
91+
<EuiTextAlign textAlign="center">
92+
<EuiButtonEmpty
93+
iconType="gear"
94+
size="s"
95+
href={addBasePath(`/app/management/kibana/settings?query=category:(discover)`)}
96+
>
97+
{i18n.translate('discover.openOptionsPopover.gotToAllSettings', {
98+
defaultMessage: 'All Discover options',
99+
})}
100+
</EuiButtonEmpty>
101+
</EuiTextAlign>
80102
</div>
81103
</EuiWrappingPopover>
82104
);
83105
}
84106

107+
function onClose() {
108+
ReactDOM.unmountComponentAtNode(container);
109+
document.body.removeChild(container);
110+
isOpen = false;
111+
}
112+
85113
export function openOptionsPopover({
86114
I18nContext,
87115
anchorElement,
@@ -90,17 +118,11 @@ export function openOptionsPopover({
90118
anchorElement: HTMLElement;
91119
}) {
92120
if (isOpen) {
121+
onClose();
93122
return;
94123
}
95124

96125
isOpen = true;
97-
const container = document.createElement('div');
98-
const onClose = () => {
99-
ReactDOM.unmountComponentAtNode(container);
100-
document.body.removeChild(container);
101-
isOpen = false;
102-
};
103-
104126
document.body.appendChild(container);
105127

106128
const element = (

src/plugins/discover/public/url_generator.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
* Side Public License, v 1.
77
*/
88

9-
import {
10-
TimeRange,
11-
Filter,
12-
Query,
13-
esFilters,
14-
QueryState,
15-
RefreshInterval,
16-
} from '../../data/public';
9+
import type { UrlGeneratorsDefinition } from '../../share/public';
10+
import type { TimeRange, Filter, Query, QueryState, RefreshInterval } from '../../data/public';
11+
import { esFilters } from '../../data/public';
1712
import { setStateToKbnUrl } from '../../kibana_utils/public';
18-
import { UrlGeneratorsDefinition } from '../../share/public';
1913

2014
export const DISCOVER_APP_URL_GENERATOR = 'DISCOVER_APP_URL_GENERATOR';
2115

@@ -71,10 +65,12 @@ export interface DiscoverUrlGeneratorState {
7165
* Used interval of the histogram
7266
*/
7367
interval?: string;
68+
7469
/**
7570
* Array of the used sorting [[field,direction],...]
7671
*/
7772
sort?: string[][];
73+
7874
/**
7975
* id of the used saved query
8076
*/

src/plugins/kibana_react/public/app_links/redirect_app_link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import useObservable from 'react-use/lib/useObservable';
1212
import { ApplicationStart } from 'src/core/public';
1313
import { createNavigateToUrlClickHandler } from './click_handler';
1414

15-
interface RedirectCrossAppLinksProps {
15+
interface RedirectCrossAppLinksProps extends React.HTMLAttributes<HTMLDivElement> {
1616
application: ApplicationStart;
1717
className?: string;
1818
'data-test-subj'?: string;

0 commit comments

Comments
 (0)