Skip to content

Commit

Permalink
Merge branch 'master' into tsconfig-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Feb 8, 2021
2 parents 9c76fbb + e4794af commit 6a6dd54
Show file tree
Hide file tree
Showing 497 changed files with 10,245 additions and 3,816 deletions.
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@
# Import shared settings first so we can override below
import %workspace%/.bazelrc.common

## Disabled for now
# Remote cache settings for local env
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
# build --incompatible_remote_results_ignore_disk=true
# build --remote_accept_cached=true
# build --remote_upload_local_results=false

# BuildBuddy
## Metadata settings
build --workspace_status_command=$(pwd)/src/dev/bazel_workspace_status.sh
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages

10 changes: 8 additions & 2 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,15 @@ pipeline {
}

def notifyStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
notify(context: 'end2end-for-apm-ui', description: description, status: status, targetUrl: getBlueoceanTabURL('pipeline'))
}

def notifyTestStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
notify(context: 'end2end-for-apm-ui', description: description, status: status, targetUrl: getBlueoceanTabURL('tests'))
}

def notify(Map args = [:]) {
retryWithSleep(retries: 2, seconds: 5, backoff: true) {
githubNotify(context: args.context, description: args.description, status: args.status, targetUrl: args.targetUrl)
}
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ target
snapshots.js

!/.eslintrc.js
!.storybook

# plugin overrides
/src/core/lib/kbn_internal_native_observable
Expand Down
22 changes: 21 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,22 @@ module.exports = {

/**
* Enterprise Search overrides
* NOTE: We also have a single rule at the bottom of the file that
* overrides Prettier's default of not linting unnecessary backticks
*/
{
// All files
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react/jsx-boolean-value': ['error', 'never'],
},
},
{
// Source files only - allow `any` in test/mock files
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
},
Expand Down Expand Up @@ -1260,6 +1270,16 @@ module.exports = {
...require('eslint-config-prettier/@typescript-eslint').rules,
},
},
/**
* Enterprise Search Prettier override
* Lints unnecessary backticks - @see https://github.com/prettier/eslint-config-prettier/blob/main/README.md#forbid-unnecessary-backticks
*/
{
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
rules: {
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
},
},

{
files: [
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/architecture/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ To begin plugin development, we recommend reading our overview of how plugins wo
* <<kibana-platform-plugin-api>>

Our developer services are changing all the time. One of the best ways to discover and learn about them is to read the available
READMEs from all the plugins inside our {kib-repo}tree/{branch}/src/plugins[open source plugins folder] and our
{kib-repo}/tree/{branch}/x-pack/plugins[commercial plugins folder].
READMEs inside our plugins folders: {kib-repo}tree/{branch}/src/plugins[src/plugins] and
{kib-repo}/tree/{branch}/x-pack/plugins[x-pack/plugins].

A few services also automatically generate api documentation which can be browsed inside the {kib-repo}tree/{branch}/docs/development[docs/development section of our repo]

Expand Down
18 changes: 0 additions & 18 deletions docs/developer/getting-started/running-kibana-advanced.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ By default, you can log in with username `elastic` and password
`changeme`. See the `--help` options on `yarn es <command>` if
you’d like to configure a different password.

[discrete]
=== Running {kib} in Open-Source mode

If you’re looking to only work with the open-source software, supply the
license type to `yarn es`:

[source,bash]
----
yarn es snapshot --license oss
----

And start {kib} with only open-source code:

[source,bash]
----
yarn start --oss
----

[discrete]
=== Unsupported URL Type

Expand Down
12 changes: 5 additions & 7 deletions docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,20 @@ export function plugin(initializerContext: PluginInitializerContext) {
*plugins/my_plugin/(public|server)/plugin.ts*
[source,typescript]
----
import type { Observable } from 'rxjs';
import { first } from 'rxjs/operators';
import { CoreSetup, Logger, Plugin, PluginInitializerContext, PluginName } from 'kibana/server';
import type { MyPluginConfig } from './config';
export class MyPlugin implements Plugin {
private readonly config$: Observable<MyPluginConfig>;
private readonly config: MyPluginConfig;
private readonly log: Logger;
constructor(private readonly initializerContext: PluginInitializerContext) {
this.log = initializerContext.logger.get();
this.config$ = initializerContext.config.create();
this.config = initializerContext.config.get<MyPluginConfig>();
}
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const isEnabled = await this.config$.pipe(first()).toPromise();
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const { someConfigValue } = this.config;
}
}
----
Expand All @@ -96,7 +94,7 @@ Additionally, some plugins need to access the runtime env configuration.
[source,typescript]
----
export class MyPlugin implements Plugin {
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const { mode: { dev }, packageInfo: { version } } = this.initializerContext.env
}
----
Expand Down
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-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md)

## AsyncPlugin interface

> Warning: This API is now obsolete.
>
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-public.plugin.md)
>
A plugin with asynchronous lifecycle methods.

<b>Signature:</b>

```typescript
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object>
```

## Methods

| Method | Description |
| --- | --- |
| [setup(core, plugins)](./kibana-plugin-core-public.asyncplugin.setup.md) | |
| [start(core, plugins)](./kibana-plugin-core-public.asyncplugin.start.md) | |
| [stop()](./kibana-plugin-core-public.asyncplugin.stop.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-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [setup](./kibana-plugin-core-public.asyncplugin.setup.md)

## AsyncPlugin.setup() method

<b>Signature:</b>

```typescript
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreSetup&lt;TPluginsStart, TStart&gt;</code> | |
| plugins | <code>TPluginsSetup</code> | |

<b>Returns:</b>

`TSetup | Promise<TSetup>`

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-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [start](./kibana-plugin-core-public.asyncplugin.start.md)

## AsyncPlugin.start() method

<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
```

## Parameters

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

<b>Returns:</b>

`TStart | Promise<TStart>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- 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; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [stop](./kibana-plugin-core-public.asyncplugin.stop.md)

## AsyncPlugin.stop() method

<b>Signature:</b>

```typescript
stop?(): void;
```
<b>Returns:</b>
`void`
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | |
| [AppMeta](./kibana-plugin-core-public.appmeta.md) | Input type for meta data for an application.<!-- -->Meta fields include <code>keywords</code> and <code>searchDeepLinks</code> Keywords is an array of string with which to associate the app, must include at least one unique string as an array. <code>searchDeepLinks</code> is an array of links that represent secondary in-app locations for the app. |
| [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) | |
| [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) | A plugin with asynchronous lifecycle methods. |
| [Capabilities](./kibana-plugin-core-public.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. |
| [ChromeBadge](./kibana-plugin-core-public.chromebadge.md) | |
| [ChromeBrand](./kibana-plugin-core-public.chromebrand.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup |

<b>Returns:</b>

`TSetup | Promise<TSetup>`
`TSetup`

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
start(core: CoreStart, plugins: TPluginsStart): TStart;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;

<b>Returns:</b>

`TStart | Promise<TStart>`
`TStart`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The `plugin` export at the root of a plugin's `public` directory should conform
<b>Signature:</b>

```typescript
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart> | AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md)

## AsyncPlugin interface

> Warning: This API is now obsolete.
>
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-server.plugin.md)
>
A plugin with asynchronous lifecycle methods.

<b>Signature:</b>

```typescript
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object>
```

## Methods

| Method | Description |
| --- | --- |
| [setup(core, plugins)](./kibana-plugin-core-server.asyncplugin.setup.md) | |
| [start(core, plugins)](./kibana-plugin-core-server.asyncplugin.start.md) | |
| [stop()](./kibana-plugin-core-server.asyncplugin.stop.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-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [setup](./kibana-plugin-core-server.asyncplugin.setup.md)

## AsyncPlugin.setup() method

<b>Signature:</b>

```typescript
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreSetup</code> | |
| plugins | <code>TPluginsSetup</code> | |

<b>Returns:</b>

`TSetup | Promise<TSetup>`

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-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [start](./kibana-plugin-core-server.asyncplugin.start.md)

## AsyncPlugin.start() method

<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
```

## Parameters

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

<b>Returns:</b>

`TStart | Promise<TStart>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [stop](./kibana-plugin-core-server.asyncplugin.stop.md)

## AsyncPlugin.stop() method

<b>Signature:</b>

```typescript
stop?(): void;
```
<b>Returns:</b>
`void`
1 change: 1 addition & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [AppCategory](./kibana-plugin-core-server.appcategory.md) | A category definition for nav links to know where to sort them in the left hand nav |
| [AssistanceAPIResponse](./kibana-plugin-core-server.assistanceapiresponse.md) | |
| [AssistantAPIClientParams](./kibana-plugin-core-server.assistantapiclientparams.md) | |
| [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) | A plugin with asynchronous lifecycle methods. |
| [Authenticated](./kibana-plugin-core-server.authenticated.md) | |
| [AuthNotHandled](./kibana-plugin-core-server.authnothandled.md) | |
| [AuthRedirected](./kibana-plugin-core-server.authredirected.md) | |
Expand Down
Loading

0 comments on commit 6a6dd54

Please sign in to comment.