Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-66764
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored May 20, 2020
2 parents 0d42879 + e21a1ed commit 78603b3
Show file tree
Hide file tree
Showing 1,052 changed files with 14,892 additions and 9,594 deletions.
26 changes: 26 additions & 0 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ SIEM::
Management::
* Editing Saved Objects (eg. Dashboards) via the "Inspect" JSON editor in Management corrupts objects {issue}66542[#66542]

Configuration::
* The `server.customResponseHeaders` option prevents {kib} from starting if headers are set using a type other than string.
To fix this, convert your boolean and number headers to strings. For example, use `my-header: "true"` instead of `my-header: true`.
{issue}66146[#66146]

[float]
[[enhancement-7.7.0]]
=== Enhancements
Expand Down Expand Up @@ -350,6 +355,15 @@ Platform::

See <<breaking-changes-7.6,breaking changes in 7.6>>.

[float]
[[known-issue-7.6.2]]
=== Known issue

Configuration::
* The `server.customResponseHeaders` option prevents {kib} from starting if headers are set using a type other than string.
To fix this, convert your boolean and number headers to strings. For example, use`my-header: "true"` instead of `my-header: true`.
{issue}66146[#66146]

[float]
[[bug-7.6.2]]
=== Bug fixes
Expand Down Expand Up @@ -392,6 +406,15 @@ Visualizations::

See <<breaking-changes-7.6,breaking changes in 7.6>>.

[float]
[[known-issue-7.6.1]]
=== Known issue

Configuration::
* The `server.customResponseHeaders` option prevents {kib} from starting if headers are set using a type other than string.
To fix this, convert your boolean and number headers to strings. For example, use `my-header: "true"` instead of `my-header: true`.
{issue}66146[#66146]

[float]
[[security-fix-7.6.1]]
=== Security issues
Expand Down Expand Up @@ -474,6 +497,9 @@ See also <<breaking-changes-7.6,breaking changes in 7.6>>.
=== Known issue

* When you use the default `dateFormat:tz: browser` setting, the timestamps appear in UTC instead of the local time of the user browser. To use the local time of the user browser, set `dateFormat:tz:` to the timezone of the user. {issue}57457[#57457]
* The `server.customResponseHeaders` option prevents {kib} from starting if headers are set using a type other than string.
To fix this, convert your boolean and number headers to strings. For example, use `my-header: "true"` instead of `my-header: true`.
{issue}66146[#66146]

[float]
[[enhancement-7.6.0]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Describes the factory used to create instances of the Saved Objects Client.
<b>Signature:</b>

```typescript
export declare type SavedObjectsClientFactory = ({ request, }: {
export declare type SavedObjectsClientFactory = ({ request, includedHiddenTypes, }: {
request: KibanaRequest;
includedHiddenTypes?: string[];
}) => SavedObjectsClientContract;
```
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-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsClientProviderOptions](./kibana-plugin-core-server.savedobjectsclientprovideroptions.md) &gt; [includedHiddenTypes](./kibana-plugin-core-server.savedobjectsclientprovideroptions.includedhiddentypes.md)

## SavedObjectsClientProviderOptions.includedHiddenTypes property

<b>Signature:</b>

```typescript
includedHiddenTypes?: string[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export interface SavedObjectsClientProviderOptions
| Property | Type | Description |
| --- | --- | --- |
| [excludedWrappers](./kibana-plugin-core-server.savedobjectsclientprovideroptions.excludedwrappers.md) | <code>string[]</code> | |
| [includedHiddenTypes](./kibana-plugin-core-server.savedobjectsclientprovideroptions.includedhiddentypes.md) | <code>string[]</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsre
<b>Signature:</b>

```typescript
createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository;
createInternalRepository: (includedHiddenTypes?: string[]) => ISavedObjectsRepository;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsre
<b>Signature:</b>

```typescript
createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository;
createScopedRepository: (req: KibanaRequest, includedHiddenTypes?: string[]) => ISavedObjectsRepository;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export interface SavedObjectsRepositoryFactory

| Property | Type | Description |
| --- | --- | --- |
| [createInternalRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createinternalrepository.md) | <code>(extraTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. |
| [createScopedRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createscopedrepository.md) | <code>(req: KibanaRequest, extraTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. |
| [createInternalRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createinternalrepository.md) | <code>(includedHiddenTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. |
| [createScopedRepository](./kibana-plugin-core-server.savedobjectsrepositoryfactory.createscopedrepository.md) | <code>(req: KibanaRequest, includedHiddenTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsre
<b>Signature:</b>

```typescript
createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository;
createInternalRepository: (includedHiddenTypes?: string[]) => ISavedObjectsRepository;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsre
<b>Signature:</b>

```typescript
createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository;
createScopedRepository: (req: KibanaRequest, includedHiddenTypes?: string[]) => ISavedObjectsRepository;
```

## Remarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export interface SavedObjectsServiceStart

| Property | Type | Description |
| --- | --- | --- |
| [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md) | <code>(extraTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. |
| [createScopedRepository](./kibana-plugin-core-server.savedobjectsservicestart.createscopedrepository.md) | <code>(req: KibanaRequest, extraTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. |
| [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md) | <code>(includedHiddenTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. |
| [createScopedRepository](./kibana-plugin-core-server.savedobjectsservicestart.createscopedrepository.md) | <code>(req: KibanaRequest, includedHiddenTypes?: string[]) =&gt; ISavedObjectsRepository</code> | Creates a [Saved Objects repository](./kibana-plugin-core-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. |
| [createSerializer](./kibana-plugin-core-server.savedobjectsservicestart.createserializer.md) | <code>() =&gt; SavedObjectsSerializer</code> | Creates a [serializer](./kibana-plugin-core-server.savedobjectsserializer.md) that is aware of all registered types. |
| [getScopedClient](./kibana-plugin-core-server.savedobjectsservicestart.getscopedclient.md) | <code>(req: KibanaRequest, options?: SavedObjectsClientProviderOptions) =&gt; SavedObjectsClientContract</code> | Creates a [Saved Objects client](./kibana-plugin-core-server.savedobjectsclientcontract.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. If other plugins have registered Saved Objects client wrappers, these will be applied to extend the functionality of the client.<!-- -->A client that is already scoped to the incoming request is also exposed from the route handler context see [RequestHandlerContext](./kibana-plugin-core-server.requesthandlercontext.md)<!-- -->. |
| [getTypeRegistry](./kibana-plugin-core-server.savedobjectsservicestart.gettyperegistry.md) | <code>() =&gt; ISavedObjectTypeRegistry</code> | Returns the [registry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) containing all registered [saved object types](./kibana-plugin-core-server.savedobjectstype.md) |
Expand Down
12 changes: 6 additions & 6 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,29 @@ Changing these settings may disable features of the APM App.
| `xpack.apm.enabled`
| Set to `false` to disable the APM app. Defaults to `true`.

| `xpack.apm.ui.enabled`
| `xpack.apm.ui.enabled` {ess-icon}
| Set to `false` to hide the APM app from the menu. Defaults to `true`.

| `xpack.apm.ui.transactionGroupBucketSize`
| Number of top transaction groups displayed in the APM app. Defaults to `100`.

| `xpack.apm.ui.maxTraceItems`
| `xpack.apm.ui.maxTraceItems` {ess-icon}
| Maximum number of child items displayed when viewing trace details. Defaults to `1000`.

| `apm_oss.indexPattern`
| `apm_oss.indexPattern` {ess-icon}
| The index pattern used for integrations with Machine Learning and Query Bar.
It must match all apm indices. Defaults to `apm-*`.

| `apm_oss.errorIndices`
| `apm_oss.errorIndices` {ess-icon}
| Matcher for all {apm-server-ref}/error-indices.html[error indices]. Defaults to `apm-*`.

| `apm_oss.onboardingIndices`
| Matcher for all onboarding indices. Defaults to `apm-*`.

| `apm_oss.spanIndices`
| `apm_oss.spanIndices` {ess-icon}
| Matcher for all {apm-server-ref}/span-indices.html[span indices]. Defaults to `apm-*`.

| `apm_oss.transactionIndices`
| `apm_oss.transactionIndices` {ess-icon}
| Matcher for all {apm-server-ref}/transaction-indices.html[transaction indices]. Defaults to `apm-*`.

| `apm_oss.metricsIndices`
Expand Down
1 change: 0 additions & 1 deletion examples/alerting_example/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "alertingExample",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["alerting_example"],
"server": true,
"ui": true,
"requiredPlugins": ["triggers_actions_ui", "charts", "data", "alerting", "actions"],
Expand Down
1 change: 0 additions & 1 deletion examples/bfetch_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "bfetchExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["bfetch_explorer"],
"server": true,
"ui": true,
"requiredPlugins": ["bfetch"],
Expand Down
1 change: 0 additions & 1 deletion examples/demo_search/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "demoSearch",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["demoSearch"],
"server": true,
"ui": true,
"requiredPlugins": ["data"],
Expand Down
1 change: 0 additions & 1 deletion examples/embeddable_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "embeddableExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["embeddable_examples"],
"server": true,
"ui": true,
"requiredPlugins": ["embeddable"],
Expand Down
1 change: 0 additions & 1 deletion examples/embeddable_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "embeddableExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["embeddable_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "inspector", "embeddable", "embeddableExamples"],
Expand Down
1 change: 0 additions & 1 deletion examples/search_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "searchExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["search_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["data", "demoSearch"],
Expand Down
1 change: 0 additions & 1 deletion examples/state_containers_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "stateContainersExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["state_containers_examples"],
"server": true,
"ui": true,
"requiredPlugins": ["navigation", "data"],
Expand Down
1 change: 0 additions & 1 deletion examples/ui_action_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "uiActionsExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_examples"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions"],
Expand Down
1 change: 0 additions & 1 deletion examples/ui_actions_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "uiActionsExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "uiActionsExamples"],
Expand Down
1 change: 0 additions & 1 deletion examples/url_generators_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "urlGeneratorsExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["url_generators_examples"],
"server": false,
"ui": true,
"requiredPlugins": ["share"],
Expand Down
1 change: 0 additions & 1 deletion examples/url_generators_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "urlGeneratorsExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["url_generators_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["share", "urlGeneratorsExamples"],
Expand Down
1 change: 1 addition & 0 deletions src/cli/cluster/run_kbn_optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function runKbnOptimizer(opts: Record<string, any>, config: LegacyConfig)
repoRoot: REPO_ROOT,
watch: true,
includeCoreBundle: true,
cache: !!opts.cache,
oss: !!opts.oss,
examples: !!opts.runExamples,
pluginPaths: config.get('plugins.paths'),
Expand Down
1 change: 1 addition & 0 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export default function(program) {
"Don't put a proxy in front of the dev server, which adds a random basePath"
)
.option('--no-watch', 'Prevents automatic restarts of the server in --dev mode')
.option('--no-cache', 'Disable the kbn/optimizer cache')
.option('--no-dev-config', 'Prevents loading the kibana.dev.yml file in --dev mode');
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ my_plugin/
   ├── index.ts
   └── plugin.ts
```
- [Manifest file](/docs/development/core/server/kibana-plugin-server.pluginmanifest.md) should be defined on top level.
- [Manifest file](/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md) should be defined on top level.
- Both `server` and `public` should have an `index.ts` and a `plugin.ts` file:
- `index.ts` should only contain:
- The `plugin` export
Expand Down
1 change: 1 addition & 0 deletions src/core/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ import { npStart: { plugins } } from 'ui/new_platform';
| `ui/filter_manager` | `plugins.data.filter` | -- |
| `ui/index_patterns` | `plugins.data.indexPatterns` |
| `import 'ui/management'` | `plugins.management.sections` | |
| `import 'ui/registry/field_format_editors'` | `plugins.indexPatternManagement.fieldFormatEditors` | |
| `ui/registry/field_formats` | `plugins.data.fieldFormats` | |
| `ui/registry/feature_catalogue` | `plugins.home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. |
| `ui/registry/vis_types` | `plugins.visualizations` | -- |
Expand Down
16 changes: 11 additions & 5 deletions src/core/MIGRATION_EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ APIs to their New Platform equivalents.
- [Migration Examples](#migration-examples)
- [Configuration](#configuration)
- [Declaring config schema](#declaring-config-schema)
- [Using New Platform config in a new plugin](#using-new-platform-config-in-a-new-plugin)
- [Using New Platform config from a Legacy plugin](#using-new-platform-config-from-a-legacy-plugin)
- [Create a New Platform plugin](#create-a-new-platform-plugin)
- [HTTP Routes](#http-routes)
Expand All @@ -15,11 +16,16 @@ APIs to their New Platform equivalents.
- [4. New Platform plugin](#4-new-platform-plugin)
- [Accessing Services](#accessing-services)
- [Migrating Hapi "pre" handlers](#migrating-hapi-pre-handlers)
- [Simple example](#simple-example)
- [Full Example](#full-example)
- [Chrome](#chrome)
- [Updating an application navlink](#updating-application-navlink)
- [Updating an application navlink](#updating-an-application-navlink)
- [Chromeless Applications](#chromeless-applications)
- [Render HTML Content](#render-html-content)
- [Saved Objects types](#saved-objects-types)
- [Concrete example](#concrete-example)
- [Changes in structure compared to legacy](#changes-in-structure-compared-to-legacy)
- [Remarks](#remarks)
- [UiSettings](#uisettings)

## Configuration
Expand Down Expand Up @@ -65,7 +71,7 @@ export type MyPluginConfig = TypeOf<typeof config.schema>;
### Using New Platform config in a new plugin

After setting the config schema for your plugin, you might want to reach the configuration in the plugin.
It is provided as part of the [PluginInitializerContext](../../docs/development/core/server/kibana-plugin-server.plugininitializercontext.md)
It is provided as part of the [PluginInitializerContext](../../docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.md)
in the *constructor* of the plugin:

```ts
Expand Down Expand Up @@ -210,9 +216,9 @@ new kibana.Plugin({
In the legacy platform, plugins have direct access to the Hapi `server` object
which gives full access to all of Hapi's API. In the New Platform, plugins have
access to the
[HttpServiceSetup](/docs/development/core/server/kibana-plugin-server.httpservicesetup.md)
[HttpServiceSetup](/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md)
interface, which is exposed via the
[CoreSetup](/docs/development/core/server/kibana-plugin-server.coresetup.md)
[CoreSetup](/docs/development/core/server/kibana-plugin-core-server.coresetup.md)
object injected into the `setup` method of server-side plugins.
This interface has a different API with slightly different behaviors.
Expand Down Expand Up @@ -415,7 +421,7 @@ Services in the Legacy Platform were typically available via methods on either
`server.plugins.*`, `server.*`, or `req.*`. In the New Platform, all services
are available via the `context` argument to the route handler. The type of this
argument is the
[RequestHandlerContext](/docs/development/core/server/kibana-plugin-server.requesthandlercontext.md).
[RequestHandlerContext](/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md).
The APIs available here will include all Core services and any services
registered by plugins this plugin depends on.
Expand Down
Loading

0 comments on commit 78603b3

Please sign in to comment.