Skip to content

Commit f41e8d7

Browse files
Merge branch 'master' into fix/security-histogram-panel-styling
2 parents a84eaec + 308827a commit f41e8d7

70 files changed

Lines changed: 404 additions & 3312 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.

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Kibana source code with Kibana X-Pack source code
2-
Copyright 2012-2020 Elasticsearch B.V.
2+
Copyright 2012-2021 Elasticsearch B.V.
33

44
---
55
Pretty handling of logarithmic axes.

docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ readonly links: {
4444
readonly aggs: {
4545
readonly date_histogram: string;
4646
readonly date_range: string;
47+
readonly date_format_pattern: string;
4748
readonly filter: string;
4849
readonly filters: string;
4950
readonly geohash_grid: string;
@@ -104,5 +105,11 @@ readonly links: {
104105
readonly ml: Record<string, string>;
105106
readonly transforms: Record<string, string>;
106107
readonly visualize: Record<string, string>;
108+
readonly apis: Record<string, string>;
109+
readonly observability: Record<string, string>;
110+
readonly alerting: Record<string, string>;
111+
readonly maps: Record<string, string>;
112+
readonly monitoring: Record<string, string>;
113+
readonly security: Record<string, string>;
107114
};
108115
```

docs/development/core/public/kibana-plugin-core-public.doclinksstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export interface DocLinksStart
1717
| --- | --- | --- |
1818
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | <code>string</code> | |
1919
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | <code>string</code> | |
20-
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | <code>{</code><br/><code> readonly dashboard: {</code><br/><code> readonly guide: string;</code><br/><code> readonly drilldowns: string;</code><br/><code> readonly drilldownsTriggerPicker: string;</code><br/><code> readonly urlDrilldownTemplateSyntax: string;</code><br/><code> readonly urlDrilldownVariables: string;</code><br/><code> };</code><br/><code> readonly filebeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly installation: string;</code><br/><code> readonly configuration: string;</code><br/><code> readonly elasticsearchOutput: string;</code><br/><code> readonly startup: string;</code><br/><code> readonly exportedFields: string;</code><br/><code> };</code><br/><code> readonly auditbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly metricbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly heartbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly logstash: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly functionbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly winlogbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly aggs: {</code><br/><code> readonly date_histogram: string;</code><br/><code> readonly date_range: string;</code><br/><code> readonly filter: string;</code><br/><code> readonly filters: string;</code><br/><code> readonly geohash_grid: string;</code><br/><code> readonly histogram: string;</code><br/><code> readonly ip_range: string;</code><br/><code> readonly range: string;</code><br/><code> readonly significant_terms: string;</code><br/><code> readonly terms: string;</code><br/><code> readonly avg: string;</code><br/><code> readonly avg_bucket: string;</code><br/><code> readonly max_bucket: string;</code><br/><code> readonly min_bucket: string;</code><br/><code> readonly sum_bucket: string;</code><br/><code> readonly cardinality: string;</code><br/><code> readonly count: string;</code><br/><code> readonly cumulative_sum: string;</code><br/><code> readonly derivative: string;</code><br/><code> readonly geo_bounds: string;</code><br/><code> readonly geo_centroid: string;</code><br/><code> readonly max: string;</code><br/><code> readonly median: string;</code><br/><code> readonly min: string;</code><br/><code> readonly moving_avg: string;</code><br/><code> readonly percentile_ranks: string;</code><br/><code> readonly serial_diff: string;</code><br/><code> readonly std_dev: string;</code><br/><code> readonly sum: string;</code><br/><code> readonly top_hits: string;</code><br/><code> };</code><br/><code> readonly scriptedFields: {</code><br/><code> readonly scriptFields: string;</code><br/><code> readonly scriptAggs: string;</code><br/><code> readonly painless: string;</code><br/><code> readonly painlessApi: string;</code><br/><code> readonly painlessSyntax: string;</code><br/><code> readonly luceneExpressions: string;</code><br/><code> };</code><br/><code> readonly indexPatterns: {</code><br/><code> readonly loadingData: string;</code><br/><code> readonly introduction: string;</code><br/><code> };</code><br/><code> readonly addData: string;</code><br/><code> readonly kibana: string;</code><br/><code> readonly siem: {</code><br/><code> readonly guide: string;</code><br/><code> readonly gettingStarted: string;</code><br/><code> };</code><br/><code> readonly query: {</code><br/><code> readonly eql: string;</code><br/><code> readonly luceneQuerySyntax: string;</code><br/><code> readonly queryDsl: string;</code><br/><code> readonly kueryQuerySyntax: string;</code><br/><code> };</code><br/><code> readonly date: {</code><br/><code> readonly dateMath: string;</code><br/><code> };</code><br/><code> readonly management: Record&lt;string, string&gt;;</code><br/><code> readonly ml: Record&lt;string, string&gt;;</code><br/><code> readonly transforms: Record&lt;string, string&gt;;</code><br/><code> readonly visualize: Record&lt;string, string&gt;;</code><br/><code> }</code> | |
20+
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | <code>{</code><br/><code> readonly dashboard: {</code><br/><code> readonly guide: string;</code><br/><code> readonly drilldowns: string;</code><br/><code> readonly drilldownsTriggerPicker: string;</code><br/><code> readonly urlDrilldownTemplateSyntax: string;</code><br/><code> readonly urlDrilldownVariables: string;</code><br/><code> };</code><br/><code> readonly filebeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly installation: string;</code><br/><code> readonly configuration: string;</code><br/><code> readonly elasticsearchOutput: string;</code><br/><code> readonly startup: string;</code><br/><code> readonly exportedFields: string;</code><br/><code> };</code><br/><code> readonly auditbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly metricbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly heartbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly logstash: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly functionbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly winlogbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly aggs: {</code><br/><code> readonly date_histogram: string;</code><br/><code> readonly date_range: string;</code><br/><code> readonly date_format_pattern: string;</code><br/><code> readonly filter: string;</code><br/><code> readonly filters: string;</code><br/><code> readonly geohash_grid: string;</code><br/><code> readonly histogram: string;</code><br/><code> readonly ip_range: string;</code><br/><code> readonly range: string;</code><br/><code> readonly significant_terms: string;</code><br/><code> readonly terms: string;</code><br/><code> readonly avg: string;</code><br/><code> readonly avg_bucket: string;</code><br/><code> readonly max_bucket: string;</code><br/><code> readonly min_bucket: string;</code><br/><code> readonly sum_bucket: string;</code><br/><code> readonly cardinality: string;</code><br/><code> readonly count: string;</code><br/><code> readonly cumulative_sum: string;</code><br/><code> readonly derivative: string;</code><br/><code> readonly geo_bounds: string;</code><br/><code> readonly geo_centroid: string;</code><br/><code> readonly max: string;</code><br/><code> readonly median: string;</code><br/><code> readonly min: string;</code><br/><code> readonly moving_avg: string;</code><br/><code> readonly percentile_ranks: string;</code><br/><code> readonly serial_diff: string;</code><br/><code> readonly std_dev: string;</code><br/><code> readonly sum: string;</code><br/><code> readonly top_hits: string;</code><br/><code> };</code><br/><code> readonly scriptedFields: {</code><br/><code> readonly scriptFields: string;</code><br/><code> readonly scriptAggs: string;</code><br/><code> readonly painless: string;</code><br/><code> readonly painlessApi: string;</code><br/><code> readonly painlessSyntax: string;</code><br/><code> readonly luceneExpressions: string;</code><br/><code> };</code><br/><code> readonly indexPatterns: {</code><br/><code> readonly loadingData: string;</code><br/><code> readonly introduction: string;</code><br/><code> };</code><br/><code> readonly addData: string;</code><br/><code> readonly kibana: string;</code><br/><code> readonly siem: {</code><br/><code> readonly guide: string;</code><br/><code> readonly gettingStarted: string;</code><br/><code> };</code><br/><code> readonly query: {</code><br/><code> readonly eql: string;</code><br/><code> readonly luceneQuerySyntax: string;</code><br/><code> readonly queryDsl: string;</code><br/><code> readonly kueryQuerySyntax: string;</code><br/><code> };</code><br/><code> readonly date: {</code><br/><code> readonly dateMath: string;</code><br/><code> };</code><br/><code> readonly management: Record&lt;string, string&gt;;</code><br/><code> readonly ml: Record&lt;string, string&gt;;</code><br/><code> readonly transforms: Record&lt;string, string&gt;;</code><br/><code> readonly visualize: Record&lt;string, string&gt;;</code><br/><code> readonly apis: Record&lt;string, string&gt;;</code><br/><code> readonly observability: Record&lt;string, string&gt;;</code><br/><code> readonly alerting: Record&lt;string, string&gt;;</code><br/><code> readonly maps: Record&lt;string, string&gt;;</code><br/><code> readonly monitoring: Record&lt;string, string&gt;;</code><br/><code> readonly security: Record&lt;string, string&gt;;</code><br/><code> }</code> | |
2121

docs/settings/reporting-settings.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ a| `xpack.reporting.capture.browser`
195195
Defaults to `false`.
196196

197197
a| `xpack.reporting.capture.browser`
198-
.chromium.proxy.server`
198+
`.chromium.proxy.server`
199199
| The uri for the proxy server. Providing the username and password for the proxy server via the uri is not supported.
200200

201201
a| `xpack.reporting.capture.browser`
202-
.chromium.proxy.bypass`
202+
`.chromium.proxy.bypass`
203203
| An array of hosts that should not go through the proxy server and should use a direct connection instead.
204204
Examples of valid entries are "elastic.co", "*.elastic.co", ".elastic.co", ".elastic.co:5601".
205205

src/core/server/http/prototype_pollution/__snapshots__/validate_object.test.ts.snap renamed to packages/kbn-std/src/__snapshots__/ensure_no_unsafe_properties.test.ts.snap

File renamed without changes.

src/core/server/http/prototype_pollution/validate_object.test.ts renamed to packages/kbn-std/src/ensure_no_unsafe_properties.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
* under the License.
1818
*/
1919

20-
import { validateObject } from './validate_object';
20+
import { ensureNoUnsafeProperties } from './ensure_no_unsafe_properties';
2121

2222
test(`fails on circular references`, () => {
2323
const foo: Record<string, any> = {};
2424
foo.myself = foo;
2525

2626
expect(() =>
27-
validateObject({
27+
ensureNoUnsafeProperties({
2828
payload: foo,
2929
})
3030
).toThrowErrorMatchingInlineSnapshot(`"circular reference detected"`);
@@ -57,7 +57,7 @@ test(`fails on circular references`, () => {
5757
[property]: value,
5858
};
5959
test(`can submit ${JSON.stringify(obj)}`, () => {
60-
expect(() => validateObject(obj)).not.toThrowError();
60+
expect(() => ensureNoUnsafeProperties(obj)).not.toThrowError();
6161
});
6262
});
6363
});
@@ -74,6 +74,6 @@ test(`fails on circular references`, () => {
7474
JSON.parse(`{ "foo": { "bar": { "constructor": { "prototype" : null } } } }`),
7575
].forEach((value) => {
7676
test(`can't submit ${JSON.stringify(value)}`, () => {
77-
expect(() => validateObject(value)).toThrowErrorMatchingSnapshot();
77+
expect(() => ensureNoUnsafeProperties(value)).toThrowErrorMatchingSnapshot();
7878
});
7979
});

src/core/server/http/prototype_pollution/validate_object.ts renamed to packages/kbn-std/src/ensure_no_unsafe_properties.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const hasOwnProperty = (obj: any, property: string) =>
3131
const isObject = (obj: any) => typeof obj === 'object' && obj !== null;
3232

3333
// we're using a stack instead of recursion so we aren't limited by the call stack
34-
export function validateObject(obj: any) {
34+
export function ensureNoUnsafeProperties(obj: any) {
3535
if (!isObject(obj)) {
3636
return;
3737
}

packages/kbn-std/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ export { withTimeout } from './promise';
2727
export { isRelativeUrl, modifyUrl, getUrlOrigin, URLMeaningfulParts } from './url';
2828
export { unset } from './unset';
2929
export { getFlattenedObject } from './get_flattened_object';
30+
export { ensureNoUnsafeProperties } from './ensure_no_unsafe_properties';
3031
export * from './rxjs_7';

src/core/public/doc_links/doc_links_service.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export class DocLinksService {
7272
aggs: {
7373
date_histogram: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-datehistogram-aggregation.html`,
7474
date_range: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-daterange-aggregation.html`,
75+
date_format_pattern: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-daterange-aggregation.html#date-format-pattern`,
7576
filter: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-filter-aggregation.html`,
7677
filters: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-filters-aggregation.html`,
7778
geohash_grid: `${ELASTICSEARCH_DOCS}search-aggregations-bucket-geohashgrid-aggregation.html`,
@@ -107,6 +108,7 @@ export class DocLinksService {
107108
painless: `${ELASTICSEARCH_DOCS}modules-scripting-painless.html`,
108109
painlessApi: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-api-reference.html`,
109110
painlessSyntax: `${ELASTICSEARCH_DOCS}modules-scripting-painless-syntax.html`,
111+
painlessLanguage: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-lang-spec.html`,
110112
luceneExpressions: `${ELASTICSEARCH_DOCS}modules-scripting-expression.html`,
111113
},
112114
indexPatterns: {
@@ -150,14 +152,44 @@ export class DocLinksService {
150152
classificationAucRoc: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics-evaluate.html#ml-dfanalytics-class-aucroc`,
151153
},
152154
transforms: {
153-
guide: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/transforms.html`,
155+
guide: `${ELASTICSEARCH_DOCS}transforms.html`,
154156
},
155157
visualize: {
156158
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/visualize.html`,
157159
timelionDeprecation: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html#timelion-deprecation`,
158160
lens: `${ELASTIC_WEBSITE_URL}what-is/kibana-lens`,
159161
maps: `${ELASTIC_WEBSITE_URL}maps`,
160162
},
163+
observability: {
164+
guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`,
165+
},
166+
alerting: {
167+
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/managing-alerts-and-actions.html`,
168+
actionTypes: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/action-types.html`,
169+
},
170+
maps: {
171+
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-maps.html`,
172+
},
173+
monitoring: {
174+
alertsKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html`,
175+
monitorElasticsearch: `${ELASTICSEARCH_DOCS}configuring-metricbeat.html`,
176+
monitorKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`,
177+
},
178+
security: {
179+
elasticsearchSettings: `${ELASTICSEARCH_DOCS}security-settings.html`,
180+
kibanaTLS: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/configuring-tls.html`,
181+
kibanaPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-privileges.html`,
182+
indicesPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-indices`,
183+
mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`,
184+
},
185+
apis: {
186+
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
187+
createSnapshotLifecylePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
188+
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
189+
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
190+
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
191+
openIndex: `${ELASTICSEARCH_DOCS}indices-open-close.html`,
192+
},
161193
},
162194
});
163195
}
@@ -204,6 +236,7 @@ export interface DocLinksStart {
204236
readonly aggs: {
205237
readonly date_histogram: string;
206238
readonly date_range: string;
239+
readonly date_format_pattern: string;
207240
readonly filter: string;
208241
readonly filters: string;
209242
readonly geohash_grid: string;
@@ -264,5 +297,11 @@ export interface DocLinksStart {
264297
readonly ml: Record<string, string>;
265298
readonly transforms: Record<string, string>;
266299
readonly visualize: Record<string, string>;
300+
readonly apis: Record<string, string>;
301+
readonly observability: Record<string, string>;
302+
readonly alerting: Record<string, string>;
303+
readonly maps: Record<string, string>;
304+
readonly monitoring: Record<string, string>;
305+
readonly security: Record<string, string>;
267306
};
268307
}

src/core/public/public.api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ export interface DocLinksStart {
523523
readonly aggs: {
524524
readonly date_histogram: string;
525525
readonly date_range: string;
526+
readonly date_format_pattern: string;
526527
readonly filter: string;
527528
readonly filters: string;
528529
readonly geohash_grid: string;
@@ -583,6 +584,12 @@ export interface DocLinksStart {
583584
readonly ml: Record<string, string>;
584585
readonly transforms: Record<string, string>;
585586
readonly visualize: Record<string, string>;
587+
readonly apis: Record<string, string>;
588+
readonly observability: Record<string, string>;
589+
readonly alerting: Record<string, string>;
590+
readonly maps: Record<string, string>;
591+
readonly monitoring: Record<string, string>;
592+
readonly security: Record<string, string>;
586593
};
587594
}
588595

0 commit comments

Comments
 (0)