Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236869
b: "refs/heads/cases_rac_ui"
c: 442c57c
h: refs/heads/master
i:
  236867: 3f4a348
  • Loading branch information
stephmilovic committed Mar 31, 2021
1 parent cc44066 commit 642d3f7
Show file tree
Hide file tree
Showing 67 changed files with 786 additions and 315 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,4 @@ refs/heads/buildkite-tyler: 97ff28d6fb702dc679032b9e67bd83ba7bf2e8a2
refs/heads/buildkite: 3328aca7f4e43db4d97595159f0856b3bb4a10db
refs/heads/buildkite-pr-bot: b78e4a077a8a374f01918221e370dd1d50d8c987
refs/heads/cases-rbac-poc: 36781db1d940946b49aa82235665afaccac765b8
"refs/heads/cases_rac_ui": ab5c6ee319e9e2eb67142b2c0cca7dee2ec7ec29
"refs/heads/cases_rac_ui": 442c57c9a08b813d9b910a68c74e3178edcabb9c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [AggFunctionsMapping](./kibana-plugin-plugins-data-public.aggfunctionsmapping.md) &gt; [aggSinglePercentile](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggsinglepercentile.md)

## AggFunctionsMapping.aggSinglePercentile property

<b>Signature:</b>

```typescript
aggSinglePercentile: ReturnType<typeof aggSinglePercentile>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface AggFunctionsMapping
| [aggRange](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggrange.md) | <code>ReturnType&lt;typeof aggRange&gt;</code> | |
| [aggSerialDiff](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggserialdiff.md) | <code>ReturnType&lt;typeof aggSerialDiff&gt;</code> | |
| [aggSignificantTerms](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggsignificantterms.md) | <code>ReturnType&lt;typeof aggSignificantTerms&gt;</code> | |
| [aggSinglePercentile](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggsinglepercentile.md) | <code>ReturnType&lt;typeof aggSinglePercentile&gt;</code> | |
| [aggStdDeviation](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggstddeviation.md) | <code>ReturnType&lt;typeof aggStdDeviation&gt;</code> | |
| [aggSum](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggsum.md) | <code>ReturnType&lt;typeof aggSum&gt;</code> | |
| [aggTerms](./kibana-plugin-plugins-data-public.aggfunctionsmapping.aggterms.md) | <code>ReturnType&lt;typeof aggTerms&gt;</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export declare enum METRIC_TYPES
| PERCENTILE\_RANKS | <code>&quot;percentile_ranks&quot;</code> | |
| PERCENTILES | <code>&quot;percentiles&quot;</code> | |
| SERIAL\_DIFF | <code>&quot;serial_diff&quot;</code> | |
| SINGLE\_PERCENTILE | <code>&quot;single_percentile&quot;</code> | |
| STD\_DEV | <code>&quot;std_dev&quot;</code> | |
| SUM | <code>&quot;sum&quot;</code> | |
| SUM\_BUCKET | <code>&quot;sum_bucket&quot;</code> | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [AggFunctionsMapping](./kibana-plugin-plugins-data-server.aggfunctionsmapping.md) &gt; [aggSinglePercentile](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggsinglepercentile.md)

## AggFunctionsMapping.aggSinglePercentile property

<b>Signature:</b>

```typescript
aggSinglePercentile: ReturnType<typeof aggSinglePercentile>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface AggFunctionsMapping
| [aggRange](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggrange.md) | <code>ReturnType&lt;typeof aggRange&gt;</code> | |
| [aggSerialDiff](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggserialdiff.md) | <code>ReturnType&lt;typeof aggSerialDiff&gt;</code> | |
| [aggSignificantTerms](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggsignificantterms.md) | <code>ReturnType&lt;typeof aggSignificantTerms&gt;</code> | |
| [aggSinglePercentile](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggsinglepercentile.md) | <code>ReturnType&lt;typeof aggSinglePercentile&gt;</code> | |
| [aggStdDeviation](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggstddeviation.md) | <code>ReturnType&lt;typeof aggStdDeviation&gt;</code> | |
| [aggSum](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggsum.md) | <code>ReturnType&lt;typeof aggSum&gt;</code> | |
| [aggTerms](./kibana-plugin-plugins-data-server.aggfunctionsmapping.aggterms.md) | <code>ReturnType&lt;typeof aggTerms&gt;</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export declare enum METRIC_TYPES
| PERCENTILE\_RANKS | <code>&quot;percentile_ranks&quot;</code> | |
| PERCENTILES | <code>&quot;percentiles&quot;</code> | |
| SERIAL\_DIFF | <code>&quot;serial_diff&quot;</code> | |
| SINGLE\_PERCENTILE | <code>&quot;single_percentile&quot;</code> | |
| STD\_DEV | <code>&quot;std_dev&quot;</code> | |
| SUM | <code>&quot;sum&quot;</code> | |
| SUM\_BUCKET | <code>&quot;sum_bucket&quot;</code> | |
Expand Down
9 changes: 9 additions & 0 deletions branches/cases_rac_ui/docs/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ All supported operating systems support using systemd service files. Any system
*Impact:*
Any installations using `.deb` or `.rpm` packages using SysV will need to migrate to systemd.

[float]
=== TLS v1.0 and v1.1 are disabled by default

*Details:*
Support can be re-enabled by setting `--tls-min-1.0` in the `node.options` config file that can be found inside `kibana/config` folder or any other configured with the environment variable `KBN_PATH_CONF` (for example in Debian based system would be `/etc/kibana`).

*Impact:*
Browser and proxy clients communicating over TLS v1.0 and v1.1.

[float]
=== Platform removed from root folder name for `.tar.gz` and `.zip` archives

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Configure the search session settings in your `kibana.yml` configuration file.
[cols="2*<"]
|===
a| `xpack.data_enhanced.`
`search.sessions:enabled`
| Set to `true` (default) to enable search sessions.
`search.sessions.enabled`
| Set to `true` (default) to enable search sessions.

a| `xpack.data.enhanced.`
`search.sessions:trackingInterval`
| The frequency for updating the state of a search session. The default is 10s.
a| `xpack.data_enhanced.`
`search.sessions.trackingInterval`
| The frequency for updating the state of a search session. The default is 10s.

a| `xpack.data.enhanced.`
`search.sessions:defaultExpiration`
| How long search session results are stored before they are deleted.
Extending a search session resets the expiration by the same value. The default is 7d.
a| `xpack.data_enhanced.`
`search.sessions.defaultExpiration`
| How long search session results are stored before they are deleted.
Extending a search session resets the expiration by the same value. The default is 7d.
|===
2 changes: 1 addition & 1 deletion branches/cases_rac_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"dependencies": {
"@elastic/apm-rum": "^5.6.1",
"@elastic/apm-rum-react": "^1.2.5",
"@elastic/charts": "26.0.0",
"@elastic/charts": "26.1.0",
"@elastic/datemath": "link:packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.4",
"@elastic/ems-client": "7.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then
KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)"
fi
NODE_OPTIONS="--no-warnings --max-http-header-size=65536 --tls-min-v1.0 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" ${@}
NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" ${@}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const getAggTypes = () => ({
{ name: METRIC_TYPES.AVG, fn: metrics.getAvgMetricAgg },
{ name: METRIC_TYPES.SUM, fn: metrics.getSumMetricAgg },
{ name: METRIC_TYPES.MEDIAN, fn: metrics.getMedianMetricAgg },
{ name: METRIC_TYPES.SINGLE_PERCENTILE, fn: metrics.getSinglePercentileMetricAgg },
{ name: METRIC_TYPES.MIN, fn: metrics.getMinMetricAgg },
{ name: METRIC_TYPES.MAX, fn: metrics.getMaxMetricAgg },
{ name: METRIC_TYPES.STD_DEV, fn: metrics.getStdDeviationMetricAgg },
Expand Down Expand Up @@ -90,6 +91,7 @@ export const getAggTypesFunctions = () => [
metrics.aggGeoCentroid,
metrics.aggMax,
metrics.aggMedian,
metrics.aggSinglePercentile,
metrics.aggMin,
metrics.aggMovingAvg,
metrics.aggPercentileRanks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ describe('Aggs service', () => {
"avg",
"sum",
"median",
"single_percentile",
"min",
"max",
"std_dev",
Expand Down Expand Up @@ -128,6 +129,7 @@ describe('Aggs service', () => {
"avg",
"sum",
"median",
"single_percentile",
"min",
"max",
"std_dev",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export * from './max_fn';
export * from './max';
export * from './median_fn';
export * from './median';
export * from './single_percentile_fn';
export * from './single_percentile';
export * from './metric_agg_type';
export * from './metric_agg_types';
export * from './min_fn';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const metricAggFilter = [
'!geo_bounds',
'!geo_centroid',
'!filtered_metric',
'!single_percentile',
];

export const parentPipelineType = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const metricAggFilter: string[] = [
'!geo_bounds',
'!geo_centroid',
'!filtered_metric',
'!single_percentile',
];
const bucketAggFilter: string[] = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export enum METRIC_TYPES {
GEO_BOUNDS = 'geo_bounds',
GEO_CENTROID = 'geo_centroid',
MEDIAN = 'median',
SINGLE_PERCENTILE = 'single_percentile',
MIN = 'min',
MAX = 'max',
MOVING_FN = 'moving_avg',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { AggConfigs, IAggConfigs } from '../agg_configs';
import { mockAggTypesRegistry } from '../test_helpers';
import { METRIC_TYPES } from './metric_agg_types';

describe('AggTypeMetricSinglePercentileProvider class', () => {
let aggConfigs: IAggConfigs;

beforeEach(() => {
const typesRegistry = mockAggTypesRegistry();
const field = {
name: 'bytes',
};
const indexPattern = {
id: '1234',
title: 'logstash-*',
fields: {
getByName: () => field,
filter: () => [field],
},
} as any;

aggConfigs = new AggConfigs(
indexPattern,
[
{
id: METRIC_TYPES.SINGLE_PERCENTILE,
type: METRIC_TYPES.SINGLE_PERCENTILE,
schema: 'metric',
params: {
field: 'bytes',
percentile: 95,
},
},
],
{
typesRegistry,
}
);
});

it('requests the percentiles aggregation in the Elasticsearch query DSL', () => {
const dsl: Record<string, any> = aggConfigs.toDsl();

expect(dsl.single_percentile.percentiles.field).toEqual('bytes');
expect(dsl.single_percentile.percentiles.percents).toEqual([95]);
});

it('points to right value within multi metric for value bucket path', () => {
expect(aggConfigs.byId(METRIC_TYPES.SINGLE_PERCENTILE)!.getValueBucketPath()).toEqual(
`${METRIC_TYPES.SINGLE_PERCENTILE}.95`
);
});

it('converts the response', () => {
const agg = aggConfigs.getResponseAggs()[0];

expect(
agg.getValue({
[agg.id]: {
values: {
'95.0': 123,
},
},
})
).toEqual(123);
});

it('produces the expected expression ast', () => {
const agg = aggConfigs.getResponseAggs()[0];
expect(agg.toExpressionAst()).toMatchInlineSnapshot(`
Object {
"chain": Array [
Object {
"arguments": Object {
"enabled": Array [
true,
],
"field": Array [
"bytes",
],
"id": Array [
"single_percentile",
],
"percentile": Array [
95,
],
"schema": Array [
"metric",
],
},
"function": "aggSinglePercentile",
"type": "function",
},
],
"type": "expression",
}
`);
});

it('supports scripted fields', () => {
const typesRegistry = mockAggTypesRegistry();
const field = {
name: 'bytes',
scripted: true,
language: 'painless',
script: 'return 456',
};
const indexPattern = {
id: '1234',
title: 'logstash-*',
fields: {
getByName: () => field,
filter: () => [field],
},
} as any;

aggConfigs = new AggConfigs(
indexPattern,
[
{
id: METRIC_TYPES.SINGLE_PERCENTILE,
type: METRIC_TYPES.SINGLE_PERCENTILE,
schema: 'metric',
params: {
field: 'bytes',
percentile: 95,
},
},
],
{
typesRegistry,
}
);

expect(aggConfigs.toDsl()).toMatchSnapshot();
});
});
Loading

0 comments on commit 642d3f7

Please sign in to comment.