Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into security/migrate-…
Browse files Browse the repository at this point in the history
…from-reserved
  • Loading branch information
legrego committed Jun 10, 2020
2 parents cc9d20a + 3197a00 commit 82ffdf5
Show file tree
Hide file tree
Showing 1,235 changed files with 86,905 additions and 71,824 deletions.
38 changes: 28 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ module.exports = {
{
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
},
},
Expand Down Expand Up @@ -198,9 +197,12 @@ module.exports = {
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['(src|x-pack)/plugins/*/server/**/*'],
errorMessage: `Public code can not import from server, use a common directory.`,
target: [
'(src|x-pack)/plugins/*/server/**/*',
'!x-pack/plugins/apm/**/*', // https://github.com/elastic/kibana/issues/67210
],
from: ['(src|x-pack)/plugins/*/public/**/*'],
errorMessage: `Server code can not import from public, use a common directory.`,
},
{
target: ['(src|x-pack)/plugins/*/common/**/*'],
Expand Down Expand Up @@ -590,8 +592,11 @@ module.exports = {
* Security Solution overrides
*/
{
// front end typescript and javascript files only
files: ['x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}'],
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}',
'x-pack/plugins/security_solution/common/**/*.{js,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
Expand Down Expand Up @@ -758,10 +763,6 @@ module.exports = {
'react/jsx-no-target-blank': 'error',
'react/jsx-fragments': 'error',
'react/jsx-sort-default-props': 'error',
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'symbol-description': 'error',
'vars-on-top': 'error',
Expand All @@ -771,6 +772,23 @@ module.exports = {
/**
* Lists overrides
*/
{
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/lists/public/**/*.{js,ts,tsx}',
'x-pack/plugins/lists/common/**/*.{js,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
'error',
{
// prevents UI code from importing server side code and then webpack including it when doing builds
patterns: ['**/server/*'],
},
],
},
},
{
// typescript and javascript for front and back end
files: ['x-pack/plugins/lists/**/*.{js,ts,tsx}'],
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui

# App Architecture
/examples/developer_examples/ @elastic/kibana-app-arch
/examples/url_generators_examples/ @elastic/kibana-app-arch
/examples/url_generators_explorer/ @elastic/kibana-app-arch
/packages/kbn-interpreter/ @elastic/kibana-app-arch
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.es
.DS_Store
.node_binaries
.native_modules
node_modules
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
Expand Down
17 changes: 11 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,18 +661,23 @@ To build the docs, you must clone the [elastic/docs](https://github.com/elastic/
repo as a sibling of your kibana repo. Follow the instructions in that project's
README for getting the docs tooling set up.

**To build the docs and open them in your browser:**
**To build the Kibana docs and open them in your browser:**

```bash
./docs/build_docs --doc kibana/docs/index.asciidoc --chunk 1 --open
```
or

```bash
node scripts/docs.js --open
```

### Release Notes Process
### Release Notes process

Part of this process only applies to maintainers, since it requires access to GitHub labels.

Kibana publishes major, minor and patch releases periodically through the year. During this process we run a script against this repo to collect the applicable PRs against that release and generate [Release Notes](https://www.elastic.co/guide/en/kibana/current/release-notes.html).
To include your change in the Release Notes:
Kibana publishes [Release Notes](https://www.elastic.co/guide/en/kibana/current/release-notes.html) for major and minor releases. To generate the Release Notes, the writers run a script against this repo to collect the merged PRs against the release.
To include your PRs in the Release Notes:

1. In the title, summarize what the PR accomplishes in language that is meaningful to the user. In general, use present tense (for example, Adds, Fixes) in sentence case.
2. Label the PR with the targeted version (ex: `v7.3.0`).
Expand All @@ -681,9 +686,9 @@ To include your change in the Release Notes:
* For an external-facing fix, use `release_note:fix`. Exception: docs, build, and test fixes do not go in the Release Notes. Neither fixes for issues that were only on `master` and never have been released.
* For a deprecated feature, use `release_note:deprecation`.
* For a breaking change, use `release_note:breaking`.
* To **NOT** include your changes in the Release Notes, please use `release_note:skip`.
* To **NOT** include your changes in the Release Notes, use `release_note:skip`.

We also produce a blog post that details more important breaking API changes every minor and major release. If the PR includes a breaking API change, apply the label `release_note:dev_docs`. Additionally add a brief summary of the break at the bottom of the PR using the format below:
We also produce a blog post that details more important breaking API changes in every major and minor release. When your PR includes a breaking API change, add the `release_note:dev_docs` label, and add a brief summary of the break at the bottom of the PR using the format below:

```
# Dev Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-tools/console/console.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ curl -XGET "http://localhost:9200/_search" -d'
----------------------------------

When you paste the command into Console, {kib} automatically converts it
to Console syntax. Alternatively, if you want to want to see Console syntax in cURL,
to Console syntax. Alternatively, if you want to see Console syntax in cURL,
click the action icon (image:dev-tools/console/images/wrench.png[]) and select *Copy as cURL*.

[float]
Expand Down
6 changes: 6 additions & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [URLMeaningfulParts](./kibana-plugin-core-public.urlmeaningfulparts.md) | We define our own typings because the current version of @<!-- -->types/node declares properties to be optional "hostname?: string". Although, parse call returns "hostname: null \| string". |
| [UserProvidedValues](./kibana-plugin-core-public.userprovidedvalues.md) | Describes the values explicitly set by user. |

## Variables

| Variable | Description |
| --- | --- |
| [URL\_MAX\_LENGTH](./kibana-plugin-core-public.url_max_length.md) | The max URL length allowed by the current browser. Should be used to display warnings to users when query parameters cause URL to exceed this limit. |

## Type Aliases

| Type Alias | Description |
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-core-public](./kibana-plugin-core-public.md) &gt; [URL\_MAX\_LENGTH](./kibana-plugin-core-public.url_max_length.md)

## URL\_MAX\_LENGTH variable

The max URL length allowed by the current browser. Should be used to display warnings to users when query parameters cause URL to exceed this limit.

<b>Signature:</b>

```typescript
URL_MAX_LENGTH: number
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!-- 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; [getSearchParamsFromRequest](./kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md)

## getSearchParamsFromRequest() function

<b>Signature:</b>

```typescript
export declare function getSearchParamsFromRequest(searchRequest: SearchRequest, dependencies: {
injectedMetadata: CoreStart['injectedMetadata'];
uiSettings: IUiSettingsClient;
}): {
rest_total_hits_as_int: boolean;
ignore_unavailable: boolean;
ignore_throttled: boolean;
max_concurrent_shard_requests: any;
preference: any;
timeout: string | undefined;
index: any;
body: any;
};
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| searchRequest | <code>SearchRequest</code> | |
| dependencies | <code>{</code><br/><code> injectedMetadata: CoreStart['injectedMetadata'];</code><br/><code> uiSettings: IUiSettingsClient;</code><br/><code>}</code> | |

<b>Returns:</b>

`{
rest_total_hits_as_int: boolean;
ignore_unavailable: boolean;
ignore_throttled: boolean;
max_concurrent_shard_requests: any;
preference: any;
timeout: string | undefined;
index: any;
body: any;
}`

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Constructs a new instance of the `IndexPattern` class
<b>Signature:</b>

```typescript
constructor(id: string | undefined, getConfig: any, savedObjectsClient: SavedObjectsClientContract, apiClient: IIndexPatternsApiClient, patternCache: any);
constructor(id: string | undefined, getConfig: any, savedObjectsClient: SavedObjectsClientContract, apiClient: IIndexPatternsApiClient, patternCache: PatternCache);
```

## Parameters
Expand All @@ -20,5 +20,5 @@ constructor(id: string | undefined, getConfig: any, savedObjectsClient: SavedObj
| getConfig | <code>any</code> | |
| savedObjectsClient | <code>SavedObjectsClientContract</code> | |
| apiClient | <code>IIndexPatternsApiClient</code> | |
| patternCache | <code>any</code> | |
| patternCache | <code>PatternCache</code> | |

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
| [getEsPreference(uiSettings, sessionId)](./kibana-plugin-plugins-data-public.getespreference.md) | |
| [getQueryLog(uiSettings, storage, appName, language)](./kibana-plugin-plugins-data-public.getquerylog.md) | |
| [getSearchErrorType({ message })](./kibana-plugin-plugins-data-public.getsearcherrortype.md) | |
| [getSearchParamsFromRequest(searchRequest, dependencies)](./kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md) | |
| [getTime(indexPattern, timeRange, options)](./kibana-plugin-plugins-data-public.gettime.md) | |
| [plugin(initializerContext)](./kibana-plugin-plugins-data-public.plugin.md) | |

Expand Down Expand Up @@ -67,7 +68,6 @@
| [IndexPatternTypeMeta](./kibana-plugin-plugins-data-public.indexpatterntypemeta.md) | |
| [IRequestTypesMap](./kibana-plugin-plugins-data-public.irequesttypesmap.md) | |
| [IResponseTypesMap](./kibana-plugin-plugins-data-public.iresponsetypesmap.md) | |
| [ISearchContext](./kibana-plugin-plugins-data-public.isearchcontext.md) | |
| [ISearchOptions](./kibana-plugin-plugins-data-public.isearchoptions.md) | |
| [ISearchStrategy](./kibana-plugin-plugins-data-public.isearchstrategy.md) | Search strategy interface contains a search method that takes in a request and returns a promise that resolves to a response. |
| [ISyncSearchRequest](./kibana-plugin-plugins-data-public.isyncsearchrequest.md) | |
Expand Down Expand Up @@ -157,5 +157,4 @@
| [TabbedAggRow](./kibana-plugin-plugins-data-public.tabbedaggrow.md) | \* |
| [TimefilterContract](./kibana-plugin-plugins-data-public.timefiltercontract.md) | |
| [TimeHistoryContract](./kibana-plugin-plugins-data-public.timehistorycontract.md) | |
| [TSearchStrategyProvider](./kibana-plugin-plugins-data-public.tsearchstrategyprovider.md) | Search strategy provider creates an instance of a search strategy with the request handler context bound to it. This way every search strategy can use whatever information they require from the request context. |

This file was deleted.

2 changes: 1 addition & 1 deletion docs/discover/context.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[document-context]]
== Viewing a document in context
== View a document in context

Once you've narrowed your search to a specific event,
you might want to inspect the documents that occurred
Expand Down
2 changes: 1 addition & 1 deletion docs/discover/document-data.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[document-data]]
== Viewing document data
== View document data

When you submit a search query in *Discover*, the most recent documents that match the query
are listed in the documents table.
Expand Down
2 changes: 1 addition & 1 deletion docs/discover/field-filter.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[field-filter]]
== Filtering by field
== Filter by field

*Discover* offers
various types of filters, so you can restrict your documents to the exact data you want.
Expand Down
4 changes: 2 additions & 2 deletions docs/discover/kuery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In Kibana 6.3, we introduced a number of exciting experimental query language en
features are now available by default in 7.0. Out of the box, Kibana's query language now includes scripted field support and a
simplified, easier to use syntax. If you have a Basic license or above, autocomplete functionality will also be enabled.

==== Language Syntax
==== Language syntax

If you're familiar with Kibana's old Lucene query syntax, you should feel right at home with the new syntax. The basics
stay the same, we've simply refined things to make the query language easier to use.
Expand Down Expand Up @@ -72,7 +72,7 @@ set these terms will be matched against all fields. For example, a query for `re
in the response field, but a query for just `200` will search for 200 across all fields in your index.
============

==== Nested Field Support
==== Nested field support

KQL supports querying on {ref}/nested.html[nested fields] through a special syntax. You can query nested fields in subtly different
ways, depending on the results you want, so crafting nested queries requires extra thought.
Expand Down
10 changes: 5 additions & 5 deletions docs/discover/search.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[search]]
== Searching your data
== Search data
Many Kibana apps embed a query bar for real-time search, including
*Discover*, *Visualize*, and *Dashboard*.

Expand Down Expand Up @@ -83,14 +83,14 @@ query language you can also submit queries using the {ref}/query-dsl.html[Elasti


[[save-open-search]]
=== Saving searches
=== Save a search
A saved search persists your current view of Discover for later retrieval and reuse. You can reload a saved search into Discover, add it to a dashboard, and use it as the basis for a <<visualize, visualization>>.

A saved search includes the query text, filters, and optionally, the time filter. A saved search also includes the selected columns in the document table, the sort order, and the current index pattern.

[role="xpack"]
[[discover-read-only-access]]
==== Read only access
==== Read-only access
When you have insufficient privileges to save searches, the following indicator in Kibana will be
displayed and the *Save* button won't be visible. For more information on granting access to
Kibana see <<xpack-security-authorization>>.
Expand All @@ -117,7 +117,7 @@ selected, opening the saved search changes the selected index pattern. The query
used for the saved search will also be automatically selected.

[[save-load-delete-query]]
=== Saving queries
=== Save a query
A saved query is a portable collection of query text and filters that you can reuse in <<discover, Discover>>, <<visualize, Visualize>>, and <<dashboard, Dashboard>>. Save a query when you want to:

* Retrieve results from the same query at a later time without having to reenter the query text, add the filters or set the time filter
Expand All @@ -127,7 +127,7 @@ A saved query is a portable collection of query text and filters that you can re
Saved queries don't include information specific to Discover, such as the currently selected columns in the document table, the sort order, and the index pattern. If you want to save your current view of Discover for later retrieval and reuse, create a <<save-open-search, saved search>> instead.

[role="xpack"]
==== Read only access
==== Read-only access
If you have insufficient privileges to save queries, the *Save current query* button isn't visible in the saved query management popover. For more information, see <<xpack-security-authorization, Granting access to Kibana>>

==== Save a query
Expand Down
Loading

0 comments on commit 82ffdf5

Please sign in to comment.