Skip to content

Commit

Permalink
Merge branch 'master' into task-manager/schema-config
Browse files Browse the repository at this point in the history
* master: (23 commits)
  [Vis: Default editor] Reactify the timelion editor (elastic#52990)
  [Discover] fix histogram min interval (elastic#53979)
  [Telemetry] [Monitoring] Only retry fetching usage once monito… (elastic#54309)
  [docs][APM] Add runtime index config documentation (elastic#53907)
  [SIEM] Detection engine timeline (elastic#53783)
  Filter scripted fields preview field list to source fields (elastic#53826)
  Management - New platform api (elastic#52579)
  Reset region and Account when switching inventory (elastic#54287)
  [SIEM] [Case] Case workflow api schema (elastic#51535)
  Code coverage setup on CI (elastic#49003)
  [ML] DF Analytics Results: adds link to docs (elastic#54189)
  Update schemas boolean, byteSize, and duration to coerce strings (elastic#54177)
  [Metrics UI] Pass relevant shouldAllowEdit capabilities into SettingsPage (elastic#49781)
  [Canvas] Fixes bugs with autoplay and refresh (elastic#53149)
  [ML] DF Analytics Classification: ensure confusion matrix can be fetched (elastic#53629)
  Fix Vega react eslint errors (elastic#54259)
  Remove non existing codeowners (elastic#54274)
  use correct type (elastic#54244)
  [Dashboard] Removing 100% as dshDashboardViewport height (elastic#54263)
  add `examples/` to no-restricted-path config (elastic#54252)
  ...
  • Loading branch information
gmmorris committed Jan 9, 2020
2 parents 39b6857 + ecddfd8 commit 3dd94d5
Show file tree
Hide file tree
Showing 284 changed files with 8,442 additions and 2,488 deletions.
112 changes: 112 additions & 0 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/groovy

library 'kibana-pipeline-library'
kibanaLibrary.load() // load from the Jenkins instance

stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
timeout(time: 180, unit: 'MINUTES') {
timestamps {
ansiColor('xterm') {
catchError {
withEnv([
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
parallel([
'kibana-intake-agent': {
withEnv([
'NODE_ENV=test' // Needed for jest tests only
]) {
kibanaPipeline.legacyJobRunner('kibana-intake')()
}
},
'x-pack-intake-agent': {
withEnv([
'NODE_ENV=test' // Needed for jest tests only
]) {
kibanaPipeline.legacyJobRunner('x-pack-intake')()
}
},
'kibana-oss-agent': kibanaPipeline.withWorkers('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
'oss-ciGroup1': kibanaPipeline.getOssCiGroupWorker(1),
'oss-ciGroup2': kibanaPipeline.getOssCiGroupWorker(2),
'oss-ciGroup3': kibanaPipeline.getOssCiGroupWorker(3),
'oss-ciGroup4': kibanaPipeline.getOssCiGroupWorker(4),
'oss-ciGroup5': kibanaPipeline.getOssCiGroupWorker(5),
'oss-ciGroup6': kibanaPipeline.getOssCiGroupWorker(6),
'oss-ciGroup7': kibanaPipeline.getOssCiGroupWorker(7),
'oss-ciGroup8': kibanaPipeline.getOssCiGroupWorker(8),
'oss-ciGroup9': kibanaPipeline.getOssCiGroupWorker(9),
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
]),
'kibana-xpack-agent-1': kibanaPipeline.withWorkers('kibana-xpack-tests-1', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
'xpack-ciGroup2': kibanaPipeline.getXpackCiGroupWorker(2),
]),
'kibana-xpack-agent-2': kibanaPipeline.withWorkers('kibana-xpack-tests-2', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup3': kibanaPipeline.getXpackCiGroupWorker(3),
'xpack-ciGroup4': kibanaPipeline.getXpackCiGroupWorker(4),
]),

'kibana-xpack-agent-3': kibanaPipeline.withWorkers('kibana-xpack-tests-3', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup5': kibanaPipeline.getXpackCiGroupWorker(5),
'xpack-ciGroup6': kibanaPipeline.getXpackCiGroupWorker(6),
'xpack-ciGroup7': kibanaPipeline.getXpackCiGroupWorker(7),
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
]),
])
kibanaPipeline.jobRunner('tests-l', false) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaPipeline.bash(
'''
# bootstrap from x-pack folder
source src/dev/ci_setup/setup_env.sh
cd x-pack
yarn kbn bootstrap --prefer-offline
cd ..
# extract archives
mkdir -p /tmp/extracted_coverage
echo extracting intakes
tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
echo extracting kibana-oss-tests
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
echo extracting kibana-xpack-tests
for i in {1..3}; do
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests-${i}/kibana-coverage.tar.gz -C /tmp/extracted_coverage
done
# replace path in json files to have valid html report
pwd=$(pwd)
du -sh /tmp/extracted_coverage/target/kibana-coverage/
echo replacing path in json files
for i in {1..9}; do
sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
done
wait
# merge oss & x-pack reports
echo merging coverage reports
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
echo copy mocha reports
mkdir -p target/kibana-coverage/mocha-combined
cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
''',
"run `yarn kbn bootstrap && merge coverage`"
)
sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
}
}
}
kibanaPipeline.sendMail()
}
}
}
}
11 changes: 5 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/core_plugins/vis_type_vega/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -247,6 +241,7 @@ module.exports = {
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
'examples/**/*',
],
from: [
'src/core/public/**/*',
Expand Down Expand Up @@ -283,11 +278,15 @@ module.exports = {
'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',

'examples/**/*',
'!examples/**/server/**/*',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
'examples/**/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',
Expand Down
4 changes: 1 addition & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
/src/legacy/core_plugins/metrics/ @elastic/kibana-app
/src/plugins/home/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
Expand Down Expand Up @@ -147,6 +148,3 @@
/x-pack/legacy/plugins/searchprofiler/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/watcher/ @elastic/es-ui

# Kibana TSVB external contractors
/src/legacy/core_plugins/metrics/ @elastic/kibana-tsvb-external
14 changes: 11 additions & 3 deletions docs/apm/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
[[apm-settings-in-kibana]]
=== APM settings in Kibana

You do not need to configure any settings to use APM. It is enabled by default.
If you'd like to change any of the default values,
copy and paste the relevant settings below into your `kibana.yml` configuration file.
You do not need to configure any settings to use the APM app. It is enabled by default.

[float]
[[apm-indices-settings]]
==== APM Indices

include::./../settings/apm-settings.asciidoc[tag=apm-indices-settings]

[float]
[[general-apm-settings]]
==== General APM settings

include::./../settings/apm-settings.asciidoc[tag=general-apm-settings]
16 changes: 12 additions & 4 deletions docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This section can help with any of the following:
There are a number of factors that could be at play here.
One important thing to double-check first is your index template.

*Index template*
An APM index template must exist for the APM app to work correctly.
By default, this index template is created by APM Server on startup.
However, this only happens if `setup.template.enabled` is `true` in `apm-server.yml`.
Expand All @@ -34,14 +35,21 @@ GET /_template/apm-{version}
--------------------------------------------------
// CONSOLE

*Using Logstash, Kafka, etc.*
If you're not outputting data directly from APM Server to Elasticsearch (perhaps you're using Logstash or Kafka),
then the index template will not be set up automatically. Instead, you'll need to
{apm-server-ref}/_manually_loading_template_configuration.html#load-template-manually-alternate[load the template manually].
{apm-server-ref}/_manually_loading_template_configuration.html[load the template manually].

Finally, this problem can also occur if you've changed the index name that you write APM data to.
The default index pattern can be found {apm-server-ref}/elasticsearch-output.html#index-option-es[here].
If you change this setting, you must also configure the `setup.template.name` and `setup.template.pattern` options.
*Using a custom index names*
This problem can also occur if you've customized the index name that you write APM data to.
The default index name that APM writes events to can be found
{apm-server-ref}/elasticsearch-output.html#index-option-es[here].
If you change the default, you must also configure the `setup.template.name` and `setup.template.pattern` options.
See {apm-server-ref}/configuration-template.html[Load the Elasticsearch index template].
If the Elasticsearch index template has already been successfully loaded to the index,
you can customize the indices that the APM app uses to display data.
Navigate to *APM* > *Settings* > *Indices*, and change all `apm_oss.*Pattern` values to
include the new index pattern. For example: `customIndexName-*`.

==== Unknown route

Expand Down
23 changes: 20 additions & 3 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@
<titleabbrev>APM settings</titleabbrev>
++++

You do not need to configure any settings to use APM. It is enabled by default.
If you'd like to change any of the default values,
copy and paste the relevant settings below into your `kibana.yml` configuration file.
You do not need to configure any settings to use the APM app. It is enabled by default.

[float]
[[apm-indices-settings-kb]]
==== APM Indices

// This content is reused in the APM app documentation.
// Any changes made in this file will be seen there as well.
// tag::apm-indices-settings[]

Index defaults can be changed in Kibana. Navigate to *APM* > *Settings* > *Indices*.
Index settings in the APM app take precedence over those set in `kibana.yml`.

[role="screenshot"]
image::settings/images/apm-settings.png[APM app settings in Kibana]

// end::apm-indices-settings[]

[float]
[[general-apm-settings-kb]]
Expand All @@ -17,6 +31,9 @@ copy and paste the relevant settings below into your `kibana.yml` configuration
// Any changes made in this file will be seen there as well.
// tag::general-apm-settings[]

If you'd like to change any of the default values,
copy and paste the relevant settings below into your `kibana.yml` configuration file.

xpack.apm.enabled:: Set to `false` to disabled the APM plugin {kib}. Defaults to
`true`.

Expand Down
Binary file added docs/settings/images/apm-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 35 additions & 30 deletions docs/spaces/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
[[xpack-spaces]]
== Spaces

Spaces enable you to organize your dashboards and other saved
objects into meaningful categories. Once inside a space, you see only
the dashboards and saved objects that belong to that space.
Spaces enable you to organize your dashboards and other saved
objects into meaningful categories. Once inside a space, you see only
the dashboards and saved objects that belong to that space.

{kib} creates a default space for you.
After you create your own
spaces, you're asked to choose a space when you log in to Kibana. You can change your
{kib} creates a default space for you.
After you create your own
spaces, you're asked to choose a space when you log in to Kibana. You can change your
current space at any time by using the menu in the upper left.

[role="screenshot"]
Expand All @@ -29,24 +29,24 @@ Kibana supports spaces in several ways. You can:
[[spaces-managing]]
=== View, create, and delete spaces

Go to **Management > Spaces** for an overview of your spaces. This view provides actions
Go to **Management > Spaces** for an overview of your spaces. This view provides actions
for you to create, edit, and delete spaces.

[role="screenshot"]
image::spaces/images/space-management.png["Space management"]

[float]
==== Create or edit a space
==== Create or edit a space

You can create as many spaces as you like. Click *Create a space* and provide a name,
URL identifier, optional description.
You can create as many spaces as you like. Click *Create a space* and provide a name,
URL identifier, optional description.

The URL identifier is a short text string that becomes part of the
{kib} URL when you are inside that space. {kib} suggests a URL identifier based
The URL identifier is a short text string that becomes part of the
{kib} URL when you are inside that space. {kib} suggests a URL identifier based
on the name of your space, but you can customize the identifier to your liking.
You cannot change the space identifier once you create the space.

{kib} also has an <<spaces-api, API>>
{kib} also has an <<spaces-api, API>>
if you prefer to create spaces programatically.

[role="screenshot"]
Expand All @@ -55,22 +55,22 @@ image::spaces/images/edit-space.png["Space management"]
[float]
==== Delete a space

Deleting a space permanently removes the space and all of its contents.
Deleting a space permanently removes the space and all of its contents.
Find the space on the *Spaces* overview page and click the trash icon in the Actions column.
You can't delete the default space, but you can customize it to your liking.

[float]
[[spaces-control-feature-visibility]]
=== Control feature access based on user needs

You have control over which features are visible in each space.
For example, you might hide Dev Tools
You have control over which features are visible in each space.
For example, you might hide Dev Tools
in your "Executive" space or show Stack Monitoring only in your "Admin" space.
You can define which features to show or hide when you add or edit a space.

Controlling feature
visibility is not a security feature. To secure access
to specific features on a per-user basis, you must configure
Controlling feature
visibility is not a security feature. To secure access
to specific features on a per-user basis, you must configure
<<xpack-security-authorization, Kibana Security>>.

[role="screenshot"]
Expand All @@ -80,10 +80,10 @@ image::spaces/images/edit-space-feature-visibility.png["Controlling features vis
[[spaces-control-user-access]]
=== Control feature access based on user privileges

When using Kibana with security, you can configure applications and features
based on your users’ privileges. This means different roles can have access
to different features in the same space.
Power users might have privileges to create and edit visualizations and dashboards,
When using Kibana with security, you can configure applications and features
based on your users’ privileges. This means different roles can have access
to different features in the same space.
Power users might have privileges to create and edit visualizations and dashboards,
while analysts or executives might have Dashboard and Canvas with read-only privileges.
See <<adding_kibana_privileges>> for details.

Expand All @@ -106,7 +106,7 @@ interface.
. Import your saved objects.
. (Optional) Delete objects in the export space that you no longer need.

{kib} also has beta <<saved-objects-api-import, import>> and
{kib} also has beta <<saved-objects-api-import, import>> and
<<saved-objects-api-export, export>> APIs if you want to automate this process.

[float]
Expand All @@ -115,17 +115,22 @@ interface.

You can create a custom experience for users by configuring the {kib} landing page on a per-space basis.
The landing page can route users to a specific dashboard, application, or saved object as they enter each space.
To configure the landing page, use the `defaultRoute` setting in <<kibana-general-settings, Management > Advanced settings>>.

To configure the landing page, use the default route setting in <<kibana-general-settings, Management > Advanced settings>>.
For example, you might set the default route to `/app/kibana#/dashboards`.

[role="screenshot"]
image::spaces/images/spaces-configure-landing-page.png["Configure space-level landing page"]


[float]
[[spaces-delete-started]]
=== Disable and version updates

Spaces are automatically enabled in {kib}. If you don't want use this feature,
Spaces are automatically enabled in {kib}. If you don't want use this feature,
you can disable it
by setting `xpack.spaces.enabled` to `false` in your
by setting `xpack.spaces.enabled` to `false` in your
`kibana.yml` configuration file.

If you are upgrading your
version of {kib}, the default space will contain all of your existing saved objects.

If you are upgrading your
version of {kib}, the default space will contain all of your existing saved objects.
2 changes: 1 addition & 1 deletion examples/demo_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { Plugin, CoreSetup, PluginInitializerContext } from 'kibana/server';
import { DataPluginSetup } from 'src/plugins/data/server/plugin';
import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server';
import { demoSearchStrategyProvider } from './demo_search_strategy';
import { DEMO_SEARCH_STRATEGY, IDemoRequest, IDemoResponse } from '../common';

Expand Down
Loading

0 comments on commit 3dd94d5

Please sign in to comment.