Skip to content

Commit

Permalink
Merge branch 'master' into #72935
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Aug 7, 2020
2 parents 8cb9de6 + c6c300e commit 07e30cd
Show file tree
Hide file tree
Showing 921 changed files with 8,639 additions and 4,733 deletions.
13 changes: 13 additions & 0 deletions .ci/pipeline-library/src/test/prChanges.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,17 @@ class PrChangesTest extends KibanaBasePipelineTest {

assertFalse(prChanges.areChangesSkippable())
}

@Test
void 'areChangesSkippable() with plugin readme changes'() {
props([
githubPrs: [
getChanges: { [
[filename: 'src/plugins/foo/README.asciidoc'],
] },
],
])

assertFalse(prChanges.areChangesSkippable())
}
}
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ module.exports = {
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/plugins/lens/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'],
rules: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Creates [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_
<b>Signature:</b>

```typescript
createKbnUrlStateStorage: ({ useHash, history }?: {
createKbnUrlStateStorage: ({ useHash, history, onGetError, onSetError, }?: {
useHash: boolean;
history?: History<any> | undefined;
onGetError?: ((error: Error) => void) | undefined;
onSetError?: ((error: Error) => void) | undefined;
}) => IKbnUrlStateStorage
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<b>Signature:</b>

```typescript
export interface ISyncStateRef<stateStorage extends IStateStorage = IStateStorage>
export interface ISyncStateRef<StateStorage extends IStateStorage = IStateStorage>
```

## Properties
Expand Down
4 changes: 2 additions & 2 deletions docs/drilldowns/explore-underlying-data.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ applies the filters and time range created by the events that triggered the acti
[role="screenshot"]
image::images/explore_data_in_chart.png[Explore underlying data from chart]

You can disable this action by adding the following line to your `kibana.yml` config.
To enable this action add the following line to your `kibana.yml` config.

["source","yml"]
-----------
xpack.discoverEnhanced.actions.exploreDataInChart.enabled: false
xpack.discoverEnhanced.actions.exploreDataInChart.enabled: true
-----------
7 changes: 7 additions & 0 deletions docs/glossary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ syslog, Apache, and other webserver logs. See
[[k_glos]]
== K

[[glossary-kibana-privileges]] {kib} privileges ::
// tag::kibana-privileges-def[]
Enable administrators to grant users read-only, read-write, or no access to
individual features within <<glossary-space,spaces>> in {kib}. See
{kibana-ref}/kibana-privileges.html[{kib} privileges].
// end::kibana-privileges-def[]

[[glossary-kql]] {kib} Query Language (KQL) ::
// tag::kql-def[]
The default language for querying in {kib}. KQL provides
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/user/monitoring/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include::xpack-monitoring.asciidoc[]
include::beats-details.asciidoc[leveloffset=+1]
include::cluster-alerts.asciidoc[leveloffset=+1]
include::elasticsearch-details.asciidoc[leveloffset=+1]
include::kibana-alerts.asciidoc[leveloffset=+1]
include::kibana-details.asciidoc[leveloffset=+1]
include::logstash-details.asciidoc[leveloffset=+1]
include::monitoring-troubleshooting.asciidoc[leveloffset=+1]
36 changes: 36 additions & 0 deletions docs/user/monitoring/kibana-alerts.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[role="xpack"]
[[kibana-alerts]]
= {kib} Alerts

The {stack} {monitor-features} provide
<<alerting-getting-started,{kib} alerts>> out-of-the box to notify you of
potential issues in the {stack}. These alerts are preconfigured based on the
best practices recommended by Elastic. However, you can tailor them to meet your
specific needs.

When you open *{stack-monitor-app}*, the preconfigured {kib} alerts are
created automatically. If you collect monitoring data from multiple clusters,
these alerts can search, detect, and notify on various conditions across the
clusters. The alerts are visible alongside your existing {watcher} cluster
alerts. You can view details about the alerts that are active and view health
and performance data for {es}, {ls}, and Beats in real time, as well as
analyze past performance. You can also modify active alerts.

[role="screenshot"]
image::user/monitoring/images/monitoring-kibana-alerts.png["Kibana alerts in the Stack Monitoring app"]

To review and modify all the available alerts, use
<<managing-alerts-and-actions,*{alerts-ui}*>> in *{stack-manage-app}*.

[discrete]
[[kibana-alerts-cpu-threshold]]
== CPU threshold

This alert is triggered when a node runs a consistently high CPU load. By
default, the trigger condition is set at 85% or more averaged over the last 5
minutes. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 1 day.

NOTE: Some action types are subscription features, while others are free.
For a comparison of the Elastic subscription levels, see the alerting section of
the {subscriptions}[Subscriptions page].
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants';

export const CreateAlert = ({
http,
// eslint-disable-next-line @typescript-eslint/naming-convention
triggers_actions_ui,
charts,
uiSettings,
Expand Down
1 change: 1 addition & 0 deletions examples/alerting_example/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export interface AlertingExamplePublicStartDeps {
export class AlertingExamplePlugin implements Plugin<Setup, Start, AlertingExamplePublicSetupDeps> {
public setup(
core: CoreSetup<AlertingExamplePublicStartDeps, Start>,
// eslint-disable-next-line @typescript-eslint/naming-convention
{ alerts, triggers_actions_ui, developerExamples }: AlertingExamplePublicSetupDeps
) {
core.application.register({
Expand Down
1 change: 0 additions & 1 deletion kibana.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import * as LegacyKibanaServer from './src/legacy/server/kbn_server';
/**
* Re-export legacy types under a namespace.
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Legacy {
export type KibanaConfig = LegacyKibanaServer.KibanaConfig;
export type Request = LegacyKibanaServer.Request;
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
]
},
"dependencies": {
"@babel/core": "^7.10.2",
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
"@babel/register": "^7.10.1",
"@babel/core": "^7.11.1",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/register": "^7.10.5",
"@elastic/apm-rum": "^5.2.0",
"@elastic/charts": "19.8.1",
"@elastic/datemath": "5.0.3",
Expand Down Expand Up @@ -159,7 +159,6 @@
"bluebird": "3.5.5",
"boom": "^7.2.0",
"brace": "0.11.1",
"browserslist-useragent": "^3.0.2",
"cache-loader": "^4.1.0",
"chalk": "^2.4.2",
"check-disk-space": "^2.1.0",
Expand Down Expand Up @@ -290,8 +289,8 @@
"yauzl": "2.10.0"
},
"devDependencies": {
"@babel/parser": "^7.10.2",
"@babel/types": "^7.10.2",
"@babel/parser": "^7.11.2",
"@babel/types": "^7.11.0",
"@elastic/eslint-config-kibana": "0.15.0",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/github-checks-reporter": "0.0.20b3",
Expand Down Expand Up @@ -319,7 +318,6 @@
"@types/babel__core": "^7.1.2",
"@types/bluebird": "^3.1.1",
"@types/boom": "^7.2.0",
"@types/browserslist-useragent": "^3.0.0",
"@types/chance": "^1.0.0",
"@types/cheerio": "^0.22.10",
"@types/chromedriver": "^81.0.0",
Expand Down Expand Up @@ -400,8 +398,8 @@
"@types/vinyl": "^2.0.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"angular-mocks": "^1.7.9",
"archiver": "^3.1.1",
"axe-core": "^3.4.1",
Expand All @@ -425,6 +423,7 @@
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-cypress": "^2.8.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/elastic-datemath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"kbn:watch": "yarn build --watch"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/cli": "^7.10.5",
"@babel/preset-env": "^7.11.0",
"babel-plugin-add-module-exports": "^1.0.2",
"moment": "^2.24.0"
},
Expand Down
9 changes: 5 additions & 4 deletions packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
"author": "Spencer Alger <email@spalger.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/elastic/eslint-config-kibana/issues"
"url": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana"
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"homepage": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-mocha": "^6.2.2",
Expand Down
91 changes: 84 additions & 7 deletions packages/eslint-config-kibana/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const PKG = require('../../package.json');

const eslintConfigPrettierTypescriptEslintRules = require('eslint-config-prettier/@typescript-eslint').rules;

// The current implementation excluded all the variables matching the regexp.
// We should remove it as soon as multiple underscores are supported by the linter.
// https://github.com/typescript-eslint/typescript-eslint/issues/1712
// Due to the same reason we have to duplicate the "filter" option for "default" and other "selectors".
const allowedNameRegexp = '^(UNSAFE_|_{1,3})|_{1,3}$';
module.exports = {
overrides: [
{
Expand All @@ -19,6 +24,7 @@ module.exports = {
'ban',
'import',
'prefer-object-spread',
'eslint-comments'
],

settings: {
Expand Down Expand Up @@ -87,16 +93,82 @@ module.exports = {
'React.StatelessComponent': {
message: 'Use FunctionComponent instead.',
fixWith: 'React.FunctionComponent'
}
},
// used in the codebase in the wild
'{}': false,
'object': false,
'Function': false,
}
}],
'camelcase': 'off',
'@typescript-eslint/camelcase': ['error', {
'properties': 'never',
'ignoreDestructuring': true,
'allow': ['^[A-Z0-9_]+$', '^UNSAFE_']
}],
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'variable',
format: [
'camelCase',
'UPPER_CASE', // const SOMETHING = ...
'PascalCase', // React.FunctionComponent =
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'parameter',
format: [
'camelCase',
'PascalCase',
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'memberLike',
format: [
'camelCase',
'PascalCase',
'snake_case', // keys in elasticsearch requests / responses
'UPPER_CASE'
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'function',
format: [
'camelCase',
'PascalCase' // React.FunctionComponent =
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'typeLike',
format: ['PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'enum',
format: ['PascalCase', 'UPPER_CASE', 'camelCase'],
},
],
'@typescript-eslint/explicit-member-accessibility': ['error',
{
accessibility: 'off',
Expand Down Expand Up @@ -145,10 +217,12 @@ module.exports = {
'no-extend-native': 'error',
'no-eval': 'error',
'no-new-wrappers': 'error',
'no-script-url': 'error',
'no-shadow': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-unsafe-finally': 'error',
'no-unsanitized/property': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
Expand All @@ -171,6 +245,9 @@ module.exports = {

],
'import/no-default-export': 'error',

'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error'
},
eslintConfigPrettierTypescriptEslintRules
)
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"kbn:watch": "node scripts/build --source-maps --watch"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/cli": "^7.10.5",
"@kbn/dev-utils": "1.0.0",
"@kbn/babel-preset": "1.0.0",
"typescript": "3.9.5"
Expand Down
Loading

0 comments on commit 07e30cd

Please sign in to comment.