Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into threshold-exc…
Browse files Browse the repository at this point in the history
…eptions
  • Loading branch information
madirey committed Dec 7, 2020
2 parents 7b056d4 + b01f33e commit c8388f1
Show file tree
Hide file tree
Showing 438 changed files with 19,448 additions and 6,026 deletions.
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-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [maxWidth](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md)

## OverlayFlyoutOpenOptions.maxWidth property

<b>Signature:</b>

```typescript
maxWidth?: boolean | number | string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ export interface OverlayFlyoutOpenOptions
| ["data-test-subj"](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md) | <code>string</code> | |
| [maxWidth](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md) | <code>boolean &#124; number &#124; string</code> | |
| [ownFocus](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | <code>boolean</code> | |
| [size](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md) | <code>EuiFlyoutSize</code> | |

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-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [size](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md)

## OverlayFlyoutOpenOptions.size property

<b>Signature:</b>

```typescript
size?: EuiFlyoutSize;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ indexPatterns: {
isFilterable: typeof isFilterable;
isNestedField: typeof isNestedField;
validate: typeof validateIndexPattern;
getFromSavedObject: typeof getFromSavedObject;
flattenHitWrapper: typeof flattenHitWrapper;
formatHitProvider: typeof formatHitProvider;
}
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; [ISessionService](./kibana-plugin-plugins-data-server.isessionservice.md) &gt; [asScopedProvider](./kibana-plugin-plugins-data-server.isessionservice.asscopedprovider.md)

## ISessionService.asScopedProvider property

<b>Signature:</b>

```typescript
asScopedProvider: (core: CoreStart) => (request: KibanaRequest) => IScopedSessionService;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- 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; [ISessionService](./kibana-plugin-plugins-data-server.isessionservice.md)

## ISessionService interface

<b>Signature:</b>

```typescript
export interface ISessionService
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [asScopedProvider](./kibana-plugin-plugins-data-server.isessionservice.asscopedprovider.md) | <code>(core: CoreStart) =&gt; (request: KibanaRequest) =&gt; IScopedSessionService</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| [IndexPatternsService](./kibana-plugin-plugins-data-server.indexpatternsservice.md) | |
| [OptionedParamType](./kibana-plugin-plugins-data-server.optionedparamtype.md) | |
| [Plugin](./kibana-plugin-plugins-data-server.plugin.md) | |
| [SessionService](./kibana-plugin-plugins-data-server.sessionservice.md) | The OSS session service. See data\_enhanced in X-Pack for the background session service. |

## Enumerations

Expand Down Expand Up @@ -54,6 +55,7 @@
| [ISearchSetup](./kibana-plugin-plugins-data-server.isearchsetup.md) | |
| [ISearchStart](./kibana-plugin-plugins-data-server.isearchstart.md) | |
| [ISearchStrategy](./kibana-plugin-plugins-data-server.isearchstrategy.md) | Search strategy interface contains a search method that takes in a request and returns a promise that resolves to a response. |
| [ISessionService](./kibana-plugin-plugins-data-server.isessionservice.md) | |
| [KueryNode](./kibana-plugin-plugins-data-server.kuerynode.md) | |
| [OptionedValueProp](./kibana-plugin-plugins-data-server.optionedvalueprop.md) | |
| [PluginSetup](./kibana-plugin-plugins-data-server.pluginsetup.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- 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; [SessionService](./kibana-plugin-plugins-data-server.sessionservice.md) &gt; [(constructor)](./kibana-plugin-plugins-data-server.sessionservice._constructor_.md)

## SessionService.(constructor)

Constructs a new instance of the `SessionService` class

<b>Signature:</b>

```typescript
constructor();
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- 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; [SessionService](./kibana-plugin-plugins-data-server.sessionservice.md) &gt; [asScopedProvider](./kibana-plugin-plugins-data-server.sessionservice.asscopedprovider.md)

## SessionService.asScopedProvider() method

<b>Signature:</b>

```typescript
asScopedProvider(core: CoreStart): (request: KibanaRequest) => {
search: <Request_1 extends IKibanaSearchRequest<any>, Response_1 extends IKibanaSearchResponse<any>>(strategy: ISearchStrategy<Request_1, Response_1>, request: Request_1, options: import("../../../common").ISearchOptions, deps: import("../types").SearchStrategyDependencies) => import("rxjs").Observable<Response_1>;
};
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreStart</code> | |

<b>Returns:</b>

`(request: KibanaRequest) => {
search: <Request_1 extends IKibanaSearchRequest<any>, Response_1 extends IKibanaSearchResponse<any>>(strategy: ISearchStrategy<Request_1, Response_1>, request: Request_1, options: import("../../../common").ISearchOptions, deps: import("../types").SearchStrategyDependencies) => import("rxjs").Observable<Response_1>;
}`

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- 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; [SessionService](./kibana-plugin-plugins-data-server.sessionservice.md)

## SessionService class

The OSS session service. See data\_enhanced in X-Pack for the background session service.

<b>Signature:</b>

```typescript
export declare class SessionService implements ISessionService
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)()](./kibana-plugin-plugins-data-server.sessionservice._constructor_.md) | | Constructs a new instance of the <code>SessionService</code> class |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [asScopedProvider(core)](./kibana-plugin-plugins-data-server.sessionservice.asscopedprovider.md) | | |
| [search(strategy, args)](./kibana-plugin-plugins-data-server.sessionservice.search.md) | | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- 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; [SessionService](./kibana-plugin-plugins-data-server.sessionservice.md) &gt; [search](./kibana-plugin-plugins-data-server.sessionservice.search.md)

## SessionService.search() method

<b>Signature:</b>

```typescript
search<Request extends IKibanaSearchRequest, Response extends IKibanaSearchResponse>(strategy: ISearchStrategy<Request, Response>, ...args: Parameters<ISearchStrategy<Request, Response>['search']>): import("rxjs").Observable<Response>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| strategy | <code>ISearchStrategy&lt;Request, Response&gt;</code> | |
| args | <code>Parameters&lt;ISearchStrategy&lt;Request, Response&gt;['search']&gt;</code> | |
<b>Returns:</b>
`import("rxjs").Observable<Response>`
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import './register_globals';

export { monaco } from './monaco_imports';
export { XJsonLang } from './xjson';
export { PainlessLang, PainlessContext } from './painless';
export { PainlessLang, PainlessContext, PainlessAutocompleteField } from './painless';

/* eslint-disable-next-line @kbn/eslint/module_migration */
import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api';
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/painless/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ import { getSuggestionProvider } from './language';

export const PainlessLang = { ID, getSuggestionProvider, lexerRules };

export { PainlessContext } from './types';
export { PainlessContext, PainlessAutocompleteField } from './types';
7 changes: 5 additions & 2 deletions packages/kbn-monaco/src/painless/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { monaco } from '../monaco_imports';

import { WorkerProxyService, EditorStateService } from './services';
import { ID } from './constants';
import { PainlessContext, Field } from './types';
import { PainlessContext, PainlessAutocompleteField } from './types';
import { PainlessWorker } from './worker';
import { PainlessCompletionAdapter } from './completion_adapter';

Expand All @@ -38,7 +38,10 @@ monaco.languages.onLanguage(ID, async () => {
workerProxyService.setup();
});

export const getSuggestionProvider = (context: PainlessContext, fields?: Field[]) => {
export const getSuggestionProvider = (
context: PainlessContext,
fields?: PainlessAutocompleteField[]
) => {
editorStateService.setup(context, fields);

return new PainlessCompletionAdapter(worker, editorStateService);
Expand Down
8 changes: 4 additions & 4 deletions packages/kbn-monaco/src/painless/services/editor_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
* under the License.
*/

import { PainlessContext, Field } from '../types';
import { PainlessContext, PainlessAutocompleteField } from '../types';

export interface EditorState {
context: PainlessContext;
fields?: Field[];
fields?: PainlessAutocompleteField[];
}

export class EditorStateService {
context: PainlessContext = 'painless_test';
fields: Field[] = [];
fields: PainlessAutocompleteField[] = [];

public getState(): EditorState {
return {
Expand All @@ -35,7 +35,7 @@ export class EditorStateService {
};
}

public setup(context: PainlessContext, fields?: Field[]) {
public setup(context: PainlessContext, fields?: PainlessAutocompleteField[]) {
this.context = context;

if (fields) {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/painless/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface PainlessCompletionResult {
suggestions: PainlessCompletionItem[];
}

export interface Field {
export interface PainlessAutocompleteField {
name: string;
type: string;
}
8 changes: 5 additions & 3 deletions packages/kbn-monaco/src/painless/worker/lib/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
PainlessCompletionResult,
PainlessCompletionItem,
PainlessContext,
Field,
PainlessAutocompleteField,
} from '../../types';

import {
Expand Down Expand Up @@ -124,7 +124,9 @@ export const getClassMemberSuggestions = (
};
};

export const getFieldSuggestions = (fields: Field[]): PainlessCompletionResult => {
export const getFieldSuggestions = (
fields: PainlessAutocompleteField[]
): PainlessCompletionResult => {
const suggestions: PainlessCompletionItem[] = fields.map(({ name }) => {
return {
label: name,
Expand Down Expand Up @@ -168,7 +170,7 @@ export const getConstructorSuggestions = (suggestions: Suggestion[]): PainlessCo
export const getAutocompleteSuggestions = (
painlessContext: PainlessContext,
words: string[],
fields?: Field[]
fields?: PainlessAutocompleteField[]
): PainlessCompletionResult => {
const suggestions = mapContextToData[painlessContext].suggestions;
// What the user is currently typing
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-monaco/src/painless/worker/painless_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
* under the License.
*/

import { PainlessCompletionResult, PainlessContext, Field } from '../types';
import { PainlessCompletionResult, PainlessContext, PainlessAutocompleteField } from '../types';

import { getAutocompleteSuggestions } from './lib';

export class PainlessWorker {
public provideAutocompleteSuggestions(
currentLineChars: string,
context: PainlessContext,
fields?: Field[]
fields?: PainlessAutocompleteField[]
): PainlessCompletionResult {
// Array of the active line words, e.g., [boolean, isTrue, =, true]
const words = currentLineChars.replace('\t', '').split(' ');
Expand Down
4 changes: 3 additions & 1 deletion src/core/public/overlays/flyout/flyout_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/* eslint-disable max-classes-per-file */

import { EuiFlyout } from '@elastic/eui';
import { EuiFlyout, EuiFlyoutSize } from '@elastic/eui';
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { Subject } from 'rxjs';
Expand Down Expand Up @@ -93,6 +93,8 @@ export interface OverlayFlyoutOpenOptions {
closeButtonAriaLabel?: string;
ownFocus?: boolean;
'data-test-subj'?: string;
size?: EuiFlyoutSize;
maxWidth?: boolean | number | string;
}

interface StartDeps {
Expand Down
5 changes: 5 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { EnvironmentMode } from '@kbn/config';
import { EuiBreadcrumb } from '@elastic/eui';
import { EuiButtonEmptyProps } from '@elastic/eui';
import { EuiConfirmModalProps } from '@elastic/eui';
import { EuiFlyoutSize } from '@elastic/eui';
import { EuiGlobalToastListToast } from '@elastic/eui';
import { ExclusiveUnion } from '@elastic/eui';
import { History } from 'history';
Expand Down Expand Up @@ -885,7 +886,11 @@ export interface OverlayFlyoutOpenOptions {
// (undocumented)
closeButtonAriaLabel?: string;
// (undocumented)
maxWidth?: boolean | number | string;
// (undocumented)
ownFocus?: boolean;
// (undocumented)
size?: EuiFlyoutSize;
}

// @public
Expand Down
13 changes: 12 additions & 1 deletion src/core/server/http/base_path_proxy_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ export class BasePathProxyServer {
return this.devConfig.basePathProxyTargetPort;
}

public get host() {
return this.httpConfig.host;
}

public get port() {
return this.httpConfig.port;
}

constructor(
private readonly log: Logger,
private readonly httpConfig: HttpConfig,
Expand Down Expand Up @@ -92,7 +100,10 @@ export class BasePathProxyServer {
await this.server.start();

this.log.info(
`basepath proxy server running at ${this.server.info.uri}${this.httpConfig.basePath}`
`basepath proxy server running at ${Url.format({
host: this.server.info.uri,
pathname: this.httpConfig.basePath,
})}`
);
}

Expand Down
1 change: 1 addition & 0 deletions src/dev/cli_dev_mode/cli_dev_mode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ it('passes correct args to sub-classes', () => {
],
"gracefulTimeout": 5000,
"log": <TestLog>,
"mapLogLine": [Function],
"script": <absolute path>/scripts/kibana,
"watcher": Watcher {
"serverShouldRestart$": [MockFunction],
Expand Down
Loading

0 comments on commit c8388f1

Please sign in to comment.