Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into chris-r/eui_l…
Browse files Browse the repository at this point in the history
…ogstash
  • Loading branch information
mattapperson committed Dec 6, 2018
2 parents 6f3b33d + 5df466e commit 4bb63e5
Show file tree
Hide file tree
Showing 2,875 changed files with 42,238 additions and 26,678 deletions.
5 changes: 4 additions & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env bash

set -e

# run setup script that gives us node, yarn, and bootstraps the project
source "src/dev/ci_setup/setup.sh";
source src/dev/ci_setup/setup.sh;

# download es snapshots
node scripts/es snapshot --download-only;
Expand All @@ -20,4 +22,5 @@ tar -cf "$HOME/.kibana/bootstrap_cache/master.tar" \
x-pack/plugins/*/node_modules \
x-pack/plugins/reporting/.chromium \
x-pack/plugins/reporting/.phantom \
test/plugin_functional/plugins/*/node_modules \
.es;
3 changes: 2 additions & 1 deletion .ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -e
# move to Kibana root
cd "$(dirname "$0")/.."

./src/dev/ci_setup/load_bootstrap_cache.sh;
source src/dev/ci_setup/extract_bootstrap_cache.sh
source src/dev/ci_setup/setup.sh

case "$JOB" in
kibana-intake)
Expand Down
7 changes: 4 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ bower_components
/.es
/plugins
/optimize
/dlls
/src/fixtures/vislib/mock_data
/src/ui/public/angular-bootstrap
/src/ui/public/flot-charts
/test/fixtures/scenarios
/src/core_plugins/console/public/webpackShims
/src/core_plugins/console/public/tests/webpackShims
/src/legacy/core_plugins/console/public/webpackShims
/src/legacy/core_plugins/console/public/tests/webpackShims
/src/ui/public/utils/decode_geo_hash.js
/src/core_plugins/timelion/public/webpackShims/jquery.flot.*
/src/legacy/core_plugins/timelion/public/webpackShims/jquery.flot.*
/src/core/lib/kbn_internal_native_observable
/packages/*/target
/packages/eslint-config-kibana
Expand Down
73 changes: 44 additions & 29 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
const { resolve } = require('path');
const { readdirSync } = require('fs');
const dedent = require('dedent');

const restrictedModules = { paths: ['gulp-util'] };

const APACHE_2_0_LICENSE_HEADER = `
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
`;

const ELASTIC_LICENSE_HEADER = `
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
`;

module.exports = {
extends: ['@elastic/eslint-config-kibana', '@elastic/eslint-config-kibana/jest'],

Expand Down Expand Up @@ -35,7 +63,7 @@ module.exports = {
'packages/kbn-config-schema/**/*',
'packages/kbn-pm/**/*',
'packages/kbn-es/**/*',
'packages/kbn-datemath/**/*',
'packages/elastic-datemath/**/*',
'packages/kbn-i18n/**/*',
'packages/kbn-dev-utils/**/*',
'packages/kbn-plugin-helpers/**/*',
Expand Down Expand Up @@ -215,26 +243,13 @@ module.exports = {
'@kbn/license-header/require-license-header': [
'error',
{
license: dedent`
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
`,
license: APACHE_2_0_LICENSE_HEADER,
},
],
'@kbn/license-header/disallow-license-headers': [
'error',
{
licenses: [ELASTIC_LICENSE_HEADER],
},
],
},
Expand All @@ -260,13 +275,13 @@ module.exports = {
'@kbn/license-header/require-license-header': [
'error',
{
license: dedent`
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
`,
license: ELASTIC_LICENSE_HEADER,
},
],
'@kbn/license-header/disallow-license-headers': [
'error',
{
licenses: [APACHE_2_0_LICENSE_HEADER],
},
],
},
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
# See: https://help.github.com/articles/about-codeowners/

/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/plugins/beats_management/ @elastic/beats
/x-pack/plugins/canvas/ @elastic/kibana-canvas
/x-pack/plugins/monitoring/ @elastic/stack-monitoring
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
**/*.scss @elastic/kibana-design
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ node_modules
!/src/dev/notice/__fixtures__/node_modules
trash
/optimize
/dlls
target
/build
.jruby
Expand Down
35 changes: 18 additions & 17 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
{
"paths": {
"common.ui": "src/ui",
"console": "src/core_plugins/console",
"inputControl": "src/core_plugins/input_control_vis",
"kbn": "src/core_plugins/kibana",
"kbnVislibVisTypes": "src/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/core_plugins/markdown_vis",
"metricVis": "src/core_plugins/metric_vis",
"vega": "src/core_plugins/vega",
"tableVis": "src/core_plugins/table_vis",
"regionMap": "src/core_plugins/region_map",
"statusPage": "src/core_plugins/status_page",
"tagCloud": "src/core_plugins/tagcloud",
"tagCloud": "src/core_plugins/tagcloud",
"tileMap": "src/core_plugins/tile_map",
"timelion": "src/core_plugins/timelion",
"tsvb": "src/core_plugins/metrics",
"tagCloud": "src/core_plugins/tagcloud",
"tsvb": "src/core_plugins/metrics",
"server": "src/server",
"console": "src/legacy/core_plugins/console",
"inputControl": "src/legacy/core_plugins/input_control_vis",
"kbn": "src/legacy/core_plugins/kibana",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/legacy/core_plugins/markdown_vis",
"metricVis": "src/legacy/core_plugins/metric_vis",
"vega": "src/legacy/core_plugins/vega",
"tableVis": "src/legacy/core_plugins/table_vis",
"regionMap": "src/legacy/core_plugins/region_map",
"statusPage": "src/legacy/core_plugins/status_page",
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": "src/legacy/core_plugins/timelion",
"tagCloud": "src/legacy/core_plugins/tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"xpack.beatsManagement": "x-pack/plugins/beats_management",
"xpack.graph": "x-pack/plugins/graph",
"xpack.grokDebugger": "x-pack/plugins/grokdebugger",
"xpack.idxMgmt": "x-pack/plugins/index_management",
"xpack.infra": "x-pack/plugins/infra",
"xpack.licenseMgmt": "x-pack/plugins/license_management",
"xpack.logstash": "x-pack/plugins/logstash",
"xpack.monitoring": "x-pack/plugins/monitoring",
"xpack.reporting": "x-pack/plugins/reporting",
"xpack.rollupJobs": "x-pack/plugins/rollup",
"xpack.searchProfiler": "x-pack/plugins/searchprofiler",
"xpack.security": "x-pack/plugins/security",
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.11.4
8.14.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.11.4
8.14.0
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ The `config/kibana.yml` file stores user configuration directives. Since this fi

#### Potential Optimization Pitfalls

In development mode, Kibana runs a customized version of [Webpack](http://webpack.github.io/) with some optimizations enabled to make building the browser bundles as fast as possible. These optimizations make the build process about 2x as fast for initial builds, and about 7x faster for rebuilds, but are labeled "unsafe" by Webpack because they can sometimes cause changes to go unnoticed by the compiler. If you experience any of the scenarios below either restart the dev server, or add `optimize.unsafeCache: false` to your `config/kibana.dev.yml` file to disable these optimizations completely.

- Webpack is trying to include a file in the bundle that I deleted and is now complaining about it is missing
- A module id that used to resolve to a single file now resolves to a directory, but webpack isn't adapting
- (if you discover other scenarios, please send a PR!)
Expand Down
3 changes: 3 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Kibana source code with Kibana X-Pack source code
Copyright 2012-2018 Elasticsearch B.V.

---
This product has relied on ASTExplorer that is licensed under MIT.

---
This product includes code that was extracted from [email protected]
which is available under an "MIT" license
Expand Down
15 changes: 12 additions & 3 deletions TYPESCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ The first thing that will probably happen when you convert a `.js` file in our s
#### EUI component is missing types

1. Check https://github.com/elastic/eui/issues/256 to see if they know it’s missing, if it’s not on there, add it.
2. Temporarily get around the issue by using a declared module and exporting the missing types with the most basic types available. Bonus points if you write a PR yourself to the EUI repo to add the types, but having them available back in Kibana will take some time, as a new EUI release will need to be generated, then that new release pointed to in Kibana. Best, to make forward progress, to do a temporary workaround.
2. Temporarily get around the issue by adding the missing type in the `typings/@elastic/eui/index.d.ts` file. Bonus points if you write a PR yourself to the EUI repo to add the types, but having them available back in Kibana will take some time, as a new EUI release will need to be generated, then that new release pointed to in Kibana. Best, to make forward progress, to do a temporary workaround.

```ts
// typings/@elastic/eui/index.d.ts

declare module '@elastic/eui' {
export const EuiPopoverTitle: React.SFC<any>;
// Add your types here
export const EuiPopoverTitle: React.SFC<EuiPopoverTitleProps>;
...
}
```

```ts
// you can now import it in <your-plugin-file.ts>

import { EuiPopoverTitle } from '@elastic/eui';
```
Expand All @@ -36,7 +44,8 @@ A `.d.ts` file is treated as a module if it contains any top-level `import` or `
Since `@elastic/eui` already ships with a module declaration, any local additions must be performed using module augmentation, e.g.

```typescript
// file `my_plugin/types/eui.d.ts`
// file `typings/@elastic/eui/index.d.ts`

import { CommonProps } from '@elastic/eui';
import { SFC } from 'react';

Expand Down
2 changes: 2 additions & 0 deletions docs/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ wherever possible.
have breaking changes in any version of Kibana, or it might even be removed
entirely.

NOTE: You cannot access these APIs via the Console in Kibana.

[float]
== APIs
* <<spaces-api>>
Expand Down
2 changes: 2 additions & 0 deletions docs/api/dashboard-import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ documents directly to the `.kibana` index. *Do not do this!* Writing directly
to the `.kibana` index is not safe and it _will_ result in corrupted data that
permanently breaks Kibana in a future version.

NOTE: You cannot access these endpoints via the Console in Kibana.

* <<dashboard-import-api-import>>
* <<dashboard-import-api-export>>

Expand Down
2 changes: 2 additions & 0 deletions docs/api/dashboard-import/export.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The dashboard export API allows people to export dashboards along with all of
their corresponding saved objects such as visualizations, saved searches, and
index patterns.

Note: You cannot access this endpoint via the Console in Kibana.

==== Request

`GET /api/kibana/dashboards/export`
Expand Down
2 changes: 2 additions & 0 deletions docs/api/dashboard-import/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The dashboard import API allows people to import dashboards along with all of
their corresponding saved objects such as visualizations, saved searches, and
index patterns.

Note: You cannot access this endpoint via the Console in Kibana.

==== Request

`POST /api/kibana/dashboards/import`
Expand Down
2 changes: 2 additions & 0 deletions docs/api/logstash-configuration-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Traditionally users would perform this integration by accessing the the `.logsta
directly. *Do not do this!* The structure of this index is subject to change, which could
cause your integration to break. Instead, use the following API.

NOTE: You cannot access these endpoints via the Console in Kibana.

* <<logstash-configuration-management-api-create>>
* <<logstash-configuration-management-api-retrieve>>
* <<logstash-configuration-management-api-delete>>
Expand Down
2 changes: 2 additions & 0 deletions docs/api/logstash-configuration-management/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ experimental[This functionality is *experimental* and may be changed or removed
The Create Pipeline API enables you to create a centrally-managed Logstash pipeline. You can also use
it to update an existing pipeline.

Note: You cannot access this endpoint via the Console in Kibana.

[float]
==== Request

Expand Down
2 changes: 2 additions & 0 deletions docs/api/logstash-configuration-management/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed

The Delete Pipeline API enables you to delete a centrally-managed Logstash pipeline.

Note: You cannot access this endpoint via the Console in Kibana.

[float]
==== Request

Expand Down
2 changes: 2 additions & 0 deletions docs/api/logstash-configuration-management/list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed

The List Pipelines API enables you to list all centrally-managed Logstash pipelines.

Note: You cannot access this endpoint via the Console in Kibana.

[float]
==== Request

Expand Down
2 changes: 2 additions & 0 deletions docs/api/logstash-configuration-management/retrieve.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed

The Retrieve Pipeline API enables you to retrieve a centrally-managed Logstash pipeline.

Note: You cannot access this endpoint via the Console in Kibana.

[float]
==== Request

Expand Down
2 changes: 2 additions & 0 deletions docs/api/role-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ It is *not* supported to do so using the
{ref}/security-api.html#security-role-apis[{es} role management APIs], and doing
so will likely cause {kib}'s authorization to behave unexpectedly.

NOTE: You cannot access these endpoints via the Console in Kibana.

* <<role-management-api-put>>
* <<role-management-api-get>>
* <<role-management-api-delete>>
Expand Down
2 changes: 2 additions & 0 deletions docs/api/role-management/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

experimental[This API is experimental and may be changed or removed completely in a future release. Although the underlying mechanism of enforcing role-based access control is stable, the APIs for managing the roles are currently experimental.]

Note: You cannot access this endpoint via the Console in Kibana.

==== Authorization

To use this API, you must have at least the `manage_security` cluster privilege.
Expand Down
2 changes: 2 additions & 0 deletions docs/api/role-management/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ experimental[This API is experimental and may be changed or removed completely i

Retrieves all {kib} roles, or a specific role.

Note: You cannot access this endpoint via the Console in Kibana.

==== Authorization

To use this API, you must have at least the `manage_security` cluster privilege.
Expand Down
2 changes: 2 additions & 0 deletions docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experimental[This API is experimental and may be changed or removed completely i
Creates a new {kib} role or updates the attributes of an existing role. {kib} roles are stored in the
{es} native realm.

Note: You cannot access this endpoint via the Console in Kibana.

==== Authorization

To use this API, you must have at least the `manage_security` cluster privilege.
Expand Down
2 changes: 2 additions & 0 deletions docs/api/saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ documents directly to the `.kibana` index. *Do not do this!* Writing directly
to the `.kibana` index is not safe and it _will_ result in corrupted data that
permanently breaks Kibana in a future version.

NOTE: You cannot access these endpoints via the Console in Kibana.

* <<saved-objects-api-get>>
* <<saved-objects-api-bulk-get>>
* <<saved-objects-api-find>>
Expand Down
Loading

0 comments on commit 4bb63e5

Please sign in to comment.