Skip to content

Commit 1a85d85

Browse files
committed
Merge branch 'ilm/fix/pre-existing-policy-with-no-existing-repository' of github.com:jloleysens/kibana into ilm/fix/pre-existing-policy-with-no-existing-repository
* 'ilm/fix/pre-existing-policy-with-no-existing-repository' of github.com:jloleysens/kibana: fix empty string in selected indices (#76855) [Security Solution] Refactor OverviewHost and OverviewNetwork to use Search Strategy (#76409) Use Search API in Timelion (sync) (#75115) [telemetry] expose getIsOptedIn function in plugin start contract (#75143) [ILM] Clean up remaining js files and any typings (#76803) [Logs UI] Shared `<LogStream />` component (#76262) [Security Solution] Add unit test for all hosts (#76752) [Security Solution] Add unit test for authentications search strategy (#76665) Do not apply search source data for tsvb (#75137) [Security Solution] Refactor NetworkDns to use Search Strategy (#76250) [SECURITY SOLUTION] Adds 'cypress:open-as-ci' command (#76125) [Logs UI] Update alert executor tests (#75764) [Functional] Unskip vega tests and fix flakiness (#76600) [Data] Query String Input accepts classname prop (#76848) [ML] Swim lane pagination for viewing by job id (#76847) [Security Solution] Refactor MatrixHistogram to use Search Strategy (#76603) [APM] Use the outcome field to calculate the transaction error rate chart (#75528) [APM] Use observer.hostname instead of observer.name (#76074) Legacy logging: fix remoteAddress being duplicated in userAgent field (#76751)
2 parents 0a646d5 + e104911 commit 1a85d85

File tree

206 files changed

+72220
-3299
lines changed

Some content is hidden

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

206 files changed

+72220
-3299
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ES\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-server.es_search_strategy.md)
4+
5+
## ES\_SEARCH\_STRATEGY variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
ES_SEARCH_STRATEGY = "es"
11+
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export interface ISearchStart<SearchStrategyRequest extends IEsSearchRequest = I
1616
| --- | --- | --- |
1717
| [aggs](./kibana-plugin-plugins-data-server.isearchstart.aggs.md) | <code>AggsStart</code> | |
1818
| [getSearchStrategy](./kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md) | <code>(name: string) =&gt; ISearchStrategy&lt;SearchStrategyRequest, SearchStrategyResponse&gt;</code> | Get other registered search strategies. For example, if a new strategy needs to use the already-registered ES search strategy, it can use this function to accomplish that. |
19-
| [search](./kibana-plugin-plugins-data-server.isearchstart.search.md) | <code>(context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) =&gt; Promise&lt;IKibanaSearchResponse&gt;</code> | |
19+
| [search](./kibana-plugin-plugins-data-server.isearchstart.search.md) | <code>(context: RequestHandlerContext, request: IEsSearchRequest, options: ISearchOptions) =&gt; Promise&lt;IEsSearchResponse&gt;</code> | |
2020

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
search: (context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) => Promise<IKibanaSearchResponse>;
10+
search: (context: RequestHandlerContext, request: IEsSearchRequest, options: ISearchOptions) => Promise<IEsSearchResponse>;
1111
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
| [AggGroupNames](./kibana-plugin-plugins-data-server.agggroupnames.md) | |
7272
| [castEsToKbnFieldTypeName](./kibana-plugin-plugins-data-server.castestokbnfieldtypename.md) | Get the KbnFieldType name for an esType string |
7373
| [config](./kibana-plugin-plugins-data-server.config.md) | |
74+
| [ES\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-server.es_search_strategy.md) | |
7475
| [esFilters](./kibana-plugin-plugins-data-server.esfilters.md) | |
7576
| [esKuery](./kibana-plugin-plugins-data-server.eskuery.md) | |
7677
| [esQuery](./kibana-plugin-plugins-data-server.esquery.md) | |

src/legacy/server/logging/log_format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default class TransformObjStream extends Stream.Transform {
9191
method: event.method || '',
9292
headers: event.headers,
9393
remoteAddress: source.remoteAddress,
94-
userAgent: source.remoteAddress,
94+
userAgent: source.userAgent,
9595
referer: source.referer,
9696
};
9797

src/legacy/server/logging/log_format_json.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ describe('KbnLoggerJsonFormat', () => {
6565
},
6666
};
6767
const result = await createPromiseFromStreams([createListStream([event]), format]);
68-
const { type, method, statusCode, message } = JSON.parse(result);
68+
const { type, method, statusCode, message, req } = JSON.parse(result);
6969

7070
expect(type).toBe('response');
7171
expect(method).toBe('GET');
7272
expect(statusCode).toBe(200);
7373
expect(message).toBe('GET /path/to/resource 200 12000ms - 13.0B');
74+
expect(req.remoteAddress).toBe('127.0.0.1');
75+
expect(req.userAgent).toBe('Test Thing');
7476
});
7577

7678
it('ops', async () => {

src/plugins/data/public/public.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ export interface QueryState {
14651465
// Warning: (ae-missing-release-tag) "QueryStringInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
14661466
//
14671467
// @public (undocumented)
1468-
export const QueryStringInput: React.FC<Pick<Props_3, "query" | "prepend" | "size" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>;
1468+
export const QueryStringInput: React.FC<Pick<Props_3, "query" | "prepend" | "size" | "className" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>;
14691469

14701470
// @public (undocumented)
14711471
export type QuerySuggestion = QuerySuggestionBasic | QuerySuggestionField;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import React, { Component, RefObject, createRef } from 'react';
2121
import { i18n } from '@kbn/i18n';
22-
22+
import classNames from 'classnames';
2323
import {
2424
EuiTextArea,
2525
EuiOutsideClickDetector,
@@ -62,6 +62,7 @@ interface Props {
6262
onSubmit?: (query: Query) => void;
6363
dataTestSubj?: string;
6464
size?: SuggestionsListSize;
65+
className?: string;
6566
}
6667

6768
interface State {
@@ -586,9 +587,12 @@ export class QueryStringInputUI extends Component<Props, State> {
586587
'aria-owns': 'kbnTypeahead__items',
587588
};
588589
const ariaCombobox = { ...isSuggestionsVisible, role: 'combobox' };
589-
590+
const className = classNames(
591+
'euiFormControlLayout euiFormControlLayout--group kbnQueryBar__wrap',
592+
this.props.className
593+
);
590594
return (
591-
<div className="euiFormControlLayout euiFormControlLayout--group kbnQueryBar__wrap">
595+
<div className={className}>
592596
{this.props.prepend}
593597
<EuiOutsideClickDetector onOutsideClick={this.onOutsideClick}>
594598
<div

src/plugins/data/server/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export {
201201
ISearchOptions,
202202
IEsSearchRequest,
203203
IEsSearchResponse,
204+
ES_SEARCH_STRATEGY,
204205
// tabify
205206
TabbedAggColumn,
206207
TabbedAggRow,

src/plugins/data/server/search/routes/search.test.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,24 @@ describe('Search service', () => {
4848
});
4949

5050
it('handler calls context.search.search with the given request and strategy', async () => {
51-
const response = { id: 'yay' };
51+
const response = {
52+
id: 'yay',
53+
rawResponse: {
54+
took: 100,
55+
timed_out: true,
56+
_shards: {
57+
total: 0,
58+
successful: 0,
59+
failed: 0,
60+
skipped: 0,
61+
},
62+
hits: {
63+
total: 0,
64+
max_score: 0,
65+
hits: [],
66+
},
67+
},
68+
};
5269
mockDataStart.search.search.mockResolvedValue(response);
5370
const mockContext = {};
5471
const mockBody = { id: undefined, params: {} };

0 commit comments

Comments
 (0)