Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into re-enable-firefox…
Browse files Browse the repository at this point in the history
…-tests
  • Loading branch information
dmlemeshko committed Mar 13, 2020
2 parents b825f2b + ce1836b commit e1fbf3d
Show file tree
Hide file tree
Showing 4,334 changed files with 85,097 additions and 44,760 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ const ELASTIC_LICENSE_HEADER = `
*/
`;

const allMochaRulesOff = {};
Object.keys(require('eslint-plugin-mocha').rules).forEach(k => {
allMochaRulesOff['mocha/' + k] = 'off';
});

module.exports = {
root: true,

Expand Down Expand Up @@ -514,6 +519,14 @@ module.exports = {
},
},

/**
* Harden specific rules
*/
{
files: ['test/harden/*.js'],
rules: allMochaRulesOff,
},

/**
* APM overrides
*/
Expand Down
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
/x-pack/test/functional/services/ml.ts @elastic/ml-ui
# ML team owns the transform plugin, ES team added here for visibility
# because the plugin lives in Kibana's Elasticsearch management section.
/x-pack/legacy/plugins/transform/ @elastic/ml-ui @elastic/es-ui
/x-pack/plugins/transform/ @elastic/ml-ui @elastic/es-ui
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
/x-pack/test/functional/services/transform_ui/ @elastic/ml-ui
Expand Down Expand Up @@ -133,7 +132,7 @@
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform
/src/plugins/status_page/ @elastic/kibana-platform
/src/dev/run_check_core_api_changes.ts @elastic/kibana-platform
/src/dev/run_check_published_api_changes.ts @elastic/kibana-platform

# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
Expand Down
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: 8.0 Breaking change
about: Breaking changes from 7.x -> 8.0
title: "[Breaking change]"
labels: Team:Elasticsearch UI, Feature:Upgrade Assistant
assignees: ''

---

## Change description

**Which release will ship the breaking change?**

<!-- e.g., v7.6.2 -->

**Describe the change. How will it manifest to users?**

**What percentage of users will be affected?**

<!-- e.g., Roughly 75% will need to make changes to x. -->

**What can users to do to address the change manually?**

<!-- If applicable, describe the manual workaround -->

**How could we make migration easier with the Upgrade Assistant?**

**Are there any edge cases?**

## Test Data

Provide test data. We can’t build a solution without data to test it against.

## Cross links

Cross-link to relevant [Elasticsearch breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html).
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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ Note that for VSCode, to enable "live" linting of TypeScript (and other) file ty

All user-facing labels and info texts in Kibana should be internationalized. Please take a look at the [readme](packages/kbn-i18n/README.md) and the [guideline](packages/kbn-i18n/GUIDELINE.md) of the i18n package on how to do so.

In order to enable translations in the React parts of the application, the top most component of every `ReactDOM.render` call should be an `I18nContext`:
In order to enable translations in the React parts of the application, the top most component of every `ReactDOM.render` call should be the `Context` component from the `i18n` core service:
```jsx
import { I18nContext } from 'ui/i18n';
const I18nContext = coreStart.i18n.Context;

ReactDOM.render(
<I18nContext>
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
library 'kibana-pipeline-library'
kibanaLibrary.load()

kibanaPipeline(timeoutMinutes: 135) {
kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) {
githubPr.withDefaultPrComments {
catchError {
retryable.enable()
Expand Down
16 changes: 8 additions & 8 deletions docs/apm/advanced-queries.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ When querying in the APM app, you're simply searching and selecting data from fi
Queries entered into the query bar are also added as parameters to the URL,
so it's easy to share a specific query or view with others.

In the screenshot below, you can begin to see some of the transaction fields available for filtering on:
In the screenshot below, you can begin to see some of the transaction fields available for filtering on:

[role="screenshot"]
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM app in Kibana]
Expand All @@ -21,22 +21,22 @@ TIP: Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements]

[float]
[[discover-advanced-queries]]
=== Querying in the Discover app
=== Querying in Discover

It may also be helpful to view your APM data in the {kibana-ref}/discover.html[Discover app].
Querying documents in Discover works the same way as querying in the APM app,
and all of the example queries listed above can also be used in the Discover app.
It may also be helpful to view your APM data in {kibana-ref}/discover.html[*Discover*].
Querying documents in *Discover* works the same way as querying in the APM app,
and all of the example APM app queries can also be used in *Discover*.

[float]
==== Example Discover app query
==== Example Discover query

One example where you may want to make use of the Discover app,
One example where you may want to make use of *Discover*,
is for viewing _all_ transactions for an endpoint, instead of just a sample.

TIP: Starting in v7.6, you can view 10 samples per bucket in the APM app, instead of just one.

Use the APM app to find a transaction name and time bucket that you're interested in learning more about.
Then, switch to the Discover app and make a search:
Then, switch to *Discover* and make a search:

["source","sh"]
-----
Expand Down
34 changes: 17 additions & 17 deletions docs/canvas/canvas-function-reference.asciidoc

Large diffs are not rendered by default.

42 changes: 20 additions & 22 deletions docs/dev-tools/console/console.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ NOTE: You are unable to interact with the REST API of {kib} with the Console.
[[console-api]]
=== Write requests

Console understands commands in a cURL-like syntax.
For example, the following is a `GET` request to the {es} `_search` API.
Console understands commands in a cURL-like syntax.
For example, the following is a `GET` request to the {es} `_search` API.

[source,js]
----------------------------------
Expand All @@ -43,23 +43,23 @@ curl -XGET "http://localhost:9200/_search" -d'
}'
----------------------------------

If you paste the above command into Console, {kib} automatically converts it
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,
click the action icon (image:dev-tools/console/images/wrench.png[]) and select *Copy as cURL*.
click the action icon (image:dev-tools/console/images/wrench.png[]) and select *Copy as cURL*.

[float]
[[console-autocomplete]]
==== Autocomplete

When you're typing a command, Console makes context-sensitive suggestions.
These suggestions show you the parameters for each API and speed up your typing.
To configure your preferences for autocomplete, go to
<<configuring-console, Settings>>.
These suggestions show you the parameters for each API and speed up your typing.
To configure your preferences for autocomplete, go to
<<configuring-console, Settings>>.

[float]
[[auto-formatting]]
==== Auto-formatting
The auto-formatting
The auto-formatting
capability can help you format requests. Select one or more requests that you
want to format, click the action icon (image:dev-tools/console/images/wrench.png[]),
and then select *Auto indent*.
Expand All @@ -69,27 +69,27 @@ For example, you might have a request formatted like this:
[role="screenshot"]
image::dev-tools/console/images/copy-curl.png["Console close-up"]

Console adjusts the JSON body of the request to apply the indents.
Console adjusts the JSON body of the request to apply the indents.

[role="screenshot"]
image::dev-tools/console/images/request.png["Console close-up"]

If you select *Auto indent* on a request that is already well formatted,
Console collapses the request body to a single line per document.
If you select *Auto indent* on a request that is already well formatted,
Console collapses the request body to a single line per document.
This is helpful when working with the {es} {ref}/docs-bulk.html[bulk APIs].



[float]
[[console-request]]
=== Submit requests
=== Submit requests

When you're ready to submit the request to {es}, click the
When you're ready to submit the request to {es}, click the
green triangle.

You can select multiple requests and submit them together.
Console sends the requests to {es} one by one and shows the output
in the response pane. Submitting multiple request is helpful when you're debugging an issue or trying query
Console sends the requests to {es} one by one and shows the output
in the response pane. Submitting multiple request is helpful when you're debugging an issue or trying query
combinations in multiple scenarios.


Expand All @@ -105,15 +105,15 @@ the action icon (image:dev-tools/console/images/wrench.png[]) and select
[[console-history]]
=== Get your request history

Console maintains a list of the last 500 requests that {es} successfully executed.
Console maintains a list of the last 500 requests that {es} successfully executed.
To view your most recent requests, click *History*. If you select a request
and click *Apply*, {kib} adds it to the editor at the current cursor position.

[float]
[[configuring-console]]
=== Configure Console settings

You can configure the Console font size, JSON syntax,
You can configure the Console font size, JSON syntax,
and autocomplete suggestions in *Settings*.

[role="screenshot"]
Expand All @@ -130,9 +130,7 @@ shortcuts, click *Help*.
[[console-settings]]
=== Disable Console

If you don’t want to use Console, you can disable it by setting `console.enabled`
to `false` in your `kibana.yml` configuration file. Changing this setting
causes the server to regenerate assets on the next startup,
If you don’t want to use Console, you can disable it by setting `console.enabled`
to `false` in your `kibana.yml` configuration file. Changing this setting
causes the server to regenerate assets on the next startup,
which might cause a delay before pages start being served.


6 changes: 3 additions & 3 deletions docs/dev-tools/searchprofiler/more-complicated.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ POST test/_bulk
// CONSOLE
--

. From the {searchprofiler}, enter "test" in the Index field above the query editor to restrict profiled
. From the {searchprofiler}, enter "test" in the *Index* field to restrict profiled
queries to the `test` index.

. Replace the default `match_all` query in the query editor with a query that has two sub-query
Expand Down Expand Up @@ -66,7 +66,7 @@ components and includes a simple aggregation, like the example below.
// NOTCONSOLE
--

. Click *Profile* to profile the query and visualize the results.
. Click *Profile* to profile the query and visualize the results.
. Select the shard to view the query details.
+
[role="screenshot"]
Expand Down Expand Up @@ -100,5 +100,5 @@ Select the name of the shard to view the aggregation details and timing breakdow
image::dev-tools/searchprofiler/images/gs10.png["Drilling into the first shard's details"]

For more information about how the {searchprofiler} works, how timings are calculated, and
how to interpret various results, see
how to interpret various results, see
{ref}/search-profile.html#profiling-queries[Profiling queries].
4 changes: 2 additions & 2 deletions docs/developer/core/development-dependencies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ module.exports = window.angular;

What this shim does is fairly simple if you go line by line:

. makes sure that jQuery is loaded before angular (which actually runs the shim above)
. makes sure that jQuery is loaded before angular (which actually runs the shim)
. load the angular.js file from the node_modules directory
. load the angular-elastic plugin, a plugin we want to always be included whenever we import angular
. use the `ui/modules` module to add the module exported by angular-elastic as a dependency to the `kibana` angular module
. finally, export the window.angular variable. This means that writing `import angular from 'angular';` will properly set the angular variable to the angular library, rather than undefined which is the default behavior.
. finally, export the window.angular variable. This means that writing `import angular from 'angular';` will properly set the angular variable to the angular library, rather than undefined which is the default behavior.
4 changes: 2 additions & 2 deletions docs/developer/core/development-modules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ certain components. Here is a breakdown of those modules:
the required modules and import them were they are actually necessary.

- *`import 'ui/autoload/all'`*
Imports all of the above modules
Imports all of the modules

[float]
==== Resolving Require Paths
Expand Down Expand Up @@ -60,4 +60,4 @@ Here is how import/require statements are resolved to a file:
** path/index + '.js'
** path/index + '.json'
** path/index
* if none of the above paths matches then an error is thrown
* if none of the paths matches then an error is thrown
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ init(server) {
}
-----------

Unlike the Canvas example above, Dev Tools does not require access to any saved objects to function. Dev Tools does specify an API endpoint, however. When this is configured, the Security plugin will automatically authorize access to any server API route that is tagged with `access:console`, similar to the following:
Unlike the Canvas example, Dev Tools does not require access to any saved objects to function. Dev Tools does specify an API endpoint, however. When this is configured, the Security plugin will automatically authorize access to any server API route that is tagged with `access:console`, similar to the following:

["source","javascript"]
-----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ This outputs a `en.json` file inside the `translations` directory. To localize o
Checking i18n does the following:

* Checks all existing labels for violations.
* Takes translations from `.i18nrc.json` and compares them to the messages extracted and validated at the step above and:
* Takes translations from `.i18nrc.json` and compares them to the messages extracted and validated.
** Checks for unused translations. If you remove a label that has a corresponding translation, you must also remove the label from the translations file.
** Checks for incompatible translations. If you add or remove a new parameter from an existing string, you must also remove the label from the translations file.

Expand All @@ -86,7 +86,7 @@ node scripts/i18n_check --fix --include-config ../kibana-extra/myPlugin/.i18nrc.
Kibana relies on several UI frameworks (ReactJS and AngularJS) and
requires localization in different environments (browser and NodeJS).
The internationalization engine is framework agnostic and consumable in
all parts of Kibana (ReactJS, AngularJS and NodeJS).
all parts of Kibana (ReactJS, AngularJS and NodeJS).

To simplify
internationalization in UI frameworks, additional abstractions are
Expand All @@ -112,7 +112,7 @@ export const HELLO_WORLD = i18n.translate('hello.wonderful.world', {
Full details are {repo}tree/master/packages/kbn-i18n#vanilla-js[here].

[float]
===== i18n for React
===== i18n for React

To localize strings in React, use either `FormattedMessage` or `i18n.translate`.

Expand All @@ -138,7 +138,7 @@ Full details are {repo}tree/master/packages/kbn-i18n#react[here].


[float]
===== i18n for Angular
===== i18n for Angular

You are encouraged to use `i18n.translate()` by statically importing `i18n` from `@kbn/i18n` wherever possible in your Angular code. Angular wrappers use the translation `service` with the i18n engine under the hood.

Expand Down
4 changes: 2 additions & 2 deletions docs/developer/pr-review.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Enhancements are pretty much always going to have extensive unit tests as a base
[float]
=== Product level review

Reviewers are not simply evaluating the code itself, they are also evaluating the quality of the user-facing change in the product. This generally means they need to check out the branch locally and "play around" with it. In addition to the "do we want this change in the product" details from above, the reviewer should be looking for bugs and evaluating how approachable and useful the feature is as implemented. Special attention should be given to error scenarios and edge cases to ensure they are all handled well within the product.
Reviewers are not simply evaluating the code itself, they are also evaluating the quality of the user-facing change in the product. This generally means they need to check out the branch locally and "play around" with it. In addition to the "do we want this change in the product" details, the reviewer should be looking for bugs and evaluating how approachable and useful the feature is as implemented. Special attention should be given to error scenarios and edge cases to ensure they are all handled well within the product.


[float]
Expand Down Expand Up @@ -107,7 +107,7 @@ Conflicting opinions between reviewers and authors happen, and sometimes it is h

Whether or not a bit of feedback is appropriate for a pull request is often dependent on the motivation for giving the feedback in the first place.

_Demanding_ an author make changes based primarily on the mindset of "how would I write this code?" isn't appropriate. The reviewer didn't write the code, and their critical purpose in the review process is not to craft the contribution into a form that is simply whatever they would have written if they had. If a reviewer wants to provide this type of feedback, they should qualify it as a "nit" as mentioned in the nitpicking section above to make it clear that the author can take it or leave it.
_Demanding_ an author make changes based primarily on the mindset of "how would I write this code?" isn't appropriate. The reviewer didn't write the code, and their critical purpose in the review process is not to craft the contribution into a form that is simply whatever they would have written if they had. If a reviewer wants to provide this type of feedback, they should qualify it as a "nit" as mentioned in the nitpicking section to make it clear that the author can take it or leave it.

Inflammatory feedback such as "this is crap" isn't feedback at all. It's both mean and unhelpful, and it is never appropriate.

Expand Down
Loading

0 comments on commit e1fbf3d

Please sign in to comment.