Merge branch 'master' into EUIfication/data_table

# Conflicts:
#	package.json
#	src/plugins/vis_type_table/public/table_vis_controller.test.ts
#	src/plugins/vis_type_table/public/vis_controller.ts
#	src/plugins/visualizations/public/vis_types/react_vis_controller.tsx
#	test/functional/services/data_grid.ts
#	yarn.lock
This commit is contained in:
sulemanof 2020-09-30 17:02:05 +03:00
commit 59987e5d0d
14490 changed files with 725837 additions and 458546 deletions

38
.ci/Dockerfile Normal file
View file

@ -0,0 +1,38 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
ARG NODE_VERSION=10.22.1
FROM node:${NODE_VERSION} AS base
RUN apt-get update && \
apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-8-jre && \
rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y rsync jq bsdtar google-chrome-stable \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN LATEST_VAULT_RELEASE=$(curl -s https://api.github.com/repos/hashicorp/vault/tags | jq --raw-output .[0].name[1:]) \
&& curl -L https://releases.hashicorp.com/vault/${LATEST_VAULT_RELEASE}/vault_${LATEST_VAULT_RELEASE}_linux_amd64.zip -o vault.zip \
&& unzip vault.zip \
&& rm vault.zip \
&& chmod +x vault \
&& mv vault /usr/local/bin/vault
RUN groupadd -r kibana && useradd -r -g kibana kibana && mkdir /home/kibana && chown kibana:kibana /home/kibana
COPY ./bash_standard_lib.sh /usr/local/bin/bash_standard_lib.sh
RUN chmod +x /usr/local/bin/bash_standard_lib.sh
COPY ./runbld /usr/local/bin/runbld
RUN chmod +x /usr/local/bin/runbld
USER kibana

View file

@ -7,18 +7,22 @@ kibanaPipeline(timeoutMinutes: 120) {
githubCommitStatus.trackBuild(params.commit, 'kibana-ci-baseline') {
ciStats.trackBuild {
catchError {
parallel([
'oss-visualRegression': {
workers.ci(name: 'oss-visualRegression', size: 's-highmem', ramDisk: true) {
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
}
},
'xpack-visualRegression': {
workers.ci(name: 'xpack-visualRegression', size: 's-highmem', ramDisk: true) {
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
}
},
])
withEnv([
'CI_PARALLEL_PROCESS_NUMBER=1'
]) {
parallel([
'oss-baseline': {
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
}
},
'xpack-baseline': {
workers.ci(name: 'xpack-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
}
},
])
}
}
kibanaPipeline.sendMail()

View file

@ -12,8 +12,12 @@ kibanaPipeline(timeoutMinutes: 240) {
]) {
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
catchError {
kibanaPipeline.bash("""
echo '${TIME_STAMP}'
""", "### Print Canonical Time Stamp")
kibanaCoverage.runTests()
kibanaTeamAssign.load('team_assignment', "### Upload Team Assignment JSON")
handleIngestion(TIME_STAMP)
}
handleFail()
@ -30,8 +34,8 @@ def handleIngestion(timestamp) {
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.generateReports("### Merge coverage reports")
kibanaCoverage.uploadCombinedReports()
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, '### Ingest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, teamAssignmentsPath(), '### Generate Team Assignments && Ingest')
}
def handlePreviousSha() {
@ -42,7 +46,7 @@ def handlePreviousSha() {
def handleFail() {
def buildStatus = buildUtils.getBuildStatus()
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
if (params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
slackNotifications.sendFailedBuild(
channel: '#kibana-qa',
username: 'Kibana QA'
@ -50,3 +54,7 @@ def handleFail() {
}
}
def teamAssignmentsPath() {
return 'src/dev/code_coverage/ingest_coverage/team_assignment/team_assignments.txt'
}

View file

@ -0,0 +1,28 @@
#!/bin/groovy
library 'kibana-pipeline-library'
kibanaLibrary.load()
kibanaPipeline(timeoutMinutes: 180) {
slackNotifications.onFailure(
disabled: !params.NOTIFY_ON_FAILURE,
channel: '#security-solution-slack-testing'
) {
catchError {
withEnv([
'CI_PARALLEL_PROCESS_NUMBER=1'
]) {
def job = 'xpack-securityCypress'
workers.ci(name: job, size: 'l', ramDisk: true) {
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress.sh')()
}
}
}
}
if (params.NOTIFY_ON_FAILURE) {
kibanaPipeline.sendMail(to: 'siem_dev_team@elastic.co')
}
}

View file

@ -37,22 +37,31 @@ pipeline {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: false,
shallow: false, reference: "/var/lib/jenkins/.git-references/kibana.git")
// Filter when to run based on the below reasons:
// - On a PRs when:
// - There are changes related to the APM UI project
// - only when the owners of those changes are members of the given GitHub teams
// - On merges to branches when:
// - There are changes related to the APM UI project
// - FORCE parameter is set to true.
script {
def apm_updated = false
dir("${BASE_DIR}"){
def regexps =[ "^x-pack/plugins/apm/.*" ]
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
apm_updated = isGitRegionMatch(patterns: [ "^x-pack/plugins/apm/.*" ])
}
if (isPR()) {
def isMember = isMemberOf(user: env.CHANGE_AUTHOR, team: ['apm-ui', 'uptime'])
setEnvVar('RUN_APM_E2E', params.FORCE || (apm_updated && isMember))
} else {
setEnvVar('RUN_APM_E2E', params.FORCE || apm_updated)
}
}
}
}
stage('Prepare Kibana') {
options { skipDefaultCheckout() }
when {
anyOf {
expression { return params.FORCE }
expression { return env.APM_UPDATED != "false" }
}
}
when { expression { return env.RUN_APM_E2E != "false" } }
environment {
JENKINS_NODE_COOKIE = 'dontKillMe'
}
@ -70,12 +79,7 @@ pipeline {
}
stage('Smoke Tests'){
options { skipDefaultCheckout() }
when {
anyOf {
expression { return params.FORCE }
expression { return env.APM_UPDATED != "false" }
}
}
when { expression { return env.RUN_APM_E2E != "false" } }
steps{
notifyTestStatus('Running smoke tests', 'PENDING')
dir("${BASE_DIR}"){

View file

@ -90,7 +90,20 @@ class PrChangesTest extends KibanaBasePipelineTest {
props([
githubPrs: [
getChanges: { [
[filename: 'docs/developer/architecture/code-exploration.asciidoc'],
[filename: 'docs/developer/plugin-list.asciidoc'],
] },
],
])
assertFalse(prChanges.areChangesSkippable())
}
@Test
void 'areChangesSkippable() with plugin readme changes'() {
props([
githubPrs: [
getChanges: { [
[filename: 'src/plugins/foo/README.asciidoc'],
] },
],
])

View file

@ -9,6 +9,7 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
super.setUp()
helper.registerAllowedMethod('slackSend', [Map.class], null)
prop('buildState', loadScript("vars/buildState.groovy"))
slackNotifications = loadScript('vars/slackNotifications.groovy')
}
@ -25,13 +26,49 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
}
@Test
void 'sendFailedBuild() should call slackSend() with message'() {
void 'sendFailedBuild() should call slackSend() with an in-progress message'() {
mockFailureBuild()
slackNotifications.sendFailedBuild()
def args = fnMock('slackSend').args[0]
def expected = [
channel: '#kibana-operations-alerts',
username: 'Kibana Operations',
iconEmoji: ':jenkins:',
color: 'danger',
message: ':hourglass_flowing_sand: elastic / kibana # master #1',
]
expected.each {
assertEquals(it.value.toString(), args[it.key].toString())
}
assertEquals(
":hourglass_flowing_sand: *<http://jenkins.localhost:8080/job/elastic+kibana+master/1/|elastic / kibana # master #1>*",
args.blocks[0].text.text.toString()
)
assertEquals(
"*Failed Steps*\n• <http://jenkins.localhost:8080|Execute test task>",
args.blocks[1].text.text.toString()
)
assertEquals(
"*Test Failures*\n• <https://localhost/|x-pack/test/functional/apps/fake/test·ts.Fake test &lt;Component&gt; should &amp; pass &amp;>",
args.blocks[2].text.text.toString()
)
}
@Test
void 'sendFailedBuild() should call slackSend() with message'() {
mockFailureBuild()
slackNotifications.sendFailedBuild(isFinal: true)
def args = fnMock('slackSend').args[0]
def expected = [
channel: '#kibana-operations-alerts',
username: 'Kibana Operations',
@ -65,7 +102,7 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
mockFailureBuild()
def counter = 0
helper.registerAllowedMethod('slackSend', [Map.class], { ++counter > 1 })
slackNotifications.sendFailedBuild()
slackNotifications.sendFailedBuild(isFinal: true)
def args = fnMocks('slackSend')[1].args[0]
@ -88,6 +125,29 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
)
}
@Test
void 'sendFailedBuild() should call slackSend() with a channel id and timestamp on second call'() {
mockFailureBuild()
helper.registerAllowedMethod('slackSend', [Map.class], { [ channelId: 'CHANNEL_ID', ts: 'TIMESTAMP' ] })
slackNotifications.sendFailedBuild(isFinal: false)
slackNotifications.sendFailedBuild(isFinal: true)
def args = fnMocks('slackSend')[1].args[0]
def expected = [
channel: 'CHANNEL_ID',
timestamp: 'TIMESTAMP',
username: 'Kibana Operations',
iconEmoji: ':jenkins:',
color: 'danger',
message: ':broken_heart: elastic / kibana # master #1',
]
expected.each {
assertEquals(it.value.toString(), args[it.key].toString())
}
}
@Test
void 'getTestFailures() should truncate list of failures to 10'() {
prop('testUtils', [

View file

@ -3,4 +3,4 @@
profiles:
- ".*": # Match any job
tests:
junit-filename-pattern: "8d8bd494-d909-4e67-a052-7e8b5aaeb5e4" # A bogus path that should never exist
junit-filename-pattern: false

View file

@ -18,15 +18,12 @@ target
# plugin overrides
/src/core/lib/kbn_internal_native_observable
/src/legacy/core_plugins/console/public/tests/webpackShims
/src/legacy/core_plugins/console/public/webpackShims
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
/src/legacy/ui/public/flot-charts
/src/legacy/ui/public/utils/decode_geo_hash.js
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/src/plugins/timelion/public/webpackShims/jquery.flot.*
/src/plugins/vis_type_timelion/public/flot/jquery.flot.*
/src/plugins/timelion/public/flot/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
@ -42,9 +39,9 @@ target
/x-pack/legacy/plugins/maps/public/vendor/**
# package overrides
/packages/eslint-config-kibana
/packages/elastic-eslint-config-kibana
/packages/kbn-interpreter/src/common/lib/grammar.js
/packages/kbn-plugin-generator/sao_template/template
/packages/kbn-plugin-generator/template
/packages/kbn-pm/dist
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/

View file

@ -17,9 +17,6 @@
* under the License.
*/
const { readdirSync } = require('fs');
const { resolve } = require('path');
const APACHE_2_0_LICENSE_HEADER = `
/*
* Licensed to Elasticsearch B.V. under one or more contributor
@ -94,12 +91,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/plugins/es_ui_shared/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/kibana_react/**/*.{js,mjs,ts,tsx}'],
rules: {
@ -125,31 +116,12 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},
{
files: ['x-pack/legacy/plugins/index_management/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'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: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
/**
* Files that require Apache 2.0 headers, settings
@ -302,10 +274,7 @@ module.exports = {
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
},
{
target: [
'(src|x-pack)/plugins/*/server/**/*',
'!x-pack/plugins/apm/**/*', // https://github.com/elastic/kibana/issues/67210
],
target: ['(src|x-pack)/plugins/*/server/**/*'],
from: ['(src|x-pack)/plugins/*/public/**/*'],
errorMessage: `Server code can not import from public, use a common directory.`,
},
@ -316,7 +285,7 @@ module.exports = {
},
{
target: [
'(src|x-pack)/legacy/**/*',
'src/legacy/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'examples/**/*',
],
@ -333,6 +302,8 @@ module.exports = {
'!src/core/server/mocks{,.ts}',
'!src/core/server/types{,.ts}',
'!src/core/server/test_utils{,.ts}',
'!src/core/server/utils', // ts alias
'!src/core/server/utils/**/*',
// for absolute imports until fixed in
// https://github.com/elastic/kibana/issues/36096
'!src/core/server/*.test.mocks{,.ts}',
@ -345,14 +316,11 @@ module.exports = {
},
{
target: [
'(src|x-pack)/legacy/**/*',
'src/legacy/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'examples/**/*',
'!(src|x-pack)/**/*.test.*',
'!(x-pack/)?test/**/*',
// next folder contains legacy browser tests which can't be migrated to jest
// which import np files
'!src/legacy/core_plugins/kibana/public/__tests__/**/*',
],
from: [
'(src|x-pack)/plugins/**/(public|server)/**/*',
@ -367,14 +335,6 @@ module.exports = {
'(src|x-pack)/plugins/**/*',
'!(src|x-pack)/plugins/**/server/**/*',
'src/legacy/core_plugins/**/*',
'!src/legacy/core_plugins/**/server/**/*',
'!src/legacy/core_plugins/**/index.{js,mjs,ts,tsx}',
'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/**/server/**/*',
'!x-pack/legacy/plugins/**/index.{js,mjs,ts,tsx}',
'examples/**/*',
'!examples/**/server/**/*',
],
@ -396,17 +356,12 @@ module.exports = {
},
{
target: ['src/core/**/*'],
from: [
'plugins/**/*',
'src/plugins/**/*',
'src/legacy/core_plugins/**/*',
'src/legacy/ui/**/*',
],
from: ['plugins/**/*', 'src/plugins/**/*', 'src/legacy/ui/**/*'],
errorMessage: 'The core cannot depend on any plugins.',
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['ui/**/*', 'uiExports/**/*'],
from: ['ui/**/*'],
errorMessage: 'Plugins cannot import legacy UI code.',
},
{
@ -414,12 +369,6 @@ module.exports = {
target: [
'test/plugin_functional/plugins/**/public/np_ready/**/*',
'test/plugin_functional/plugins/**/server/np_ready/**/*',
'src/legacy/core_plugins/**/public/np_ready/**/*',
'src/legacy/core_plugins/vis_type_*/public/**/*',
'!src/legacy/core_plugins/vis_type_*/public/legacy*',
'src/legacy/core_plugins/**/server/np_ready/**/*',
'x-pack/legacy/plugins/**/public/np_ready/**/*',
'x-pack/legacy/plugins/**/server/np_ready/**/*',
],
allowSameFolder: true,
errorMessage:
@ -439,6 +388,7 @@ module.exports = {
*/
{
files: [
'**/*.stories.tsx',
'x-pack/test/apm_api_integration/**/*.ts',
'x-pack/test/functional/apps/**/*.js',
'x-pack/plugins/apm/**/*.js',
@ -463,29 +413,20 @@ module.exports = {
{
files: [
'**/public/**/*.js',
'**/webpackShims/**/*.js',
'packages/kbn-ui-framework/doc_site/src/**/*.js',
'src/fixtures/**/*.js', // TODO: this directory needs to be more obviously "public" (or go away)
],
settings: {
// instructs import/no-extraneous-dependencies to treat certain modules
// as core modules, even if they aren't listed in package.json
'import/core-modules': ['plugins', 'legacy/ui', 'uiExports'],
'import/core-modules': ['plugins'],
'import/resolver': {
'@kbn/eslint-import-resolver-kibana': {
forceNode: false,
rootPackageName: 'kibana',
kibanaPath: '.',
pluginMap: readdirSync(resolve(__dirname, 'x-pack/legacy/plugins')).reduce(
(acc, name) => {
if (!name.startsWith('_')) {
acc[name] = `x-pack/legacy/plugins/${name}`;
}
return acc;
},
{}
),
pluginMap: {},
},
},
},
@ -524,11 +465,12 @@ module.exports = {
'packages/kbn-interpreter/tasks/**/*.js',
'packages/kbn-interpreter/src/plugin/**/*.js',
'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*.js',
'x-pack/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
'x-pack/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__,public}/**/*.js',
'x-pack/**/*.test.js',
'x-pack/test_utils/**/*',
'x-pack/gulpfile.js',
'x-pack/plugins/apm/public/utils/testHelpers.js',
'x-pack/plugins/canvas/shareable_runtime/postcss.config.js',
],
rules: {
'import/no-extraneous-dependencies': [
@ -610,8 +552,6 @@ module.exports = {
{
files: [
'.eslintrc.js',
'**/webpackShims/**/*.js',
'packages/kbn-plugin-generator/**/*.js',
'packages/kbn-eslint-import-resolver-kibana/**/*.js',
'packages/kbn-eslint-plugin-eslint/**/*',
'x-pack/gulpfile.js',
@ -792,16 +732,6 @@ module.exports = {
},
},
/**
* GIS overrides
*/
{
files: ['x-pack/legacy/plugins/maps/**/*.js'],
rules: {
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
},
},
/**
* ML overrides
*/
@ -840,7 +770,7 @@ module.exports = {
},
{
// typescript only for front and back end
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'],
files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
rules: {
// This will be turned on after bug fixes are complete
// '@typescript-eslint/explicit-member-accessibility': 'warn',
@ -886,7 +816,7 @@ module.exports = {
// },
{
// typescript and javascript for front and back end
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node', 'react'],
env: {
mocha: true,
@ -1117,7 +1047,7 @@ module.exports = {
{
// typescript only for front and back end
files: [
'x-pack/{,legacy/}plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
'x-pack/plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
@ -1266,10 +1196,7 @@ module.exports = {
* TSVB overrides
*/
{
files: [
'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
],
files: ['src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}'],
rules: {
'import/no-default-export': 'error',
},
@ -1303,5 +1230,20 @@ module.exports = {
'@typescript-eslint/prefer-ts-expect-error': 'error',
},
},
{
files: [
'**/public/**/*.{js,mjs,ts,tsx}',
'**/common/**/*.{js,mjs,ts,tsx}',
'packages/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-restricted-imports': [
'error',
{
patterns: ['lodash/*', '!lodash/fp'],
},
],
},
},
],
};

216
.github/CODEOWNERS vendored
View file

@ -2,15 +2,20 @@
# Identify which groups will be pinged by changes to different parts of the codebase.
# For more info, see https://help.github.com/articles/about-codeowners/
# The #CC# prefix delineates Code Coverage,
# used for the 'team' designator within Kibana Stats
# App
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-app
/x-pack/plugins/discover_enhanced/ @elastic/kibana-app
/x-pack/plugins/lens/ @elastic/kibana-app
/x-pack/plugins/graph/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
/src/plugins/advanced_settings/ @elastic/kibana-app
/src/plugins/charts/ @elastic/kibana-app
/src/plugins/dashboard/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/input_control_vis/ @elastic/kibana-app
/src/plugins/management/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/vis_default_editor/ @elastic/kibana-app
/src/plugins/vis_type_markdown/ @elastic/kibana-app
@ -23,6 +28,34 @@
/src/plugins/vis_type_vislib/ @elastic/kibana-app
/src/plugins/vis_type_xy/ @elastic/kibana-app
/src/plugins/visualize/ @elastic/kibana-app
/src/plugins/visualizations/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
#CC# /src/plugins/vis_type @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/common/utils @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/migrations @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/console_legacy @elastic/kibana-app
#CC# /src/legacy/core_plugins/input_control_vis @elastic/kibana-app
#CC# /src/legacy/core_plugins/timelion @elastic/kibana-app
#CC# /src/legacy/core_plugins/vis_type_tagcloud @elastic/kibana-app
#CC# /src/legacy/core_plugins/vis_type_vega @elastic/kibana-app
#CC# /src/legacy/core_plugins/vis_type_vislib/ @elastic/kibana-app
#CC# /src/legacy/server/sample_data/ @elastic/kibana-app
#CC# /src/legacy/server/url_shortening/ @elastic/kibana-app
#CC# /src/legacy/ui/public/state_management @elastic/kibana-app
#CC# /src/plugins/charts/public/static/color_maps @elastic/kibana-app
#CC# /src/plugins/index_pattern_management/public @elastic/kibana-app
#CC# /src/plugins/input_control_vis/ @elastic/kibana-app
#CC# /src/plugins/kibana_legacy/ @elastic/kibana-app
#CC# /src/plugins/timelion @elastic/kibana-app
#CC# /x-pack/legacy/plugins/dashboard_mode/ @elastic/kibana-app
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-app
#CC# /x-pack/plugins/lens/ @elastic/kibana-app
# App Architecture
/examples/bfetch_explorer/ @elastic/kibana-app-arch
@ -38,7 +71,6 @@
/examples/url_generators_explorer/ @elastic/kibana-app-arch
/packages/elastic-datemath/ @elastic/kibana-app-arch
/packages/kbn-interpreter/ @elastic/kibana-app-arch
/src/plugins/advanced_settings/ @elastic/kibana-app-arch
/src/plugins/bfetch/ @elastic/kibana-app-arch
/src/plugins/data/ @elastic/kibana-app-arch
/src/plugins/embeddable/ @elastic/kibana-app-arch
@ -47,52 +79,88 @@
/src/plugins/kibana_react/ @elastic/kibana-app-arch
/src/plugins/kibana_react/public/code_editor @elastic/kibana-canvas
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
/src/plugins/management/ @elastic/kibana-app-arch
/src/plugins/navigation/ @elastic/kibana-app-arch
/src/plugins/share/ @elastic/kibana-app-arch
/src/plugins/ui_actions/ @elastic/kibana-app-arch
/src/plugins/visualizations/ @elastic/kibana-app-arch
/x-pack/examples/ui_actions_enhanced_examples/ @elastic/kibana-app-arch
/x-pack/plugins/data_enhanced/ @elastic/kibana-app-arch
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-arch
/x-pack/plugins/ui_actions_enhanced/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/kibana/public/management/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/kibana/server/routes/api/management/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch
#CC# /src/legacy/core_plugins/status_page/public @elastic/kibana-app-arch
#CC# /src/legacy/server/index_patterns/ @elastic/kibana-app-arch
#CC# /src/legacy/ui/public/field_editor @elastic/kibana-app-arch
#CC# /src/legacy/ui/public/management @elastic/kibana-app-arch
#CC# /src/plugins/advanced_settings/ @elastic/kibana-app-arch
#CC# /src/plugins/bfetch/ @elastic/kibana-app-arch
#CC# /src/plugins/charts/ @elastic/kibana-app-arch
#CC# /src/plugins/index_pattern_management/public/service @elastic/kibana-app-arch
#CC# /src/plugins/inspector/ @elastic/kibana-app-arch
#CC# /src/plugins/saved_objects/ @elastic/kibana-app-arch
#CC# /src/plugins/share/ @elastic/kibana-app-arch
#CC# /src/plugins/vis_default_editor @elastic/kibana-app-arch
#CC# /x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
#CC# /x-pack/plugins/drilldowns/ @elastic/kibana-app-arch
#CC# /packages/kbn-interpreter/ @elastic/kibana-app-arch
# APM
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
/src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
/src/plugins/apm_oss/ @elastic/apm-ui
/src/apm.js @watson @vigneshshanmugam
#CC# /src/plugins/apm_oss/ @elastic/apm-ui
#CC# /src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
#CC# /src/legacy/ui/public/apm @elastic/apm-ui
#CC# /x-pack/legacy/plugins/apm/ @elastic/apm-ui
#CC# /x-pack/plugins/observability/ @elastic/apm-ui
# Client Side Monitoring (lives in APM directories but owned by Uptime)
/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm @elastic/uptime
/x-pack/plugins/apm/e2e/cypress/integration/csm_dashboard.feature @elastic/uptime
/x-pack/plugins/apm/public/application/csmApp.tsx @elastic/uptime
/x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime
/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime
/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime
/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime
/x-pack/plugins/apm/server/projections/rum_overview.ts @elastic/uptime
#CC# /x-pack/legacy/plugins/uptime @elastic/uptime
# Beats
/x-pack/plugins/beats_management/ @elastic/beats
/x-pack/legacy/plugins/beats_management/ @elastic/beats
#CC# /x-pack/plugins/beats_management/ @elastic/beats
# Canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas
/x-pack/test/functional/apps/canvas/ @elastic/kibana-canvas
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-canvas
#CC# /x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas
# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
/src/plugins/home/public @elastic/kibana-core-ui
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
/src/plugins/home/server/services/ @elastic/kibana-core-ui
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-core-ui
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-core-ui
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui
/x-pack/plugins/global_search_bar/ @elastic/kibana-core-ui
#CC# /src/legacy/core_plugins/newsfeed @elastic/kibana-core-ui
#CC# /src/plugins/newsfeed @elastic/kibana-core-ui
#CC# /src/plugins/home/public @elastic/kibana-core-ui
#CC# /src/plugins/home/server/services/ @elastic/kibana-core-ui
#CC# /src/plugins/home/ @elastic/kibana-core-ui
#CC# /x-pack/plugins/global_search_providers/ @elastic/kibana-core-ui
# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/plugins/observability/ @elastic/observability-ui
/x-pack/legacy/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/uptime @elastic/uptime
# Machine Learning
/x-pack/legacy/plugins/ml/ @elastic/ml-ui
/x-pack/plugins/ml/ @elastic/ml-ui
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
@ -104,12 +172,19 @@
/x-pack/test/functional/services/transform.ts @elastic/ml-ui
# Maps
/x-pack/legacy/plugins/maps/ @elastic/kibana-gis
/x-pack/plugins/maps/ @elastic/kibana-gis
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
#CC# /src/legacy/core_plugins/region_map @elastic/kibana-gis
#CC# /src/legacy/core_plugins/tile_map @elastic/kibana-gis
#CC# /src/plugins/maps_legacy/ @elastic/kibana-gis
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
#CC# /x-pack/plugins/maps_legacy_licensing @elastic/kibana-gis
#CC# /src/plugins/home/server/tutorials @elastic/kibana-gis
#CC# /src/plugins/tile_map/ @elastic/kibana-gis
#CC# /src/plugins/region_map/ @elastic/kibana-gis
# Operations
/src/dev/ @elastic/kibana-operations
@ -124,6 +199,7 @@
/packages/kbn-test/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps/ @elastic/kibana-operations
/packages/kbn-es-archiver/ @elastic/kibana-operations
/packages/kbn-utils/ @elastic/kibana-operations
/src/legacy/server/keystore/ @elastic/kibana-operations
/src/legacy/server/pid/ @elastic/kibana-operations
/src/legacy/server/sass/ @elastic/kibana-operations
@ -131,6 +207,7 @@
/src/legacy/server/warnings/ @elastic/kibana-operations
/.ci/es-snapshots/ @elastic/kibana-operations
/vars/ @elastic/kibana-operations
#CC# /packages/kbn-expect/ @elastic/kibana-operations
# Quality Assurance
/src/dev/code_coverage @elastic/kibana-qa
@ -148,6 +225,7 @@
/x-pack/plugins/cloud/ @elastic/kibana-platform
/x-pack/test/saved_objects_field_count/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/packages/kbn-std/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
/src/legacy/server/logging/ @elastic/kibana-platform
@ -156,21 +234,63 @@
/src/plugins/status_page/ @elastic/kibana-platform
/src/plugins/saved_objects_management/ @elastic/kibana-platform
/src/dev/run_check_published_api_changes.ts @elastic/kibana-platform
#CC# /src/core/server/csp/ @elastic/kibana-platform
#CC# /src/legacy/core_plugins/kibana/server/lib @elastic/kibana-platform
#CC# /src/legacy/core_plugins/kibana/server/lib/management/saved_objects @elastic/kibana-platform
#CC# /src/legacy/core_plugins/kibana/server/routes/api/import/ @elastic/kibana-platform
#CC# /src/legacy/core_plugins/kibana/server/routes/api/export/ @elastic/kibana-platform
#CC# /src/legacy/core_plugins/elasticsearch @elastic/kibana-platform
#CC# /src/legacy/core_plugins/testbed @elastic/kibana-platform
#CC# /src/legacy/server/config/ @elastic/kibana-platform
#CC# /src/legacy/server/http/ @elastic/kibana-platform
#CC# /src/legacy/server/status/ @elastic/kibana-platform
#CC# /src/legacy/ui/public/new_platform @elastic/kibana-platform
#CC# /src/legacy/ui/public/plugin_discovery @elastic/kibana-platform
#CC# /src/legacy/ui/public/chrome @elastic/kibana-platform
#CC# /src/legacy/ui/public/notify @elastic/kibana-platform
#CC# /src/legacy/ui/public/documentation_links @elastic/kibana-platform
#CC# /src/legacy/ui/public/autoload @elastic/kibana-platform
#CC# /src/plugins/legacy_export/ @elastic/kibana-platform
#CC# /src/plugins/status_page/ @elastic/kibana-platform
#CC# /src/plugins/testbed/server/ @elastic/kibana-platform
#CC# /x-pack/legacy/plugins/xpack_main/server/ @elastic/kibana-platform
#CC# /x-pack/legacy/server/lib/ @elastic/kibana-platform
#CC# /x-pack/plugins/cloud/ @elastic/kibana-platform
#CC# /x-pack/plugins/features/ @elastic/kibana-platform
#CC# /x-pack/plugins/global_search/ @elastic/kibana-platform
#CC# /src/legacy/plugin_discovery/ @elastic/kibana-platform
# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
/x-pack/legacy/plugins/security/ @elastic/kibana-security
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
/x-pack/test/ui_capabilities/ @elastic/kibana-security
/x-pack/test/encrypted_saved_objects_api_integration/ @elastic/kibana-security
/x-pack/test/functional/apps/security/ @elastic/kibana-security
/x-pack/test/kerberos_api_integration/ @elastic/kibana-security
/x-pack/test/login_selector_api_integration/ @elastic/kibana-security
/x-pack/test/oidc_api_integration/ @elastic/kibana-security
/x-pack/test/pki_api_integration/ @elastic/kibana-security
/x-pack/test/saml_api_integration/ @elastic/kibana-security
/x-pack/test/security_api_integration/ @elastic/kibana-security
/x-pack/test/security_functional/ @elastic/kibana-security
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
/x-pack/test/token_api_integration/ @elastic/kibana-security
#CC# /src/legacy/ui/public/capabilities @elastic/kibana-security
#CC# /x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
#CC# /x-pack/plugins/security_solution/ @elastic/kibana-security
#CC# /x-pack/plugins/security/ @elastic/kibana-security
#CC# /x-pack/plugins/audit_trail/ @elastic/kibana-security
# Kibana Localization
/src/dev/i18n/ @elastic/kibana-localization
/src/legacy/server/i18n/ @elastic/kibana-localization
/src/core/public/i18n/ @elastic/kibana-localization
/packages/kbn-i18n/ @elastic/kibana-localization
#CC# /src/legacy/server/i18n/ @elastic/kibana-localization
#CC# /x-pack/plugins/translations/ @elastic/kibana-localization
# Kibana Telemetry
/packages/kbn-analytics/ @elastic/kibana-telemetry
@ -199,26 +319,23 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
# Design
**/*.scss @elastic/kibana-design
#CC# /x-pack/legacy/plugins/actions/ @elastic/kibana-alerting-services
#CC# /x-pack/legacy/plugins/alerting/ @elastic/kibana-alerting-services
#CC# /x-pack/legacy/plugins/task_manager @elastic/kibana-alerting-services
#CC# /x-pack/legacy/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
#CC# /x-pack/plugins/alerting_builtins @elastic/kibana-alerting-services
# Enterprise Search
/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
/x-pack/plugins/enterprise_search/**/*.scss @elastic/ent-search-design
# Shared
/x-pack/plugins/enterprise_search/ @elastic/enterprise-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
# Elasticsearch UI
/src/plugins/dev_tools/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
/x-pack/legacy/plugins/license_management/ @elastic/es-ui
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/console_extensions/ @elastic/es-ui
/x-pack/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/plugins/grokdebugger/ @elastic/es-ui
@ -232,6 +349,14 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui
/x-pack/plugins/ingest_pipelines/ @elastic/es-ui
/packages/kbn-ace/ @elastic/es-ui
/packages/kbn-monaco/ @elastic/es-ui
#CC# /x-pack/legacy/plugins/rollup/ @elastic/es-ui
#CC# /x-pack/legacy/server/lib/create_router/ @elastic/es-ui
#CC# /x-pack/legacy/server/lib/check_license/ @elastic/es-ui
#CC# /x-pack/plugins/console_extensions/ @elastic/es-ui
#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/es-ui
#CC# /x-pack/plugins/es_ui_shared/ @elastic/es-u
# Endpoint
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team @elastic/siem
@ -241,13 +366,48 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem
#CC# /x-pack/legacy/plugins/siem/ @elastic/siem
#CC# /x-pack/plugins/siem/ @elastic/siem
#CC# /x-pack/plugins/security_solution/ @elastic/siem
# Security Solution
/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/lists_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team
# Security Intelligence And Analytics
/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
# Design (at the bottom for specificity of SASS files)
**/*.scss @elastic/kibana-design
#CC# /packages/kbn-ui-framework/ @elastic/kibana-design
# Core design
/src/plugins/dashboard/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/canvas/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/spaces/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/security/**/*.scss @elastic/kibana-core-ui-designers
# Observability design
/x-pack/plugins/apm/**/*.scss @elastic/observability-design
/x-pack/plugins/infra/**/*.scss @elastic/observability-design
/x-pack/plugins/ingest_manager/**/*.scss @elastic/observability-design
/x-pack/plugins/observability/**/*.scss @elastic/observability-design
/x-pack/plugins/monitoring/**/*.scss @elastic/observability-design
# Ent. Search design
/x-pack/plugins/enterprise_search/**/*.scss @elastic/ent-search-design
# Security design
/x-pack/plugins/endpoint/**/*.scss @elastic/security-design
/x-pack/plugins/security_solution/**/*.scss @elastic/security-design
# Logstash
#CC# /x-pack/plugins/logstash/ @elastic/logstash
# Reporting
#CC# /x-pack/plugins/reporting/ @elastic/kibana-reporting-services

11
.github/ISSUE_TEMPLATE/APM.md vendored Normal file
View file

@ -0,0 +1,11 @@
---
name: APM Issue
about: Issues related to the APM solution in Kibana
labels: Team:apm
title: "[APM]"
---
**Versions**
Kibana: (if relevant)
APM Server: (if relevant)
Elasticsearch: (if relevant)

View file

@ -7,12 +7,12 @@ Summarize your PR. If it involves visual changes include a screenshot or gif.
Delete any items that are not applicable to this PR.
- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials
- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

View file

@ -16,3 +16,11 @@
- "x-pack/test/epm_api_integration/**/*.*"
- "Team:uptime":
- "x-pack/plugins/uptime/**/*.*"
- "x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm/*.*"
- "x-pack/plugins/apm/public/application/csmApp.tsx"
- "x-pack/plugins/apm/public/components/app/RumDashboard/**/*.*"
- "x-pack/plugins/apm/public/components/app/RumDashboard/*.*"
- "x-pack/plugins/apm/server/lib/rum_client/**/*.*"
- "x-pack/plugins/apm/server/lib/rum_client/*.*"
- "x-pack/plugins/apm/server/routes/rum_client.ts"
- "x-pack/plugins/apm/server/projections/rum_overview.ts"

5
.gitignore vendored
View file

@ -49,6 +49,8 @@ npm-debug.log*
.tern-project
.nyc_output
.ci/pipeline-library/build/
.ci/runbld
.ci/bash_standard_lib.sh
.gradle
# apm plugin
@ -58,3 +60,6 @@ apm.tsconfig.json
# release notes script output
report.csv
report.asciidoc
# TS incremental build cache
*.tsbuildinfo

View file

@ -57,7 +57,8 @@
"visTypeXy": "src/plugins/vis_type_xy",
"visualizations": "src/plugins/visualizations",
"visualize": "src/plugins/visualize",
"apmOss": "src/plugins/apm_oss"
"apmOss": "src/plugins/apm_oss",
"usageCollection": "src/plugins/usage_collection"
},
"exclude": [
"src/legacy/ui/ui_render/ui_render_mixin.js"

View file

@ -1 +1 @@
10.21.0
10.22.1

2
.nvmrc
View file

@ -1 +1 @@
10.21.0
10.22.1

View file

@ -1,6 +1,7 @@
files:
include:
- 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss'
- 'src/plugins/index_pattern_management/**/*.s+(a|c)ss'
- 'src/plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vega/**/*.s+(a|c)ss'

View file

@ -1,13 +1,4 @@
[
{
"output": "src/plugins/telemetry/schema/legacy_oss_plugins.json",
"root": "src/legacy/core_plugins/",
"exclude": [
"src/legacy/core_plugins/testbed",
"src/legacy/core_plugins/elasticsearch",
"src/legacy/core_plugins/tests_bundle"
]
},
{
"output": "src/plugins/telemetry/schema/oss_plugins.json",
"root": "src/plugins/",
@ -15,11 +6,7 @@
"src/plugins/kibana_react/",
"src/plugins/testbed/",
"src/plugins/kibana_utils/",
"src/plugins/kibana_usage_collection/server/collectors/kibana/kibana_usage_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/application_usage/telemetry_application_usage_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/management/telemetry_management_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts",
"src/plugins/telemetry/server/collectors/usage/telemetry_usage_collector.ts"
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts"
]
}
]

55
Jenkinsfile vendored
View file

@ -4,59 +4,18 @@ library 'kibana-pipeline-library'
kibanaLibrary.load()
kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true, setCommitStatus: true) {
githubPr.withDefaultPrComments {
ciStats.trackBuild {
catchError {
retryable.enable()
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
'oss-firefoxSmoke': kibanaPipeline.functionalTestProcess('kibana-firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh'),
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
'oss-accessibility': kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh'),
// 'oss-visualRegression': kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh'),
]),
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
'xpack-firefoxSmoke': kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh'),
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'),
'xpack-savedObjectsFieldMetrics': kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'),
'xpack-securitySolutionCypress': { processNumber ->
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/', 'x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/', 'x-pack/plugins/triggers_actions_ui/public/application/context/actions_connectors_context.tsx']) {
kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
}
},
// 'xpack-visualRegression': kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh'),
]),
])
slackNotifications.onFailure(disabled: !params.NOTIFY_ON_FAILURE) {
githubPr.withDefaultPrComments {
ciStats.trackBuild {
catchError {
retryable.enable()
kibanaPipeline.allCiTasks()
}
}
}
}
if (params.NOTIFY_ON_FAILURE) {
slackNotifications.onFailure()
kibanaPipeline.sendMail()
}
}

View file

@ -281,6 +281,13 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---
This product includes code in the function applyCubicBezierStyles that was
inspired by a public Codepen, which was available under a "MIT" license.
Copyright (c) 2020 by Guillaume (https://codepen.io/guillaumethomas/pen/xxbbBKO)
MIT License http://www.opensource.org/licenses/mit-license
---
This product includes code that is adapted from mapbox-gl-js, which is
available under a "BSD-3-Clause" license.

View file

@ -32,7 +32,6 @@ out an open PR:
- [CONTRIBUTING.md](CONTRIBUTING.md) will help you get Kibana up and running.
- If you would like to contribute code, please follow our [STYLEGUIDE.md](STYLEGUIDE.md).
- Learn more about our UI code with [UI_SYSTEMS.md](src/legacy/ui/public/UI_SYSTEMS.md).
- For all other questions, check out the [FAQ.md](FAQ.md) and
[wiki](https://github.com/elastic/kibana/wiki).

View file

@ -593,7 +593,7 @@ Do not use setters, they cause more problems than they can solve.
When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss).
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss).
While the styles for this component will only be loaded if the component exists on the page,
the styles **will** be global and so it is recommended to use a three letter prefix on your

View file

@ -62,7 +62,7 @@ declare module '@elastic/eui' {
1. Open up the file and see how easy it would be to convert to TypeScript.
2. If it's very straightforward, go for it.
3. If it's not and you wish to stay focused on your own PR, get around the error by adding a type definition file in the same folder as the dependency, with the same name.
4. Minimally you will need to type what you are using in your PR. No need to go crazy to fully type the thing or you might be there for awhile depending on what's available.
4. Minimally you will need to type what you are using in your PR. No need to go crazy to fully type the thing or you might be there for a while depending on what's available.
For example:

View file

@ -27,11 +27,6 @@
# The URLs of the Elasticsearch instances to use for all your queries.
#elasticsearch.hosts: ["http://localhost:9200"]
# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"
@ -81,9 +76,6 @@
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000
# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

View file

@ -23,7 +23,7 @@ experimental[] Import dashboards and corresponding saved objects.
[[dashboard-api-import-request-body]]
==== Request body
Use the complete response body from the <<dashboard-api-export, Export dashboard API>> as the request body. Do not manually construct a payload to the endpoint.
Use the complete response body from the <<dashboard-api-export, Export dashboard API>> as the request body. Do not manually construct a payload to the endpoint. The max payload size is determined by the `savedObjects.maxImportPayloadBytes` configuration key.
[[dashboard-api-import-response-body]]
==== Response body

View file

@ -13,7 +13,7 @@ experimental[] Create {kib} saved objects.
`POST <kibana host>:<port>/api/saved_objects/<type>/<id>`
`POST <kibana host>:<port>/s/<space_id>/api/saved_objects/<type>`
`POST <kibana host>:<port>/s/<space_id>/saved_objects/<type>`
[[saved-objects-api-create-path-params]]
==== Path parameters

View file

@ -44,7 +44,10 @@ experimental[] Retrieve a paginated set of {kib} saved objects by various condit
(Optional, array|string) The fields to return in the `attributes` key of the response.
`sort_field`::
(Optional, string) The field that sorts the response.
(Optional, string) Sorts the response. Includes "root" and "type" fields. "root" fields exist for all saved objects, such as "updated_at".
"type" fields are specific to an object type, such as fields returned in the `attributes` key of the response. When a single type is
defined in the `type` parameter, the "root" and "type" fields are allowed, and validity checks are made in that order. When multiple types
are defined in the `type` parameter, only "root" fields are allowed.
`has_reference`::
(Optional, object) Filters to objects that have a relationship with the type and ID combination.

View file

@ -17,13 +17,22 @@ experimental[] Create sets of {kib} saved objects from a file created by the exp
==== Path parameters
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
(Optional, string) An identifier for the <<xpack-spaces,space>>. If `space_id` is not provided in the URL, the default space is used.
[[saved-objects-api-import-query-params]]
==== Query parameters
`createNewCopies`::
(Optional, boolean) Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict
errors are avoided.
+
NOTE: This cannot be used with the `overwrite` option.
`overwrite`::
(Optional, boolean) Overwrites saved objects.
(Optional, boolean) Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by
overwriting the destination object.
+
NOTE: This cannot be used with the `createNewCopies` option.
[[saved-objects-api-import-request-body]]
==== Request body
@ -37,13 +46,23 @@ The request body must include the multipart/form-data type.
==== Response body
`success`::
Top-level property that indicates if the import was successful.
(boolean) Indicates when the import was successfully completed. When set to `false`, some objects may not have been created. For
additional information, refer to the `errors` and `successResults` properties.
`successCount`::
Indicates the number of successfully imported records.
(number) Indicates the number of successfully imported records.
`errors`::
(array) Indicates the import was unsuccessful and specifies the objects that failed to import.
(Optional, array) Indicates the import was unsuccessful and specifies the objects that failed to import.
+
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and
`conflict` error).
`successResults`::
(Optional, array) Indicates the objects that are successfully imported, with any metadata if applicable.
+
NOTE: Objects are only created when all resolvable errors are addressed, including conflicts and missing references. For information on how
to resolve errors, refer to the <<saved-objects-api-import-example,examples>>.
[[saved-objects-api-import-codes]]
==== Response code
@ -51,8 +70,64 @@ The request body must include the multipart/form-data type.
`200`::
Indicates a successful call.
[[saved-objects-api-import-example]]
==== Examples
[[saved-objects-api-import-example-1]]
===== Successful import with `createNewCopies` enabled
Import an index pattern and dashboard:
[source,sh]
--------------------------------------------------
$ curl -X POST api/saved_objects/_import?createNewCopies=true -H "kbn-xsrf: true" --form file=@file.ndjson
--------------------------------------------------
// KIBANA
The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
--------------------------------------------------
The API returns the following:
[source,sh]
--------------------------------------------------
{
"success": true,
"successCount": 2,
"successResults": [
{
"id": "my-pattern",
"type": "index-pattern",
"destinationId": "4aba3770-0d04-45e1-9e34-4cf0fd2165ae",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"destinationId": "c31d1eca-9bc0-4a81-b5f9-30c442824c48",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
The result indicates a successful import, and both objects are created. Since these objects are created as new copies, each entry in the
`successResults` array includes a `destinationId` attribute.
[[saved-objects-api-import-example-2]]
===== Successful import with `createNewCopies` disabled
Import an index pattern and dashboard:
[source,sh]
@ -75,11 +150,34 @@ The API returns the following:
--------------------------------------------------
{
"success": true,
"successCount": 2
"successCount": 2,
"successResults": [
{
"id": "my-pattern",
"type": "index-pattern",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
Import an index pattern and dashboard that includes a conflict on the index pattern:
The result indicates a successful import, and both objects are created.
[[saved-objects-api-import-example-3]]
===== Failed import with conflict errors
Import an index pattern, visualization, *Canvas* workpad, and dashboard that include saved objects:
[source,sh]
--------------------------------------------------
@ -92,6 +190,8 @@ The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}}
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"}}
{"type":"canvas-workpad","id":"my-canvas","attributes":{"name":"Look at my canvas"}}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
--------------------------------------------------
@ -110,12 +210,85 @@ The API returns the following:
"error": {
"type": "conflict"
},
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-visualization",
"type": "my-vis",
"title": "Look at my visualization",
"error": {
"type": "conflict",
"destinationId": "another-vis"
},
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"title": "Look at my canvas",
"error": {
"type": "ambiguous_conflict",
"destinations": [
{
"id": "another-canvas",
"title": "Look at another canvas",
"updatedAt": "2020-07-08T16:36:32.377Z"
},
{
"id": "yet-another-canvas",
"title": "Look at yet another canvas",
"updatedAt": "2020-07-05T12:29:54.849Z"
}
]
},
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
}
],
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
Import a visualization and dashboard with an index pattern for the visualization reference that doesn't exist:
The result indicates an unsuccessful import because the index pattern, visualization, *Canvas* workpad, and dashboard resulted in a conflict
error:
* An index pattern with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
or skip the object.
* A visualization with a different ID, but the same origin already exists, which resulted in a conflict error. The `destinationId` field
contains the `id` of the other visualization, which caused the conflict. The behavior is added to make sure that new objects that can be
shared between <<xpack-spaces,spaces>> behave in a similar way as legacy non-shareable objects. When a shareable object is exported and then
imported into a new space, it retains its origin so that the conflicts are encountered as expected. To resolve, overwrite the specified
destination object, or skip the object.
* Two *Canvas* workpads with different IDs, but the same origin, already exist, which resulted in a conflict error. The `destinations` array
describes the other workpads which caused the conflict. When a shareable object is exported, imported into a new space, then shared to
another space where an object of the same origin exists, the conflict error occurs. To resolve, pick a destination object to overwrite, or
skip the object.
Objects are created when the error is resolved using the <<saved-objects-api-resolve-import-errors-example-1,Resolve import errors API>>.
[[saved-objects-api-import-example-4]]
===== Failed import with missing reference errors
Import a visualization and dashboard when the index pattern for the visualization doesn't exist:
[source,sh]
--------------------------------------------------
@ -127,21 +300,23 @@ The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"visualization","id":"my-vis","attributes":{"title":"my-vis"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"}]}
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]}
{"type":"search","id":"my-search","attributes":{"title":"Look at my search"},"references":[{"name":"ref_0","type":"index-pattern","id":"another-pattern-*"}]}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"},{"name":"ref_1","type":"search","id":"my-search"}]}
--------------------------------------------------
The API returns the following:
[source,sh]
--------------------------------------------------
{
"success": false,
"successCount": 0,
"successCount": 1,
"errors": [
{
"id": "my-vis",
"type": "visualization",
"title": "my-vis",
"title": "Look at my visualization",
"error": {
"type": "missing_references",
"references": [
@ -149,14 +324,45 @@ The API returns the following:
"type": "index-pattern",
"id": "my-pattern-*"
}
],
"blocking": [
]
},
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-search",
"type": "search",
"title": "Look at my search",
"error": {
"type": "missing_references",
"references": [
{
"type": "dashboard",
"id": "my-dashboard"
"type": "index-pattern",
"id": "another-pattern-*"
}
]
},
"meta": {
"icon": "searchApp",
"title": "Look at my search"
}
}
],
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
The result indicates an unsuccessful import because the visualization and search resulted in a missing references error.
Objects are created when the errors are resolved using the <<saved-objects-api-resolve-import-errors-example-2,Resolve import errors API>>.

View file

@ -4,7 +4,7 @@
<titleabbrev>Resolve import errors</titleabbrev>
++++
experimental[] Resolve errors from the import API.
experimental[] Resolve errors from the <<saved-objects-api-import,Import objects API>>.
To resolve errors, you can:
@ -25,7 +25,14 @@ To resolve errors, you can:
==== Path parameters
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
(Optional, string) An identifier for the <<xpack-spaces,space>>. When `space_id` is unspecfied in the URL, the default space is used.
[[saved-objects-api-resolve-import-errors-query-params]]
==== Query parameters
`createNewCopies`::
(Optional, boolean) Creates copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the
initial import, also enable when resolving import errors.
[[saved-objects-api-resolve-import-errors-request-body]]
==== Request body
@ -36,19 +43,47 @@ The request body must include the multipart/form-data type.
The same file given to the import API.
`retries`::
(array) A list of `type`, `id`, `replaceReferences`, and `overwrite` objects to retry. The property `replaceReferences` is a list of `type`, `from`, and `to` used to change the object references.
(Required, array) The retry operations, which can specify how to resolve different types of errors.
+
.Properties of `<retries>`
[%collapsible%open]
=====
`type`:::
(Required, string) The saved object type.
`id`:::
(Required, string) The saved object ID.
`overwrite`:::
(Optional, boolean) When set to `true`, the source object overwrites the conflicting destination object. When set to `false`, does
nothing.
`destinationId`:::
(Optional, string) Specifies the destination ID that the imported object should have, if different from the current ID.
`replaceReferences`:::
(Optional, array) A list of `type`, `from`, and `to` used to change the object references.
`ignoreMissingReferences`:::
(Optional, boolean) When set to `true`, ignores missing reference errors. When set to `false`, does nothing.
=====
[[saved-objects-api-resolve-import-errors-response-body]]
==== Response body
`success`::
Top-level property that indicates if the errors successfully resolved.
(boolean) Indicates a successful import. When set to `false`, some objects may not have been created. For additional information, refer to
the `errors` and `successResults` properties.
`successCount`::
Indicates the number of successfully resolved records.
(number) Indicates the number of successfully resolved records.
`errors`::
(array) Specifies the objects that failed to resolve.
(Optional, array) Specifies the objects that failed to resolve.
+
NOTE: One object can result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a
`conflict` error.
`successResults`::
(Optional, array) Indicates the objects that are successfully imported, with any metadata if applicable.
+
NOTE: Objects are only created when all resolvable errors are addressed, including conflict and missing references. To resolve errors, refer
to the <<saved-objects-api-resolve-import-errors-example, examples>>.
[[saved-objects-api-resolve-import-errors-codes]]
==== Response code
@ -59,36 +94,16 @@ The request body must include the multipart/form-data type.
[[saved-objects-api-resolve-import-errors-example]]
==== Examples
Retry a dashboard import:
[[saved-objects-api-resolve-import-errors-example-1]]
===== Resolve conflict errors
This example builds upon the <<saved-objects-api-import-example-3,Import objects API example with conflict errors>>.
Resolve conflict errors for an index pattern, visualization, and *Canvas* workpad by overwriting the existing saved objects:
[source,sh]
--------------------------------------------------
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"dashboard","id":"my-dashboard"}]'
--------------------------------------------------
// KIBANA
The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
--------------------------------------------------
The API returns the following:
[source,sh]
--------------------------------------------------
{
"success": true,
"successCount": 1
}
--------------------------------------------------
Resolve errors for a dashboard and overwrite the existing saved object:
[source,sh]
--------------------------------------------------
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"dashboard","id":"my-dashboard","overwrite":true}]'
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"index-pattern","id":"my-pattern","overwrite":true},{"type":"visualization","id":"my-vis","overwrite":true,"destinationId":"another-vis"},{"type":"canvas","id":"my-canvas","overwrite":true,"destinationId":"yet-another-canvas"},{"type":"dashboard","id":"my-dashboard"}]'
--------------------------------------------------
// KIBANA
@ -97,6 +112,8 @@ The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}}
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"}}
{"type":"canvas-workpad","id":"my-canvas","attributes":{"name":"Look at my canvas"}}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
--------------------------------------------------
@ -106,15 +123,62 @@ The API returns the following:
--------------------------------------------------
{
"success": true,
"successCount": 1
"successCount": 4,
"successResults": [
{
"id": "my-pattern",
"type": "index-pattern",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-vis",
"type": "visualization",
"destinationId": "another-vis",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"destinationId": "yet-another-canvas",
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
Resolve errors for a visualization by replacing the index pattern with another:
The result indicates a successful import, and all four objects were created.
TIP: If a prior import attempt resulted in resolvable errors, you must include a retry for each object you want to import, including any
that were returned in the `successResults` array. In this example, we retried importing the dashboard accordingly.
[[saved-objects-api-resolve-import-errors-example-2]]
===== Resolve missing reference errors
This example builds upon the <<saved-objects-api-import-example-4,Import objects API example with missing reference errors>>.
Resolve a missing reference error for a visualization by replacing the index pattern with another, and resolve a missing reference error for
a search by ignoring it:
[source,sh]
--------------------------------------------------
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"missing","to":"existing"}]}]'
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"my-pattern-*","to":"existing-pattern"}]},{"type":"search","id":"my-search","ignoreMissingReferences":true},{"type":"dashboard","id":"my-dashboard"}]'
--------------------------------------------------
// KIBANA
@ -122,7 +186,9 @@ The `file.ndjson` file contains the following:
[source,sh]
--------------------------------------------------
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"missing"}]}
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]}
{"type":"search","id":"my-search","attributes":{"title":"Look at my search"},"references":[{"name":"ref_0","type":"index-pattern","id":"another-pattern-*"}]}
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"}]}
--------------------------------------------------
The API returns the following:
@ -131,6 +197,37 @@ The API returns the following:
--------------------------------------------------
{
"success": true,
"successCount": 1
"successCount": 3,
"successResults": [
{
"id": "my-vis",
"type": "visualization",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-search",
"type": "search",
"meta": {
"icon": "searchApp",
"title": "Look at my search"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
--------------------------------------------------
The result indicates a successful import, and all three objects were created.
TIP: If a prior import attempt resulted in resolvable errors, you must include a retry for each object you want to import, including any
that were returned in the `successResults` array. In this example, we retried importing the dashboard accordingly.

View file

@ -24,7 +24,8 @@ You can request to overwrite any objects that already exist in the target space
==== {api-path-parms-title}
`space_id`::
(Optional, string) The ID of the space that contains the saved objects you want to copy. When `space_id` is unspecified in the URL, the default space is used.
(Optional, string) The ID of the space that contains the saved objects you want to copy. When `space_id` is unspecified in the URL, the
default space is used.
[role="child_attributes"]
[[spaces-api-copy-saved-objects-request-body]]
@ -47,10 +48,12 @@ You can request to overwrite any objects that already exist in the target space
=====
`includeReferences`::
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects will also be copied into the target spaces. The default value is `false`.
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects will also be copied into the target
spaces. The default value is `false`.
`overwrite`::
(Optional, boolean) When set to `true`, all conflicts are automatically overidden. When a saved object with a matching `type` and `id` exists in the target space, that version is replaced with the version from the source space. The default value is `false`.
(Optional, boolean) When set to `true`, all conflicts are automatically overidden. When a saved object with a matching `type` and `id`
exists in the target space, that version is replaced with the version from the source space. The default value is `false`.
[role="child_attributes"]
[[spaces-api-copy-saved-objects-response-body]]
@ -63,7 +66,8 @@ You can request to overwrite any objects that already exist in the target space
[%collapsible%open]
=====
`success`:::
(boolean) The copy operation was successful. When set to `false`, some objects may have been copied. For additional information, refer to the `successCount` and `errors` properties.
(boolean) The copy operation was successful. When set to `false`, some objects may have been copied. For additional information, refer
to the `errors` and `successResults` properties.
`successCount`:::
(number) The number of objects that successfully copied.
@ -71,6 +75,9 @@ You can request to overwrite any objects that already exist in the target space
`errors`:::
(Optional, array) The errors that occurred during the copy operation. When errors are reported, the `success` flag is set to `false`.
+
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a
`conflict` error.
+
.Properties of `errors`
[%collapsible%open]
======
@ -84,15 +91,159 @@ You can request to overwrite any objects that already exist in the target space
.Properties of `error`
[%collapsible%open]
=======
`type`:::::
(string) The type of error. For example, `unsupported_type`, `missing_references`, or `unknown`. Errors marked as `conflict` may be resolved by using the <<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects conflicts API>>.
`type`::::
(string) The type of error. For example, `conflict`, `ambiguous_conflict`, `missing_references`, `unsupported_type`, or `unknown`.
Errors marked as `conflict` or `ambiguous_conflict` may be resolved by using the <<spaces-api-resolve-copy-saved-objects-conflicts,
Resolve copy saved objects conflicts API>>.
`destinationId`::::
(Optional, string) The destination ID that was used during the copy attempt. This is only present on `conflict` error types.
`destinations`::::
(Optional, array) A list of possible object destinations with `id`, `title`, and `updatedAt` fields to describe each one. This is
only present on `ambiguous_conflict` error types.
=======
======
`successResults`:::
(Optional, array) Indicates successfully copied objects, with any applicable metadata.
+
NOTE: Objects are created when all resolvable errors are addressed, including conflict and missing references errors. For more information,
refer to the <<spaces-api-copy-saved-objects-example,examples>>.
=====
[[spaces-api-copy-saved-objects-example]]
==== {api-examples-title}
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` and `sales` spaces:
[[spaces-api-copy-saved-objects-example-1]]
===== Successful copy (with `createNewCopies` enabled)
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
[source,sh]
----
$ curl -X POST api/spaces/_copy_saved_objects
{
"objects": [{
"type": "dashboard",
"id": "my-dashboard"
}],
"spaces": ["marketing"],
"includeReferences": true,
"createNewcopies": true
}
----
// KIBANA
The API returns the following:
[source,sh]
----
{
"marketing": {
"success": true,
"successCount": 3,
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"destinationId": "1e127098-5b80-417f-b0f1-c60c8395358f",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
},
{
"id": "my-vis",
"type": "visualization",
"destinationId": "a610ed80-1c73-4507-9e13-d3af736c8e04",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-index-pattern",
"type": "index-pattern",
"destinationId": "bc3c9c70-bf6f-4bec-b4ce-f4189aa9e26b",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
}
]
}
}
----
The result indicates a successful copy, and all three objects are created. Since these objects were created as new copies, each entry in the
`successResults` array includes a `destinationId` attribute.
[[spaces-api-copy-saved-objects-example-2]]
===== Successful copy (with `createNewCopies` disabled)
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
[source,sh]
----
$ curl -X POST api/spaces/_copy_saved_objects
{
"objects": [{
"type": "dashboard",
"id": "my-dashboard"
}],
"spaces": ["marketing"],
"includeReferences": true
}
----
// KIBANA
The API returns the following:
[source,sh]
----
{
"marketing": {
"success": true,
"successCount": 3,
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
},
{
"id": "my-vis",
"type": "visualization",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-index-pattern",
"type": "index-pattern",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
}
]
}
}
----
The result indicates a successful copy, and all three objects are created.
[[spaces-api-copy-saved-objects-example-3]]
===== Failed copy (with conflict errors)
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` and `sales` spaces. In
this example, the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to an index
pattern:
[source,sh]
----
@ -115,35 +266,146 @@ The API returns the following:
{
"marketing": {
"success": true,
"successCount": 5
"successCount": 4,
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
},
{
"id": "my-vis",
"type": "visualization",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
},
{
"id": "my-index-pattern",
"type": "index-pattern",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
}
]
},
"sales": {
"success": false,
"successCount": 4,
"errors": [{
"id": "my-index-pattern",
"type": "index-pattern",
"error": {
"type": "conflict"
"successCount": 1,
"errors": [
{
"id": "my-pattern",
"type": "index-pattern",
"title": "my-pattern-*",
"error": {
"type": "conflict"
},
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-visualization",
"type": "my-vis",
"title": "Look at my visualization",
"error": {
"type": "conflict",
"destinationId": "another-vis"
},
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"title": "Look at my canvas",
"error": {
"type": "ambiguous_conflict",
"destinations": [
{
"id": "another-canvas",
"title": "Look at another canvas",
"updatedAt": "2020-07-08T16:36:32.377Z"
},
{
"id": "yet-another-canvas",
"title": "Look at yet another canvas",
"updatedAt": "2020-07-05T12:29:54.849Z"
}
]
},
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
}
}]
],
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
}
----
The `marketing` space succeeds, but the `sales` space fails due to a conflict in the index pattern.
The result indicates a successful copy for the `marketing` space, and an unsuccessful copy for the `sales` space because the index pattern,
visualization, and *Canvas* workpad each resulted in a conflict error:
Copy a visualization with the `my-viz` ID from the `marketing` space to the `default` space:
* An index pattern with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
or skip the object.
* A visualization with a different ID, but the same origin already exists, which resulted in a conflict error. The `destinationId` field
contains the `id` of the other visualization, which caused the conflict. The behavior is added to make sure that new objects that can be
shared between spaces behave in a similar way as legacy non-shareable objects. When a shareable object is copied into a new space, it
retains its origin so that the conflicts are encountered as expected. To resolve, overwrite the specified destination object, or skip the
object.
* Two *Canvas* workpads with different IDs, but the same origin, already exist, which resulted in a conflict error. The `destinations` array
describes the other workpads which caused the conflict. When a shareable object is copied into a new space, then shared to another space
where an object of the same origin exists, the conflict error occurs. To resolve, pick a destination object to overwrite, or skip the
object.
Objects are created when the error is resolved using the <<spaces-api-resolve-copy-saved-objects-conflicts-example-1,Resolve copy conflicts
API>>.
[[spaces-api-copy-saved-objects-example-4]]
===== Failed copy (with missing reference errors)
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to an index pattern:
[source,sh]
----
$ curl -X POST s/marketing/api/spaces/_copy_saved_objects
$ curl -X POST api/spaces/_copy_saved_objects
{
"objects": [{
"type": "visualization",
"id": "my-viz"
"type": "dashboard",
"id": "my-dashboard"
}],
"spaces": ["default"]
"spaces": ["marketing"],
"includeReferences": true
}
----
// KIBANA
@ -153,9 +415,52 @@ The API returns the following:
[source,sh]
----
{
"default": {
"success": true,
"successCount": 1
"marketing": {
"success": false,
"successCount": 2,
"errors": [
{
"id": "my-vis",
"type": "visualization",
"title": "Look at my visualization",
"error": {
"type": "missing_references",
"references": [
{
"type": "index-pattern",
"id": "my-pattern-*"
}
]
},
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
]
"successResults": [
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
}
],
}
}
----
The result indicates an unsuccessful copy because the visualization resulted in a missing references error.
Objects are created when the errors are resolved using the <<spaces-api-resolve-copy-saved-objects-conflicts-example-2,Resolve copy
conflicts API>>.

View file

@ -46,7 +46,8 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects are copied into the target spaces. The `includeReferences` must be the same values used during the failed <<spaces-api-copy-saved-objects, copy saved objects to space API>> operation. The default value is `false`.
`retries`::
(Required, object) The retry operations to attempt. Object keys represent the target space IDs.
(Required, object) The retry operations to attempt, which can specify how to resolve different types of errors. Object keys represent the
target space IDs.
+
.Properties of `retries`
[%collapsible%open]
@ -64,6 +65,10 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
(Required, string) The saved object ID.
`overwrite`::::
(Required, boolean) When set to `true`, the saved object from the source space (desigated by the <<spaces-api-resolve-copy-saved-objects-conflicts-path-params, `space_id` path parameter>>) overwrites the conflicting object in the destination space. When set to `false`, this does nothing.
`destinationId`::::
(Optional, string) Specifies the destination ID that the copied object should have, if different from the current ID.
`ignoreMissingReferences`:::
(Optional, boolean) When set to `true`, any missing references errors are ignored. When set to `false`, does nothing.
======
=====
@ -86,6 +91,9 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
`errors`:::
(Optional, array) The errors that occurred during the copy operation. When errors are reported, the `success` flag is set to `false`.
+
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a
`conflict` error.
+
.Properties of `errors`
[%collapsible%open]
@ -104,15 +112,32 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
[%collapsible%open]
=======
`type`::::
(string) The type of error. For example, `unsupported_type`, `missing_references`, or `unknown`.
(string) The type of error. For example, `conflict`, `ambiguous_conflict`, `missing_references`, `unsupported_type`, or `unknown`.
`destinationId`::::
(Optional, string) The destination ID that was used during the copy attempt. This is only present on `conflict` errors types.
`destinations`::::
(Optional, array) A list of possible object destinations with `id`, `title`, and `updatedAt` fields to describe each one. This is
only present on `ambiguous_conflict` error types.
=======
======
`successResults`:::
(Optional, array) Indicates successfully copied objects, with any applicable metadata.
+
NOTE: Objects are created when all resolvable errors are addressed, including conflict and missing references errors. For more information,
refer to the <<spaces-api-resolve-copy-saved-objects-conflicts-example,examples>>.
=====
[[spaces-api-resolve-copy-saved-objects-conflicts-example]]
==== {api-examples-title}
Overwrite an index pattern in the `marketing` space, and a visualization in the `sales` space:
[[spaces-api-resolve-copy-saved-objects-conflicts-example-1]]
===== Resolve conflict errors
This example builds upon the <<spaces-api-copy-saved-objects-example-3,Copy objects API example with conflict errors>>.
Resolve conflict errors for an index pattern, visualization, and *Canvas* workpad by overwriting the existing saved objects:
[source,sh]
----
@ -124,16 +149,119 @@ $ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
}],
"includeReferences": true,
"retries": {
"marketing": [{
"type": "index-pattern",
"id": "my-pattern",
"overwrite": true
}],
"sales": [{
"type": "visualization",
"id": "my-viz",
"overwrite": true
}]
"sales": [
{
"type": "index-pattern",
"id": "my-pattern",
"overwrite": true
},
{
"type": "visualization",
"id": "my-vis",
"overwrite": true,
"destinationId": "another-vis"
},
{
"type": "canvas",
"id": "my-canvas",
"overwrite": true,
"destinationId": "yet-another-canvas"
},
{
"type": "dashboard",
"id": "my-dashboard"
}
]
}
}
----
// KIBANA
The API returns the following:
[source,sh]
----
{
"sales": {
"success": true,
"successCount": 4,
"successResults": [
{
"id": "my-pattern",
"type": "index-pattern",
"meta": {
"icon": "indexPatternApp",
"title": "my-pattern-*"
}
},
{
"id": "my-vis",
"type": "visualization",
"destinationId": "another-vis",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"destinationId": "yet-another-canvas",
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
}
----
The result indicates a successful copy, and all four objects are created.
TIP: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that
were returned in the `successResults` array. In this example, we retried copying the dashboard accordingly.
[[spaces-api-resolve-copy-saved-objects-conflicts-example-2]]
===== Resolve missing reference errors
This example builds upon the <<spaces-api-copy-saved-objects-example-4,Copy objects API example with missing reference errors>>.
Resolve missing reference errors for a visualization by ignoring the error:
[source,sh]
----
$ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
{
"objects": [{
"type": "dashboard",
"id": "my-dashboard"
}],
"includeReferences": true,
"retries": {
"marketing": [
{
"type": "visualization",
"id": "my-vis",
"ignoreMissingReferences": true
},
{
"type": "canvas",
"id": "my-canvas"
},
{
"type": "dashboard",
"id": "my-dashboard"
}
]
}
}
----
@ -146,11 +274,38 @@ The API returns the following:
{
"marketing": {
"success": true,
"successCount": 1
},
"sales": {
"success": true,
"successCount": 1
"successCount": 3,
"successResults": [
{
"id": "my-vis",
"type": "visualization",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
}
},
{
"id": "my-canvas",
"type": "canvas-workpad",
"meta": {
"icon": "canvasApp",
"title": "Look at my canvas"
}
},
{
"id": "my-dashboard",
"type": "dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
}
}
]
}
}
----
The result indicates a successful copy and all three objects are created.
TIP: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that
were returned in the `successResults` array. In this example, we retried copying the dashboard and canvas accordingly.

View file

@ -61,10 +61,8 @@ For all APIs, you must use a request header. The {kib} APIs support the `kbn-xsr
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:
* The API endpoint uses the `GET` or `HEAD` operations
* The path is whitelisted using the <<settings, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the `server.xsrf.disableProtection` setting
* The path is whitelisted using the <<settings-xsrf-whitelist, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting
`Content-Type: application/json`::
Applicable only when you send a payload in the API request. {kib} API requests and responses use JSON.

View file

@ -40,8 +40,8 @@ users interacting with APM APIs must have <<apm-app-api-user,sufficient privileg
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:
* The API endpoint uses the `GET` or `HEAD` operations
* The path is whitelisted using the <<settings, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the `server.xsrf.disableProtection` setting
* The path is whitelisted using the <<settings-xsrf-whitelist, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting
`Content-Type: application/json`::
Applicable only when you send a payload in the API request.

View file

@ -84,7 +84,7 @@ Here are two examples:
| Allow the use of the the {beat_kib_app}
| Spaces
| `Read` or `All` on Dashboards, Visualize, and Discover
| `Read` or `All` on Dashboards and Discover
| Allow the user to view, edit, and create dashboards, as well as browse data.
|====

View file

@ -1,18 +0,0 @@
[role="xpack"]
[[errors-alerts-with-watcher]]
=== Error reports with Watcher
++++
<titleabbrev>Enable error reports</titleabbrev>
++++
You can use the power of the alerting features with Watcher to get reports on error occurrences.
The Watcher assistant, which is available on the errors overview, can help you set up a watch per service.
Configure the watch with an occurrences threshold, time interval, and the desired actions, such as email or Slack notifications.
With Watcher, your team can set up reports within minutes.
Watches are managed separately in the dedicated Watcher UI available in Advanced Settings.
[role="screenshot"]
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM app in Kibana]

View file

@ -8,7 +8,6 @@ Learn how to perform common APM app tasks.
* <<agent-configuration>>
* <<apm-alerts>>
* <<custom-links>>
* <<errors-alerts-with-watcher>>
* <<filters>>
* <<machine-learning-integration>>
* <<advanced-queries>>
@ -21,8 +20,6 @@ include::apm-alerts.asciidoc[]
include::custom-links.asciidoc[]
include::error-reports-watcher.asciidoc[]
include::filters.asciidoc[]
include::machine-learning.asciidoc[]

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View file

@ -1,36 +1,61 @@
[role="xpack"]
[[machine-learning-integration]]
=== integration
=== Machine learning integration
++++
<titleabbrev>Integrate with machine learning</titleabbrev>
++++
The Machine Learning integration initiates a new job predefined to calculate anomaly scores on APM transaction durations.
Jobs can be created per transaction type, and are based on the service's average response time.
The Machine learning integration initiates a new job predefined to calculate anomaly scores on APM transaction durations.
With this integration, you can quickly pinpoint anomalous transactions and see the health of
any upstream and downstream services.
Machine learning jobs are created per environment, and are based on a service's average response time.
Because jobs are created at the environment level,
you can add new services to your existing environments without the need for additional machine learning jobs.
After a machine learning job is created, results are shown in two places:
The transaction duration graph will show the expected bounds and add an annotation when the anomaly score is 75 or above.
* The transaction duration chart will show the expected bounds and add an annotation when the anomaly score is 75 or above.
+
[role="screenshot"]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in the APM app]
Service maps will display a color-coded anomaly indicator based on the detected anomaly score.
* Service maps will display a color-coded anomaly indicator based on the detected anomaly score.
+
[role="screenshot"]
image::apm/images/apm-service-map-anomaly.png[Example view of anomaly scores on service maps in the APM app]
[float]
[[create-ml-integration]]
=== Create a new machine learning job
=== Enable anomaly detection
To enable machine learning anomaly detection, first choose a service to monitor.
Then, select **Integrations** > **Enable ML anomaly detection** and click **Create job**.
To enable machine learning anomaly detection:
. From the Services overview, Traces overview, or Service Map tab,
select **Anomaly detection**.
. Click **Create ML Job**.
. Machine learning jobs are created at the environment level.
Select all of the service environments that you want to enable anomaly detection in.
Anomalies will surface for all services and transaction types within the selected environments.
. Click **Create Jobs**.
That's it! After a few minutes, the job will begin calculating results;
it might take additional time for results to appear on your graph.
Jobs can be managed in *Machine Learning jobs management*.
it might take additional time for results to appear on your service maps.
Existing jobs can be managed in *Machine Learning jobs management*.
APM specific anomaly detection wizards are also available for certain Agents.
See the machine learning {ml-docs}/ootb-ml-jobs-apm.html[APM anomaly detection configurations] for more information.
[float]
[[warning-ml-integration]]
=== Anomaly detection warning
To make machine learning as easy as possible to set up,
the APM app will warn you when filtered to an environment without a machine learning job.
[role="screenshot"]
image::apm/images/apm-anomaly-alert.png[Example view of anomaly alert in the APM app]

View file

@ -2,11 +2,6 @@
[[service-maps]]
=== Service maps
beta::[]
WARNING: Service map support for Internet Explorer 11 is extremely limited.
Please use Chrome or Firefox if available.
A service map is a real-time visual representation of the instrumented services in your application's architecture.
It shows you how these services are connected, along with high-level metrics like average transaction duration,
requests per minute, and errors per minute.

View file

@ -49,7 +49,7 @@ GET /_template/apm-{version}
*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 the template manually].
{apm-server-ref}/apm-server-template.html[load the template manually].
*Using a custom index names*
This problem can also occur if you've customized the index name that you write APM data to.

View file

@ -0,0 +1,136 @@
[role="xpack"]
[[edit-workpads]]
== Edit workpads
To create the look and feel that you want, apply format settings to the entire workpad, or individual elements.
[float]
[[create-variables]]
=== Create variables
When you frequently use copy and paste, create variables to easily reuse strings and patterns. For example, when you clone a large workpad and need to connect your elements to a new index, use variables to update
each element instead of updating them manually.
. Create the variables.
.. Click *Add a variable*.
.. Specify the variable options, then click *Save changes*.
. Apply the variable.
.. Copy the variable.
.. Select the element you want to change, then open the expression editor.
.. Paste the variable.
For example, to change the index pattern for a set of charts:
Specify the variable options.
[role="screenshot"]
image::images/specify_variable_syntax.png[Image describing how to specify the variable syntax]
Copy the variable, then apply it to each element you want to update in the *Expression editor*.
[role="screenshot"]
image::images/copy_variable_syntax.png[Image demonstrating expression editor]
[float]
[[apply-changes-to-the-entire-workpad]]
=== Apply changes to the entire workpad
With stylesheets, you can change the look of the entire workpad, including fonts, colors, layout, and more.
To get started, enter the changes you want to make in the *Global CSS overrides* text editor, then click *Apply stylesheet*.
For example, to change the background for the entire workpad, enter:
[source,text]
--------------------------------------------------
.canvasPage {
background-color: #3990e6;
}
--------------------------------------------------
[float]
[[change-the-element-settings]]
=== Change the element settings
Element settings enable you to change the display options at the element level. For example, use the element settings to change the dimensions, style, or location of an element.
[float]
[[change-the-display-options]]
==== Change the display options
Choose the display options for your elements. The options available depend on the element you select.
To change the element display options, click *Display*, then make your changes in the editor.
To use CSS overrides:
. Click *+* next to *Element style*, then select *CSS*.
. In the *CSS* text editor, enter the changes you want to make, then click *Apply stylesheet*.
For example, to center an element, enter:
[source,text]
--------------------------------------------------
.canvasRenderEl h1 {
text.align: center;
}
--------------------------------------------------
[float]
[[clone-elements]]
==== Clone elements
To use an element with the same functionality and appearance in multiple places, clone the element.
Select the element, then click *Edit > Clone*.
[role="screenshot"]
image::images/clone_element.gif[Image showing how to clone elements]
[float]
[[move-and-resize-elements]]
==== Move and resize elements
Canvas provides you with many options to move and resize the elements on your workpad.
* To move elements, click and hold the element, then drag to the new location.
* To move elements by 1 pixel, select the element, press and hold Shift, then use your arrow keys.
* To move elements by 10 pixels, select the element, then use your arrow keys.
* To resize elements, click and drag the resize handles to the new dimensions.
[float]
[[edit-elements]]
==== Edit elements
The element editing options allow you to arrange and organize the elements on your workpad page.
To align two or more elements:
. Press and hold Shift, then select the elements you want to align.
. Click *Edit > Alignment*, then select the alignment option.
To distribute three or more elements:
. Press and hold Shift, then select the elements you want to distribute.
. Click *Edit > Distribution*, then select the distribution option.
To reorder elements:
. Select the element you want to reorder.
. Click *Edit > Order*, then select the order option.
[float]
[[delete-elements]]
==== Delete elements
When you no longer need an element, delete it from your workpad.
. Select the element you want to delete.
. Click *Edit > Delete*.

View file

@ -44,7 +44,7 @@ image::images/canvas-map-embed.gif[]
. To use the customization options, click the panel menu, then select one of the following options:
* *Edit map* &mdash; Opens <<maps,Maps>> or <<visualize,Visualize>> so that you can edit the original saved object.
* *Edit map* &mdash; Opens <<maps,Maps>> or <<create-panels,Dashboard>> so that you can edit the original saved object.
* *Edit panel title* &mdash; Adds a title to the saved object.

View file

@ -30,7 +30,7 @@ The filtered <<demodata_fn, demo data>> becomes the _context_ of the next functi
Lets look at another expression, which uses the same <<demodata_fn, demodata>> function, but instead produces a pie chart.
image::images/canvas-functions-can-take-arguments-pie-chart.png[Pie Chart, height=400]
image::images/canvas-functions-can-take-arguments-pie-chart.png[Pie chart showing output of demodata function]
[source,text]
----
filters
@ -47,7 +47,7 @@ If the expression stopped there, it would produce a `pointseries` data type as t
The end result is a simple pie chart that uses the default color palette, but the <<pie_fn, pie>> function can take additional arguments that control how it gets rendered. For example, you can provide a `hole` argument to turn your pie chart into a donut chart by changing the expression to:
image::images/canvas-functions-can-take-arguments-donut-chart.png[Donut Chart, height=400]
image::images/canvas-functions-can-take-arguments-donut-chart.png[Alternative output as donut chart]
[source,text]
----
filters
@ -83,7 +83,7 @@ You can substitute one function for another to change the output. For example, y
Lets change that last pie chart into a bubble chart by replacing the <<pie_fn, pie>> function with the <<plot_fn, plot>> function. This is possible because both functions can accept a `pointseries` data type as their _context_. Switching the functions will work, but it wont produce a useful visualization on its own since you dont have the x-axis and y-axis defined. You will also need to modify the <<pointseries_fn, pointseries>> function to change its output. In this case, you can change the `size` argument to `y`, so the maximum price values are plotted on the y-axis, and add an `x` argument using the `@timestamp` field in the data to plot those values over time. This leaves you with the following expression and produces a bubble chart showing the max price of each state over time:
image::images/canvas-change-your-expression-chart.png[Bubble Chart, height=400]
image::images/canvas-change-your-expression-chart.png[Bubble Chart, with price along x axis, and time along y axis]
[source,text]
----
filters
@ -95,7 +95,7 @@ filters
Similar to the <<pie_fn, pie>> function, the <<plot_fn, plot>> function takes arguments that control the design elements of the visualization. As one example, passing a `legend` argument with a value of `false` to the function will hide the legend on the chart.
image::images/canvas-change-your-expression-chart-no-legend.png[Bubble Chart Without Legend, height=400]
image::images/canvas-change-your-expression-chart-no-legend.png[Bubble Chart Without Legend]
[source,text,subs=+quotes]
----
filters

View file

@ -13,7 +13,7 @@ A *** denotes a required argument.
A † denotes an argument can be passed multiple times.
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | V | W | X | Y | Z
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | <<v_fns>> | W | X | Y | Z
[float]
[[a_fns]]
@ -897,7 +897,7 @@ Default: `"-_index:.kibana"`
|`string`
|An index or index pattern. For example, `"logstash-*"`.
Default: `_all`
Default: `"_all"`
|===
*Returns:* `number`
@ -965,7 +965,7 @@ Default: `1000`
|`string`
|An index or index pattern. For example, `"logstash-*"`.
Default: `_all`
Default: `"_all"`
|`metaFields`
|`string`
@ -1026,7 +1026,7 @@ Alias: `tz`
|`string`
|The timezone to use for date operations. Valid ISO8601 formats and UTC offsets both work.
Default: `UTC`
Default: `"UTC"`
|===
*Returns:* `datatable`
@ -1238,7 +1238,7 @@ filters
|`string`
|The horizontal text alignment.
Default: `left`
Default: `"left"`
|`color`
|`string`
@ -1280,7 +1280,7 @@ Default: `false`
|`string`
|The font weight. For example, `"normal"`, `"bold"`, `"bolder"`, `"lighter"`, `"100"`, `"200"`, `"300"`, `"400"`, `"500"`, `"600"`, `"700"`, `"800"`, or `"900"`.
Default: `normal`
Default: `"normal"`
|===
*Returns:* `style`
@ -2469,7 +2469,7 @@ Alias: `shape`
|`string`
|Pick a shape.
Default: `square`
Default: `"square"`
|`border`
@ -2732,7 +2732,7 @@ Aliases: `c`, `field`
|`string`
|The column or field that you want to filter.
Default: `@timestamp`
Default: `"@timestamp"`
|`compact`
|`boolean`
@ -2871,3 +2871,56 @@ Default: `""`
|===
*Returns:* `string`
[float]
[[v_fns]]
== V
[float]
[[var_fn]]
=== `var`
Updates the Kibana global context.
*Accepts:* `any`
[cols="3*^<"]
|===
|Argument |Type |Description
|_Unnamed_ ***
Alias: `name`
|`string`
|Specify the name of the variable.
|===
*Returns:* Depends on your input and arguments
[float]
[[var_set_fn]]
=== `var_set`
Updates the Kibana global context.
*Accepts:* `any`
[cols="3*^<"]
|===
|Argument |Type |Description
|_Unnamed_ ***
Alias: `name`
|`string`
|Specify the name of the variable.
|`value`
Alias: `val`
|`any`
|Specify the value for the variable. When unspecified, the input context is used.
|===
*Returns:* Depends on your input and arguments

View file

@ -1,6 +1,6 @@
[role="xpack"]
[[canvas-present-workpad]]
=== Present your workpad
== Present your workpad
When you are ready to present your workpad, use and enable the presentation options.
@ -18,6 +18,34 @@ image::images/canvas-autoplay-interval.png[Element autoplay interval]
. To start your presentation, click *View > Enter fullscreen mode*.
+
[role="screenshot"]
image::images/canvas-fullscreen.png[Fullscreen mode]
image::images/canvas-fullscreen.png[Image showing how to enter fullscreen mode from view dropdown]
. When you are ready to exit fullscreen mode, press the Esc (Escape) key.
[float]
[[zoom-in-out]]
=== Use the zoom options
To get a closer look at a portion of your workpad, use the zoom options.
. Click *View > Zoom*.
. Select the zoom option.
+
[role="screenshot"]
image::images/canvas-zoom-controls.png[Zoom controls, also in view dropdown]
[float]
[[configure-auto-refresh-interval]]
=== Change the auto-refresh interval
Change how often the data refreshes on your workpad.
. Click *View > Auto refresh settings*.
. Select the interval you want to use, or *Set a custom interval*.
+
[role="screenshot"]
image::images/canvas-refresh-interval.png[Element data refresh interval]
+
To manually refresh the data, click image:canvas/images/canvas-refresh-data.png[].

View file

@ -1,51 +1,51 @@
[role="xpack"]
[[workpad-share-options]]
=== Share your workpad
== Share your workpad
When you've finished your workpad, you can share it outside of {kib}.
[float]
[[export-single-workpad]]
==== Export workpads
=== Export workpads
Create a JSON file of your workpad that you can export outside of {kib}.
Click *Share > Download as JSON*.
[role="screenshot"]
image::images/canvas-export-workpad.png[Export single workpad]
image::images/canvas-export-workpad.png[Export single workpad through JSON, from Share dropdown]
Want to export multiple workpads? Go to the *Canvas* home page, select the workpads you want to export, then click *Export*.
[float]
[[create-workpad-pdf]]
==== Create a PDF
=== Create a PDF
If you have a license that supports the {report-features}, you can create a PDF copy of your workpad that you can save and share outside {kib}.
If you have a subscription that supports the {report-features}, you can create a PDF copy of your workpad that you can save and share outside {kib}.
Click *Share > PDF reports > Generate PDF*.
[role="screenshot"]
image::images/canvas-generate-pdf.gif[Generate PDF]
image::images/canvas-generate-pdf.gif[Image showing how to generate a PDF]
For more information, refer to <<reporting-getting-started, Reporting from Kibana>>.
[float]
[[create-workpad-URL]]
==== Create a POST URL
=== Create a POST URL
If you have a license that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using Watcher or a script.
If you have a subscription that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using <<watcher-ui,Watcher>> or a script.
Click *Share > PDF reports > Copy POST URL*.
[role="screenshot"]
image::images/canvas-create-URL.gif[Create POST URL]
image::images/canvas-create-URL.gif[Image showing how to create POST URL]
For more information, refer to <<automating-report-generation, Automating report generation>>.
[float]
[[add-workpad-website]]
==== Share the workpad on a website
=== Share the workpad on a website
beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.
@ -58,7 +58,7 @@ beta[] Canvas allows you to create _shareables_, which are workpads that you dow
To make sure that your data remains secure, the data in the JSON file is not connected to {kib}. Canvas does not display elements that manipulate the data on the workpad.
+
[role="screenshot"]
image::canvas/images/canvas-embed_workpad.gif[Share the workpad on a website]
image::canvas/images/canvas-embed_workpad.gif[Image showing how to share the workpad on a website]
+
NOTE: Shareable workpads encode the current state of the workpad in a JSON file. When you make changes to the workpad, the changes do not appear in the shareable workpad on your website.

View file

@ -492,37 +492,6 @@ find the mean by index.
|one or more numbers or arrays of numbers
|===
*Returns*: `number` | `Array.<number>`. The maximum value of all numbers if
`args` contains only numbers. Returns an array with the the maximum values at each
index, including all scalar numbers in `args` in the calculation at each index if
`args` contains at least one array.
*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths
*Example*
[source, js]
------------
max(1, 2, 3) // returns 3
max([10, 20, 30, 40], 15) // returns [15, 20, 30, 40]
max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9]
------------
[float]
=== mean( ...args )
Finds the mean value of one of more numbers/arrays of numbers passed into the function.
If at least one array of numbers is passed into the function, the function will
find the mean by index.
[cols="3*^<"]
|===
|Param |Type |Description
|...args
|number \| Array.<number>
|one or more numbers or arrays of numbers
|===
*Returns*: `number` | `Array.<number>`. The mean value of all numbers if `args`
contains only numbers. Returns an array with the the mean values of each index,
including all scalar numbers in `args` in the calculation at each index if `args`

View file

@ -1,8 +1,8 @@
[role="xpack"]
[[canvas-tutorial]]
== Canvas tutorial
== Tutorial: Create a workpad for monitoring sales
To get up and running with Canvas, use the following tutorial where you'll create a display for monitoring sales at an eCommerce store.
To get up and running with Canvas, use the following tutorial where you'll create a workpad for monitoring sales at an eCommerce store.
[float]
=== Before you begin
@ -30,7 +30,7 @@ The default Elastic logo image appears on the page.
. To replace the Elastic logo with your own image, select the image, then use the editor.
[role="screenshot"]
image::images/canvas-image-element.png[]
image::images/canvas-image-element.png[Image showing how to add the image element]
[float]
=== Customize your data with metrics
@ -70,7 +70,7 @@ You're now looking at the raw data syntax that Canvas uses to display the elemen
.. Click *Run*.
[role="screenshot"]
image::images/canvas-metric-element.png[]
image::images/canvas-metric-element.png[Image showing changes to the Canvas workpad]
[float]
=== Show off your data with charts
@ -96,7 +96,7 @@ To show what your data can do, add charts, graphs, progress monitors, and more t
.. From the *Y-axis* drop-down lists, select *Value*, then select *taxless_total_price*.
[role="screenshot"]
image::images/canvas-chart-element.png[]
image::images/canvas-chart-element.png[Image showing Canvas workpad with sample data graph]
[float]
=== Show how your data changes over time
@ -110,7 +110,7 @@ To focus your data on a specific time range, add the time filter.
. To use the date time field from the sample data, enter `order_date` in the *Column* field, then click *Set*.
[role="screenshot"]
image::images/canvas-timefilter-element.png[]
image::images/canvas-timefilter-element.png[Image showing Canvas workpad with filtered sample data graph]
To see how the data changes, set the time filter to *Last 7 days*. As you change the time filter options, the elements automatically update.
@ -124,7 +124,7 @@ Here are some things to try:
* Play with the {kibana-ref}/add-sample-data.html[sample Canvas workpads].
* Build presentations of your own live data with <<create-canvas-workpad,workpads>>.
* Build presentations of your own live data with <<create-workpads,workpads>>.
* Learn more about <<add-canvas-elements,elements>> &mdash; the building blocks of your workpad.

View file

@ -1,140 +0,0 @@
[role="xpack"]
[[create-canvas-workpad]]
== Create a workpad
A Canvas _workpad_ provides you with a workspace where you can build presentations of your live data.
To create a workpad, choose one of the following options:
* <<blank-canvas-workpad,Build fully customizable presentations of your own data>>
* <<canvas-template-workpad,Choose from a set of preconfigured workpad templates>>
* <<sample-data-workpad,Gather inspiration from the {kib} sample data workpads>>
* <<import-canvas-workpad,Import a workpad that someone else has already started>>
[float]
[[blank-canvas-workpad]]
=== Start with a blank workpad
To use the background colors, images, and data of your choice, start with a blank workpad.
. Open the menu, then go to *Canvas*.
. On the *Canvas workpads* view, click *Create workpad*.
. Add a *Name* to your workpad.
. In the *Width* and *Height* fields, specify the size.
. Select the layout.
+
For example, click *720p* for a traditional presentation layout.
. Click the *Background color* picker, then select the background color for your workpad.
+
[role="screenshot"]
image::images/canvas-background-color-picker.png[Canvas color picker]
[float]
[[canvas-template-workpad]]
=== Create a workpad from a template
If you're unsure about where to start, you can use one of the preconfigured templates that come with Canvas.
. Open the menu, then go to *Canvas*.
. On the *Canvas workpads* view, select *Templates*.
. Click the preconfigured template that you want to use.
. Add your own *Name* to the workpad.
[float]
[[import-canvas-workpad]]
=== Import an existing workpad
When you want to use a workpad that someone else has already started, import the JSON file into Canvas.
. Open the menu, then go to *Canvas*.
. On the *Canvas workpads* view, click and drag the file to the *Import workpad JSON file* field.
[float]
[[sample-data-workpad]]
=== Use a sample data workpad
Each of the sample data sets comes with a Canvas workpad that you can use for your own workpad inspiration.
. Add a {kibana-ref}/add-sample-data.html[sample data set].
. On the *Add Data* page, click *View data*, then select *Canvas*.
[float]
[[apply-workpad-styles]]
=== Apply a set of styles to the entire workpad
To make your workpad look exactly the way you want, use the editor to apply CSS overrides.
. Expand *Global CSS overrides*.
. Enter the CSS.
+
For example, to change the background on every page, enter:
+
[source,text]
--------------------------------------------------
.canvasPage {
background-color: #3990e6;
}
--------------------------------------------------
. Click *Apply stylesheet*.
[float]
[[configure-auto-refresh-interval]]
=== Change the auto-refresh interval
Change how often the data refreshes on your workpad.
. Click *View > Auto refresh settings*.
. Select the interval you want to use, or *Set a custom interval*.
+
[role="screenshot"]
image::images/canvas-refresh-interval.png[Element data refresh interval]
+
To manually refresh the data, click image:canvas/images/canvas-refresh-data.png[].
[float]
[[zoom-in-out]]
=== Use the zoom options
To get a closer look at a portion of your workpad, use the zoom options.
. Click *View > Zoom*.
. Select the zoom option.
+
[role="screenshot"]
image::images/canvas-zoom-controls.png[Zoom controls]
[float]
[[add-more-pages]]
=== Add pages
Organize your ideas onto separate pages by adding more pages.
. Click *Page 1*, then click *+*.
. On the *Page* editor panel, select the page transition from the *Transition* dropdown.
+
[role="screenshot"]
image::images/canvas-add-pages.gif[Add pages]
include::{kib-repo-dir}/canvas/canvas-elements.asciidoc[]
include::{kib-repo-dir}/canvas/canvas-present-workpad.asciidoc[]
include::{kib-repo-dir}/canvas/canvas-share-workpad.asciidoc[]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -7,11 +7,11 @@ You can set this explicitly using `server.basePath` in <<settings>>.
Use the server.rewriteBasePath setting to tell {kib} if it should remove the basePath from requests it receives, and to prevent a deprecation warning at startup. This setting cannot end in a slash (/).
If you want to turn off the basepath when in development mode, start {kib} with the `--no-basepath` flag
If you want to turn off the basepath when in development mode, start {kib} with the `--no-base-path` flag
[source,bash]
----
yarn start --no-basepath
yarn start --no-base-path
----

View file

@ -58,9 +58,9 @@ The Charts plugin is a way to create easier integration of shared colors, themes
WARNING: Missing README.
- {kib-repo}blob/{branch}/src/plugins/dashboard[dashboard]
- {kib-repo}blob/{branch}/src/plugins/dashboard/README.md[dashboard]
WARNING: Missing README.
Contains the dashboard application.
- {kib-repo}blob/{branch}/src/plugins/data/README.md[data]
@ -76,9 +76,9 @@ Routing will be handled by the id of the dev tool - your dev tool will be mounte
This API doesn't support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element.
- {kib-repo}blob/{branch}/src/plugins/discover[discover]
- {kib-repo}blob/{branch}/src/plugins/discover/README.md[discover]
WARNING: Missing README.
Contains the Discover application and the saved search embeddable.
- {kib-repo}blob/{branch}/src/plugins/embeddable/README.md[embeddable]
@ -86,9 +86,9 @@ WARNING: Missing README.
Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable containers.
- {kib-repo}blob/{branch}/src/plugins/es_ui_shared[esUiShared]
- {kib-repo}blob/{branch}/src/plugins/es_ui_shared/README.md[esUiShared]
WARNING: Missing README.
This plugin contains reusable code in the form of self-contained modules (or libraries). Each of these modules exports a set of functionality relevant to the domain of the module.
- {kib-repo}blob/{branch}/src/plugins/expressions/README.md[expressions]
@ -109,9 +109,9 @@ Moves the legacy ui/registry/feature_catalogue module for registering "features"
WARNING: Missing README.
- {kib-repo}blob/{branch}/src/plugins/input_control_vis[inputControlVis]
- {kib-repo}blob/{branch}/src/plugins/input_control_vis/README.md[inputControlVis]
WARNING: Missing README.
Contains the input control visualization allowing to place custom filter controls on a dashboard.
- {kib-repo}blob/{branch}/src/plugins/inspector/README.md[inspector]
@ -206,9 +206,10 @@ This plugin adds the Advanced Settings section for the Usage Data collection (ak
WARNING: Missing README.
- {kib-repo}blob/{branch}/src/plugins/timelion[timelion]
- {kib-repo}blob/{branch}/src/plugins/timelion/README.md[timelion]
WARNING: Missing README.
Contains the deprecated timelion application. For the timelion visualization,
which also contains the timelion APIs and backend, look at the vis_type_timelion plugin.
- {kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions]
@ -222,59 +223,63 @@ Usage Collection allows collecting usage data for other services to consume (tel
To integrate with the telemetry services for usage collection of your feature, there are 2 steps:
- {kib-repo}blob/{branch}/src/plugins/vis_type_markdown[visTypeMarkdown]
- {kib-repo}blob/{branch}/src/plugins/vis_type_markdown/README.md[visTypeMarkdown]
WARNING: Missing README.
The markdown visualization that can be used to place text panels on dashboards.
- {kib-repo}blob/{branch}/src/plugins/vis_type_metric[visTypeMetric]
- {kib-repo}blob/{branch}/src/plugins/vis_type_metric/README.md[visTypeMetric]
WARNING: Missing README.
Contains the metric visualization.
- {kib-repo}blob/{branch}/src/plugins/vis_type_table[visTypeTable]
- {kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable]
WARNING: Missing README.
Contains the data table visualization, that allows presenting data in a simple table format.
- {kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud[visTypeTagcloud]
- {kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud/README.md[visTypeTagcloud]
WARNING: Missing README.
Contains the tagcloud visualization.
- {kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion]
If your grammar was changed in public/chain.peg you need to re-generate the static parser. You could use a grunt task:
Contains the timelion visualization and the timelion backend.
- {kib-repo}blob/{branch}/src/plugins/vis_type_timeseries[visTypeTimeseries]
- {kib-repo}blob/{branch}/src/plugins/vis_type_timeseries/README.md[visTypeTimeseries]
WARNING: Missing README.
Contains everything around TSVB (the editor, visualizatin implementations and backends).
- {kib-repo}blob/{branch}/src/plugins/vis_type_vega[visTypeVega]
- {kib-repo}blob/{branch}/src/plugins/vis_type_vega/README.md[visTypeVega]
WARNING: Missing README.
Contains the Vega visualization.
- {kib-repo}blob/{branch}/src/plugins/vis_type_vislib[visTypeVislib]
- {kib-repo}blob/{branch}/src/plugins/vis_type_vislib/README.md[visTypeVislib]
WARNING: Missing README.
Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and
heatmap charts.
- {kib-repo}blob/{branch}/src/plugins/vis_type_xy[visTypeXy]
- {kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy]
WARNING: Missing README.
Contains the new xy-axis chart using the elastic-charts library, which will eventually
replace the vislib xy-axis (bar, area, line) charts.
- {kib-repo}blob/{branch}/src/plugins/visualizations[visualizations]
- {kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations]
WARNING: Missing README.
Contains most of the visualization infrastructure, e.g. the visualization type registry or the
visualization embeddable.
- {kib-repo}blob/{branch}/src/plugins/visualize[visualize]
- {kib-repo}blob/{branch}/src/plugins/visualize/README.md[visualize]
WARNING: Missing README.
Contains the visualize application which includes the listing page and the app frame,
which will load the visualization's editor.
[discrete]
@ -308,9 +313,10 @@ To access an elasticsearch instance that has live data you have two options:
WARNING: Missing README.
- {kib-repo}blob/{branch}/x-pack/plugins/beats_management[beats_management]
- {kib-repo}blob/{branch}/x-pack/plugins/beats_management/readme.md[beatsManagement]
WARNING: Missing README.
Notes:
Failure to have auth enabled in Kibana will make for a broken UI. UI-based errors not yet in place
- {kib-repo}blob/{branch}/x-pack/plugins/canvas/README.md[canvas]
@ -345,9 +351,12 @@ You can run a local cluster and simulate a remote cluster within a single Kibana
- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_enhanced/README.md[dashboardEnhanced]
- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode[dashboardMode]
Contains the enhancements to the OSS dashboard app.
WARNING: Missing README.
- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode/README.md[dashboardMode]
The deprecated dashboard only mode.
- {kib-repo}blob/{branch}/x-pack/plugins/data_enhanced[dataEnhanced]
@ -355,9 +364,9 @@ WARNING: Missing README.
WARNING: Missing README.
- {kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced[discoverEnhanced]
- {kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced]
WARNING: Missing README.
Contains the enhancements to the OSS discover app.
- {kib-repo}blob/{branch}/x-pack/plugins/embeddable_enhanced[embeddableEnhanced]
@ -399,6 +408,11 @@ The GlobalSearch plugin provides an easy way to search for various objects, such
or dashboards from the Kibana instance, from both server and client-side plugins
- {kib-repo}blob/{branch}/x-pack/plugins/global_search_bar/README.md[globalSearchBar]
The GlobalSearchBar plugin provides a search interface for navigating Kibana. (It is the UI to the GlobalSearch plugin.)
- {kib-repo}blob/{branch}/x-pack/plugins/global_search_providers[globalSearchProviders]
WARNING: Missing README.

View file

@ -0,0 +1,311 @@
[[development-plugin-saved-objects]]
== Using Saved Objects
Saved Objects allow {kib} plugins to use {es} like a primary
database. Think of it as an Object Document Mapper for {es}. Once a
plugin has registered one or more Saved Object types, the Saved Objects client
can be used to query or perform create, read, update and delete operations on
each type.
By using Saved Objects your plugin can take advantage of the following
features:
* Migrations can evolve your document's schema by transforming documents and
ensuring that the field mappings on the index are always up to date.
* a <<saved-objects-api,HTTP API>> is automatically exposed for each type (unless
`hidden=true` is specified).
* a Saved Objects client that can be used from both the server and the browser.
* Users can import or export Saved Objects using the Saved Objects management
UI or the Saved Objects import/export API.
* By declaring `references`, an object's entire reference graph will be
exported. This makes it easy for users to export e.g. a `dashboard` object and
have all the `visualization` objects required to display the dashboard
included in the export.
* When the X-Pack security and spaces plugins are enabled these transparently
provide RBAC access control and the ability to organize Saved Objects into
spaces.
This document contains developer guidelines and best-practices for plugins
wanting to use Saved Objects.
=== Registering a Saved Object type
Saved object type definitions should be defined in their own `my_plugin/server/saved_objects` directory.
The folder should contain a file per type, named after the snake_case name of the type, and an `index.ts` file exporting all the types.
.src/plugins/my_plugin/server/saved_objects/dashboard_visualization.ts
[source,typescript]
----
import { SavedObjectsType } from 'src/core/server';
export const dashboardVisualization: SavedObjectsType = {
name: 'dashboard_visualization', // <1>
hidden: false,
namespaceType: 'single',
mappings: {
dynamic: false,
properties: {
description: {
type: 'text',
},
hits: {
type: 'integer',
},
},
},
migrations: {
'1.0.0': migratedashboardVisualizationToV1,
'2.0.0': migratedashboardVisualizationToV2,
},
};
----
<1> Since the name of a Saved Object type forms part of the url path for the
public Saved Objects HTTP API, these should follow our API URL path convention
and always be written as snake case.
.src/plugins/my_plugin/server/saved_objects/index.ts
[source,typescript]
----
export { dashboardVisualization } from './dashboard_visualization';
export { dashboard } from './dashboard';
----
.src/plugins/my_plugin/server/plugin.ts
[source,typescript]
----
import { dashboard, dashboardVisualization } from './saved_objects';
export class MyPlugin implements Plugin {
setup({ savedObjects }) {
savedObjects.registerType(dashboard);
savedObjects.registerType(dashboardVisualization);
}
}
----
=== Mappings
Each Saved Object type can define it's own {es} field mappings.
Because multiple Saved Object types can share the same index, mappings defined
by a type will be nested under a top-level field that matches the type name.
For example, the mappings defined by the `dashboard_visualization` Saved
Object type:
.src/plugins/my_plugin/server/saved_objects/dashboard_visualization.ts
[source,typescript]
----
import { SavedObjectsType } from 'src/core/server';
export const dashboardVisualization: SavedObjectsType = {
name: 'dashboard_visualization',
...
mappings: {
properties: {
dynamic: false,
description: {
type: 'text',
},
hits: {
type: 'integer',
},
},
},
migrations: { ... },
};
----
Will result in the following mappings being applied to the `.kibana` index:
[source,json]
----
{
"mappings": {
"dynamic": "strict",
"properties": {
...
"dashboard_vizualization": {
"dynamic": false,
"properties": {
"description": {
"type": "text",
},
"hits": {
"type": "integer",
},
},
}
}
}
}
----
Do not use field mappings like you would use data types for the columns of a
SQL database. Instead, field mappings are analogous to a SQL index. Only
specify field mappings for the fields you wish to search on or query. By
specifying `dynamic: false` in any level of your mappings, {es} will
accept and store any other fields even if they are not specified in your mappings.
Since {es} has a default limit of 1000 fields per index, plugins
should carefully consider the fields they add to the mappings. Similarly,
Saved Object types should never use `dynamic: true` as this can cause an
arbitrary amount of fields to be added to the `.kibana` index.
=== References
When a Saved Object declares `references` to other Saved Objects, the
Saved Objects Export API will automatically export the target object with all
of it's references. This makes it easy for users to export the entire
reference graph of an object.
If a Saved Object can't be used on it's own, that is, it needs other objects
to exist for a feature to function correctly, that Saved Object should declare
references to all the objects it requires. For example, a `dashboard`
object might have panels for several `visualization` objects. When these
`visualization` objects don't exist, the dashboard cannot be rendered
correctly. The `dashboard` object should declare references to all it's
visualizations.
However, `visualization` objects can continue to be rendered or embedded into
other dashboards even if the `dashboard` it was originally embedded into
doesn't exist. As a result, `visualization` objects should not declare
references to `dashboard` objects.
For each referenced object, an `id`, `type` and `name` are added to the
`references` array:
[source, typescript]
----
router.get(
{ path: '/some-path', validate: false },
async (context, req, res) => {
const object = await context.core.savedObjects.client.create(
'dashboard',
{
title: 'my dashboard',
panels: [
{ visualization: 'vis1' }, // <1>
],
indexPattern: 'indexPattern1'
},
{ references: [
{ id: '...', type: 'visualization', name: 'vis1' },
{ id: '...', type: 'index_pattern', name: 'indexPattern1' },
]
}
)
...
}
);
----
<1> Note how `dashboard.panels[0].visualization` stores the `name` property of
the reference (not the `id` directly) to be able to uniquely identify this
reference. This guarantees that the id the reference points to always remains
up to date. If a visualization `id` was directly stored in
`dashboard.panels[0].visualization` there is a risk that this `id` gets
updated without updating the reference in the references array.
==== Writing Migrations
Saved Objects support schema changes between Kibana versions, which we call
migrations. Migrations are applied when a Kibana installation is upgraded from
one version to the next, when exports are imported via the Saved Objects
Management UI, or when a new object is created via the HTTP API.
Each Saved Object type may define migrations for its schema. Migrations are
specified by the Kibana version number, receive an input document, and must
return the fully migrated document to be persisted to Elasticsearch.
Let's say we want to define two migrations:
- In version 1.1.0, we want to drop the `subtitle` field and append it to the
title
- In version 1.4.0, we want to add a new `id` field to every panel with a newly
generated UUID.
First, the current `mappings` should always reflect the latest or "target"
schema. Next, we should define a migration function for each step in the schema
evolution:
src/plugins/my_plugin/server/saved_objects/dashboard_visualization.ts
[source,typescript]
----
import { SavedObjectsType, SavedObjectMigrationFn } from 'src/core/server';
import uuid from 'uuid';
interface DashboardVisualizationPre110 {
title: string;
subtitle: string;
panels: Array<{}>;
}
interface DashboardVisualization110 {
title: string;
panels: Array<{}>;
}
interface DashboardVisualization140 {
title: string;
panels: Array<{ id: string }>;
}
const migrateDashboardVisualization110: SavedObjectMigrationFn<
DashboardVisualizationPre110, // <1>
DashboardVisualization110
> = (doc) => {
const { subtitle, ...attributesWithoutSubtitle } = doc.attributes;
return {
...doc, // <2>
attributes: {
...attributesWithoutSubtitle,
title: `${doc.attributes.title} - ${doc.attributes.subtitle}`,
},
};
};
const migrateDashboardVisualization140: SavedObjectMigrationFn<
DashboardVisualization110,
DashboardVisualization140
> = (doc) => {
const outPanels = doc.attributes.panels?.map((panel) => {
return { ...panel, id: uuid.v4() };
});
return {
...doc,
attributes: {
...doc.attributes,
panels: outPanels,
},
};
};
export const dashboardVisualization: SavedObjectsType = {
name: 'dashboard_visualization', // <1>
/** ... */
migrations: {
// Takes a pre 1.1.0 doc, and converts it to 1.1.0
'1.1.0': migrateDashboardVisualization110,
// Takes a 1.1.0 doc, and converts it to 1.4.0
'1.4.0': migrateDashboardVisualization140, // <3>
},
};
----
<1> It is useful to define an interface for each version of the schema. This
allows TypeScript to ensure that you are properly handling the input and output
types correctly as the schema evolves.
<2> Returning a shallow copy is necessary to avoid type errors when using
different types for the input and output shape.
<3> Migrations do not have to be defined for every version. The version number
of a migration must always be the earliest Kibana version in which this
migration was released. So if you are creating a migration which will be
part of the v7.10.0 release, but will also be backported and released as
v7.9.3, the migration version should be: 7.9.3.
Migrations should be written defensively, an exception in a migration function
will prevent a Kibana upgrade from succeeding and will cause downtime for our
users. Having said that, if a document is encountered that is not in the
expected shape, migrations are encouraged to throw an exception to abort the
upgrade. In most scenarios, it is better to fail an upgrade than to silently
ignore a corrupt document which can cause unexpected behaviour at some future
point in time.
It is critical that you have extensive tests to ensure that migrations behave
as expected with all possible input documents. Given how simple it is to test
all the branch conditions in a migration function and the high impact of a bug
in this code, there's really no reason not to aim for 100% test code coverage.

View file

@ -15,14 +15,16 @@ A few services also automatically generate api documentation which can be browse
A few notable services are called out below.
* <<development-security>>
* <<development-plugin-saved-objects>>
* <<add-data-tutorials>>
* <<development-visualize-index>>
* <<code-exploration>>
include::security/index.asciidoc[leveloffset=+1]
include::development-plugin-saved-objects.asciidoc[leveloffset=+1]
include::add-data-tutorials.asciidoc[leveloffset=+1]
include::development-visualize-index.asciidoc[leveloffset=+1]
include::security/index.asciidoc[leveloffset=+1]
include::code-exploration.asciidoc[leveloffset=+1]

View file

@ -9,13 +9,12 @@ Registering features also gives your plugin access to “UI Capabilities”. The
=== Registering a feature
Feature registration is controlled via the built-in `xpack_main` plugin. To register a feature, call `xpack_main`'s `registerFeature` function from your plugin's `init` function, and provide the appropriate details:
Feature registration is controlled via the built-in `features` plugin. To register a feature, call `features`'s `registerKibanaFeature` function from your plugin's `setup` lifecycle function, and provide the appropriate details:
["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
setup(core, { features }) {
features.registerKibanaFeature({
// feature details here.
});
}
@ -39,18 +38,24 @@ Registering a feature consists of the following fields. For more information, co
|`"Sample Feature"`
|A human readable name for your feature.
|`category` (required)
|{kib-repo}blob/{branch}/src/core/types/app_category.ts[`AppCategory`]
|`DEFAULT_APP_CATEGORIES.kibana`
|The `AppCategory` which best represents your feature. Used to organize the display
of features within the management screens.
|`app` (required)
|`string[]`
|`["sample_app", "kibana"]`
|An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here.
|`privileges` (required)
|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`KibanaFeatureConfig`].
|See <<example-1-canvas,Example 1>> and <<example-2-dev-tools,Example 2>>
|The set of privileges this feature requires to function.
|`subFeatures` (optional)
|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`KibanaFeatureConfig`].
|See <<example-3-discover,Example 3>>
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.
@ -73,15 +78,17 @@ For a full explanation of fields and options, consult the {kib-repo}blob/{branch
=== Using UI Capabilities
UI Capabilities are available to your public (client) plugin code. These capabilities are read-only, and are used to inform the UI. This object is namespaced by feature id. For example, if your feature id is “foo”, then your UI Capabilities are stored at `uiCapabilities.foo`.
To access capabilities, import them from `ui/capabilities`:
Capabilities can be accessed from your plugin's `start` lifecycle from the `core.application` service:
["source","javascript"]
-----------
import { uiCapabilities } from 'ui/capabilities';
public start(core) {
const { capabilities } = core.application;
const canUserSave = uiCapabilities.foo.save;
if (canUserSave) {
// show save button
const canUserSave = capabilities.foo.save;
if (canUserSave) {
// show save button
}
}
-----------
@ -89,13 +96,13 @@ if (canUserSave) {
=== Example 1: Canvas Application
["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
public setup(core, { features }) {
features.registerKibanaFeature({
id: 'canvas',
name: 'Canvas',
icon: 'canvasApp',
navLinkId: 'canvas',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['canvas', 'kibana'],
catalogue: ['canvas'],
privileges: {
@ -130,11 +137,13 @@ The `all` privilege defines a single “save” UI Capability. To access this in
["source","javascript"]
-----------
import { uiCapabilities } from 'ui/capabilities';
public start(core) {
const { capabilities } = core.application;
const canUserSave = uiCapabilities.canvas.save;
if (canUserSave) {
// show save button
const canUserSave = capabilities.canvas.save;
if (canUserSave) {
// show save button
}
}
-----------
@ -145,15 +154,15 @@ Because the `read` privilege does not define the `save` capability, users with r
["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
public setup(core, { features }) {
features.registerKibanaFeature({
id: 'dev_tools',
name: i18n.translate('xpack.features.devToolsFeatureName', {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
navLinkId: 'dev_tools',
category: DEFAULT_APP_CATEGORIES.management,
app: ['kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
privileges: {
@ -206,9 +215,8 @@ a single "Create Short URLs" subfeature privilege is defined, which allows users
["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
public setup(core, { features }) {
features.registerKibanaFeature({
{
id: 'discover',
name: i18n.translate('xpack.features.discoverFeatureName', {
@ -217,6 +225,7 @@ init(server) {
order: 100,
icon: 'discoverApp',
navLinkId: 'discover',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['kibana'],
catalogue: ['discover'],
privileges: {

View file

@ -1,4 +1,4 @@
[[development-security-rbac]]
[[development-rbac]]
== Role-based access control
Role-based access control (RBAC) in {kib} relies upon the
@ -7,7 +7,7 @@ that {es} exposes. This allows {kib} to define the privileges that
{kib} wishes to grant to users, assign them to the relevant users using roles,
and then authorize the user to perform a specific action. This is handled within
a secured instance of the `SavedObjectsClient` and available transparently to
consumers when using `request.getSavedObjectsClient()` or
consumers when using `request.getSavedObjectsClient()` or
`savedObjects.getScopedSavedObjectsClient()`.
[[development-rbac-privileges]]
@ -77,7 +77,7 @@ The application is created by concatenating the prefix of `kibana-` with the val
}
----------------------------------
Roles that grant <<kibana-privileges>> should be managed using the <<role-management-api>> or the *Management -> Security -> Roles* page, not directly using the {es} {ref}/security-api.html#security-role-apis[role management API]. This role can then be assigned to users using the {es}
Roles that grant <<kibana-privileges>> should be managed using the <<role-management-api>> or the *Management -> Security -> Roles* page, not directly using the {es} {ref}/security-api.html#security-role-apis[role management API]. This role can then be assigned to users using the {es}
{ref}/security-api.html#security-user-apis[user management APIs].
[[development-rbac-authorization]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View file

@ -48,7 +48,7 @@ guidelines]
* Write all new code on
{kib-repo}blob/{branch}/src/core/README.md[the
platform], and following
{kib-repo}blob/{branch}/src/core/CONVENTIONS.md[conventions]
{kib-repo}blob/{branch}/src/core/CONVENTIONS.md[conventions].
* _Always_ use the `SavedObjectClient` for reading and writing Saved
Objects.
* Add `README`s to all your plugins and services.
@ -99,7 +99,7 @@ Re-using these services will help create a consistent experience across
[discrete]
=== Backward compatibility
Eventually we want to garauntee to our plugin developers that their plugins will not break from minor to minor.
Eventually we want to guarantee to our plugin developers that their plugins will not break from minor to minor.
Any time you create or change a public API, keep this in mind, and consider potential
backward compatibility issues. While we have a formal
@ -122,6 +122,14 @@ In addition, if users are relying on state stored in your apps URL as
part of your public contract, keep in mind that you may also need to
provide backwards compatibility for bookmarked URLs.
[discrete]
=== Routing, Navigation and URL
The {kib} platform provides a set of tools to help developers build consistent experience around routing and browser navigation.
Some of that tooling is inside `core`, some is available as part of various plugins.
<<kibana-navigation, Follow this guide>> to get an idea of available tools and common approaches for handling routing and browser navigation.
[discrete]
=== Testing & stability
@ -131,6 +139,8 @@ Review:
* <<stability>>
* <<security-best-practices>>
include::navigation.asciidoc[leveloffset=+1]
include::stability.asciidoc[leveloffset=+1]
include::security.asciidoc[leveloffset=+1]

View file

@ -0,0 +1,226 @@
[[kibana-navigation]]
== Routing, Navigation and URL
The {kib} platform provides a set of tools to help developers build consistent experience around routing and browser navigation.
Some of that tooling is inside `core`, some is available as part of various plugins.
The purpose of this guide is to give a high-level overview of available tools and to explain common approaches for handling routing and browser navigation.
This guide covers following topics:
* <<deep-linking>>
* <<navigating-between-kibana-apps>>
* <<routing>>
* <<history-and-location>>
* <<state-sync>>
* <<preserve-state>>
[[deep-linking]]
=== Deep-linking into {kib} apps
Assuming you want to link from your app to *Discover*. When building such URL there are two things to consider:
1. Prepending a proper `basePath`.
2. Specifying *Discover* state.
==== Prepending a proper `basePath`
To prepend {kib}'s `basePath` use {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.ibasepath.prepend.md[core.http.basePath.prepend] helper:
[source,typescript jsx]
----
const discoverUrl = core.http.basePath.prepend(`/discover`);
console.log(discoverUrl); // http://localhost:5601/bpr/s/space/app/discover
----
==== Specifying state
**Consider a {kib} app URL a part of app's plugin contract:**
. Avoid hardcoding other app's URL in your app's code.
. Avoid generating other app's state and serializing it into URL query params.
[source,typescript jsx]
----
// Avoid relying on other app's state structure in your app's code:
const discoverUrlWithSomeState = core.http.basePath.prepend(`/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-10T11:39:50.203Z',to:'2020-09-10T11:40:20.249Z'))&_a=(columns:!(_source),filters:!(),index:'90943e30-9a47-11e8-b64d-95841ca0b247',interval:auto,query:(language:kuery,query:''),sort:!())`);
----
Instead, each app should expose {kib-repo}tree/{branch}/src/plugins/share/public/url_generators/README.md[a URL generator].
Other apps should use those URL generators for creating URLs.
[source,typescript jsx]
----
// Properly generated URL to *Discover* app. Generator code is owned by *Discover* app and available on *Discover*'s plugin contract.
const discoverUrl = discoverUrlGenerator.createUrl({filters, timeRange});
----
To get a better idea, take a look at *Discover* URL generator {kib-repo}tree/{branch}/src/plugins/discover/public/url_generator.ts[implementation].
It allows specifying various **Discover** app state pieces like: index pattern, filters, query, time range and more.
There are two ways to access other's app URL generator in your code:
1. From a plugin contract of a destination app *(preferred)*.
2. Using URL generator service instance on `share` plugin contract (in case an explicit plugin dependency is not possible).
In case you want other apps to link to your app, then you should create a URL generator and expose it on your plugin's contract.
[[navigating-between-kibana-apps]]
=== Navigating between {kib} apps
{kib} is a single page application and there is a set of simple rules developers should follow
to make sure there is no page reload when navigating from one place in {kib} to another.
For example, navigation using native browser APIs would cause a full page reload.
[source,js]
----
const urlToADashboard = core.http.basePath.prepend(`/dashboard/my-dashboard`);
// this would cause a full page reload:
window.location.href = urlToADashboard;
----
To navigate between different {kib} apps without a page reload there are APIs in `core`:
* {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md[core.application.navigateToApp]
* {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md[core.application.navigateToUrl]
*Rendering a link to a different {kib} app on its own would also cause a full page reload:*
[source,typescript jsx]
----
const myLink = () =>
<a href={urlToADashboard}>Go to Dashboard</a>;
----
A workaround could be to handle a click, prevent browser navigation and use `core.application.navigateToApp` API:
[source,typescript jsx]
----
const MySPALink = () =>
<a
href={urlToADashboard}
onClick={(e) => {
e.preventDefault();
core.application.navigateToApp('dashboard', { path: '/my-dashboard' });
}}
>
Go to Dashboard
</a>;
----
As it would be too much boilerplate to do this for each {kib} link in your app, there is a handy wrapper that helps with it:
{kib-repo}tree/{branch}/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx#L49[RedirectAppLinks].
[source,typescript jsx]
----
const MyApp = () =>
<RedirectAppLinks application={core.application}>
{/*...*/}
{/* navigations using this link will happen in SPA friendly way */}
<a href={urlToADashboard}>Go to Dashboard</a>
{/*...*/}
</RedirectAppLinks>
----
[[routing]]
=== Setting up internal app routing
It is very common for {kib} apps to use React and React Router.
Common rules to follow in this scenario:
* Set up `BrowserRouter` and not `HashRouter`.
* *Initialize your router with `history` instance provided by the `core`.*
This is required to make sure `core` is aware of navigations triggered inside your app, so it could act accordingly when needed.
* `Core`'s {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md[ScopedHistory] instance.
* {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md[Example usage]
* {kib-repo}tree/{branch}/test/plugin_functional/plugins/core_plugin_a/public/application.tsx#L120[Example plugin]
Relative links will be resolved relative to your app's route (e.g.: `http://localhost5601/app/{your-app-id}`)
and setting up internal links in your app in SPA friendly way would look something like:
[source,typescript jsx]
----
import {Link} from 'react-router-dom';
const MyInternalLink = () => <Link to="/my-other-page"></Link>
----
[[history-and-location]]
=== Using history and browser location
Try to avoid using `window.location` and `window.history` directly. +
Instead, consider using {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md[ScopedHistory]
instance provided by `core`.
* This way `core` will know about location changes triggered within your app, and it would act accordingly.
* Some plugins are listening to location changes. Triggering location change manually could lead to unpredictable and hard-to-catch bugs.
Common use-case for using
`core`'s {kib-repo}tree/{branch}/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md[ScopedHistory] directly:
* Reading/writing query params or hash.
* Imperatively triggering internal navigations within your app.
* Listening to browser location changes.
[[state-sync]]
=== Syncing state with URL
Historically {kib} apps store _a lot_ of application state in the URL.
The most common pattern that {kib} apps follow today is storing state in `_a` and `_g` query params in https://github.com/w33ble/rison-node#readme[rison] format.
[[query-params]]
Those query params follow the convention:
* `_g` (*global*) - global UI state that should be shared and synced across multiple apps. common example from Analyze group apps: time range, refresh interval, *pinned* filters.
* `_a` (*application*) - UI state scoped to current app.
NOTE: After migrating to KP platform we got navigations without page reloads. Since then there is no real need to follow `_g` and `_a` separation anymore. It's up you to decide if you want to follow this pattern or if you prefer a single query param or something else. The need for this separation earlier is explained in <<preserve-state>>.
There are utils to help you to implement such kind of state syncing.
**When you should consider using state syncing utils:**
* You want to sync your application state with URL in similar manner Analyze group applications do.
* You want to follow platform's <<history-and-location, working with browser history and location best practices>> out of the box.
* You want to support `state:storeInSessionStore` escape hatch for URL overflowing out of the box.
* You should also consider using them if you'd like to serialize state to different (not `rison`) format. Utils are composable, and you can implement your own `storage`.
* In case you want to sync part of your state with URL, but other part of it with browser storage.
**When you shouldn't use state syncing utils:**
* Adding a query param flag or simple key/value to the URL.
Follow {kib-repo}tree/{branch}/src/plugins/kibana_utils/docs/state_sync#state-syncing-utilities[these] docs to learn more.
[[preserve-state]]
=== Preserving state between navigations
Consider the scenario:
1. You are in *Dashboard* app looking at a dashboard with some filters applied;
2. Navigate to *Discover* using in-app navigation;
3. Change the time filter'
4. Navigate to *Dashboard* using in-app navigation.
You'd notice that you were navigated to *Dashboard* app with the *same state* that you left it with,
except that the time filter has changed to the one you applied on *Discover* app.
Historically {kib} Analyze groups apps achieve that behavior relying on state in the URL.
If you'd have a closer look on a link in the navigation,
you'd notice that state is stored inside that link, and it also gets updated whenever relevant state changes happen:
[role="screenshot"]
image:images/state_inside_the_link.png[State is stored inside the navigation link]
This is where <<query-params, separation>> into `_a` and `_g` query params comes into play. What is considered a *global* state gets constantly updated in those navigation links. In the example above it was a time filter.
This is backed by {kib-repo}tree/{branch}/src/plugins/kibana_utils/public/state_management/url/kbn_url_tracker.ts#L57[KbnUrlTracker] util. You can use it to achieve similar behavior.
NOTE: After migrating to KP navigation works without page reloads and all plugins are loaded simultaneously.
Hence, likely there are simpler ways to preserve state of your application, unless you want to do it through URL.

View file

@ -52,15 +52,15 @@ storeinSessions?)
[discrete]
=== Browser coverage
Refer to the list of browsers and OS {kib} supports
Refer to the list of browsers and OS {kib} supports:
https://www.elastic.co/support/matrix
Does the feature work efficiently on the list of supported browsers?
[discrete]
=== Upgrade Scenarios - Migration scenarios-
=== Upgrade and Migration scenarios
Does the feature affect old
indices, saved objects ? - Has the feature been tested with {kib}
aliases - Read/Write privileges of the indices before and after the
* Does the feature affect old indices or saved objects?
* Has the feature been tested with {kib} aliases?
* Read/Write privileges of the indices before and after the
upgrade?

View file

@ -1,23 +1,104 @@
[[development-accessibility-tests]]
== Automated Accessibility Testing
To write an accessibility test, use the provided accessibility service `getService('a11y')`. Accessibility tests are fairly straightforward to write as https://github.com/dequelabs/axe-core[axe] does most of the heavy lifting. Navigate to the UI that you need to test, then call `testAppSnapshot();` from the service imported earlier to make sure axe finds no failures. Navigate through every portion of the UI for the best coverage.
An example test might look like this:
[source,js]
----
export default function ({ getService, getPageObjects }) {
const { common, home } = getPageObjects(['common', 'home']);
const a11y = getService('a11y'); /* this is the wrapping service around axe */
describe('Kibana Home', () => {
before(async () => {
await common.navigateToApp('home'); /* navigates to the page we want to test */
});
it('Kibana Home view', async () => {
await retry.waitFor(
'home page visible',
async () => await testSubjects.exists('homeApp')
); /* confirm you're on the correct page and that it's loaded */
await a11y.testAppSnapshot(); /* this expects that there are no failures found by axe */
});
/**
* If these tests were added by our QA team, tests that fail that require significant app code
* changes to be fixed will be skipped with a corresponding issue label with more info
*/
// Skipped due to https://github.com/elastic/kibana/issues/99999
it.skip('all plugins view page meets a11y requirements', async () => {
await home.clickAllKibanaPlugins();
await a11y.testAppSnapshot();
});
/**
* Testing all the versions and different views of of a page is important to get good
* coverage. Things like empty states, different license levels, different permissions, and
* loaded data can all significantly change the UI which necessitates their own test.
*/
it('Add Kibana sample data page', async () => {
await common.navigateToUrl('home', '/tutorial_directory/sampleData', {
useActualUrl: true,
});
await a11y.testAppSnapshot();
});
});
}
----
=== Running tests
To run the tests locally:
[arabic]
. In one terminal window run
`node scripts/functional_tests_server --config test/accessibility/config.ts`
. In another terminal window run
`node scripts/functional_test_runner.js --config test/accessibility/config.ts`
. In one terminal window run:
+
[source,shell]
-----------
node scripts/functional_tests_server --config test/accessibility/config.ts
-----------
. When the server prints that it is ready, in another terminal window run:
+
[source,shell]
-----------
node scripts/functional_test_runner.js --config test/accessibility/config.ts
-----------
To run the x-pack tests, swap the config file out for
`x-pack/test/accessibility/config.ts`.
After the server is up, you can go to this instance of {kib} at
`localhost:5620`.
The testing is done using https://github.com/dequelabs/axe-core[axe].
The same thing that runs in CI, can be run locally using their browser
plugins:
You can run the same thing that runs CI using browser plugins:
* https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US[Chrome]
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
=== Anatomy of a failure
Failures can seem confusing if you've never seen one before. Here is a breakdown of what a failure coming from CI might look like:
[source,bash]
----
1) Dashboard
create dashboard button:
Error: a11y report:
VIOLATION
[aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
Help: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus?application=axeAPI
Elements:
- #example
at Accessibility.testAxeReport (test/accessibility/services/a11y/a11y.ts:90:15)
at Accessibility.testAppSnapshot (test/accessibility/services/a11y/a11y.ts:58:18)
at process._tickCallback (internal/process/next_tick.js:68:7)
----
* "Dashboard" and "create dashboard button" are the names of the test suite and specific test that failed.
* Always in brackets, "[aria-hidden-focus]" is the name of the axe rule that failed, followed by a short description.
* "Help: <url>" links to the axe documentation for that rule, including severity, remediation tips, and good and bad code examples.
* "Elements:" points to where in the DOM the failure originated (using CSS selector syntax). In this example, the problem came from an element with the ID `example`. If the selector is too complicated to find the source of the problem, use the browser plugins mentioned earlier to locate it. If you have a general idea where the issue is coming from, you can also try adding unique IDs to the page to narrow down the location.
* The stack trace points to the internals of axe. The stack trace is there in case the test failure is a bug in axe and not in your code, although this is unlikely.

View file

@ -0,0 +1,65 @@
[[ci-metrics]]
== CI Metrics
In addition to running our tests, CI collects metrics about the Kibana build. These metrics are sent to an external service to track changes over time, and to provide PR authors insights into the impact of their changes.
[[ci-metric-types]]
=== Metric types
[[ci-metric-types-bundle-size-metrics]]
==== Bundle size
These metrics help contributors know how they are impacting the size of the bundles Kibana creates, and help make sure that Kibana loads as fast as possible.
[[ci-metric-page-load-bundle-size]] `page load bundle size` ::
The size of the entry file produced for each bundle/plugin. This file is always loaded on every page load, so it should be as small as possible. To reduce this metric you can put any code that isn't necessary on every page load behind an https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`].
+
Code that is shared statically with other plugins will contribute to the `page load bundle size` of that plugin. This includes exports from the `public/index.ts` file and any file referenced by the `extraPublicDirs` manifest property.
[[ci-metric-async-chunks-size]] `async chunks size` ::
An "async chunk" is created for the files imported by each https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`] statement. This metric tracks the sum size of these chunks, in bytes, broken down by plugin/bundle id. You can think of this as the amount of code users will have to download if they access all the components/applications within a bundle.
[[ci-metric-misc-asset-size]] `miscellaneous assets size` ::
A "miscellaneous asset" is anything that isn't an async chunk or entry chunk, often images. This metric tracks the sum size of these assets, in bytes, broken down by plugin/bundle id.
[[ci-metric-bundle-module-count]] `@kbn/optimizer bundle module count` ::
The number of separate modules included in each bundle/plugin. This is the best indicator we have for how long a specific bundle will take to be built by the `@kbn/optimizer`, so we report it to help people know when they've imported a module which might include a surprising number of sub-modules.
[[ci-metric-types-distributable-size]]
==== Distributable size
The size of the Kibana distributable is an essential metric as it not only contributes to the time it takes to download, but it also impacts time it takes to extract the archive once downloaded.
There are several metrics that we don't report on PRs because gzip-compression produces different file sizes even when provided the same input, so this metric would regularly show changes even though PR authors hadn't made any relevant changes.
All metrics are collected from the `tar.gz` archive produced for the linux platform.
[[ci-metric-distributable-file-count]] `distributable file count` ::
The number of files included in the default distributable.
[[ci-metric-oss-distributable-file-count]] `oss distributable file count` ::
The number of files included in the OSS distributable.
[[ci-metric-distributable-size]] `distributable size` ::
The size, in bytes, of the default distributable. _(not reported on PRs)_
[[ci-metric-oss-distributable-size]] `oss distributable size` ::
The size, in bytes, of the OSS distributable. _(not reported on PRs)_
[[ci-metric-types-saved-object-field-counts]]
==== Saved Object field counts
Elasticsearch limits the number of fields in an index to 1000 by default, and we want to avoid raising that limit.
[[ci-metric-saved-object-field-count]] `Saved Objects .kibana field count` ::
The number of saved object fields broken down by saved object type.
[[ci-metric-adding-new-metrics]]
=== Adding new metrics
You can report new metrics by using the `CiStatsReporter` class provided by the `@kbn/dev-utils` package. This class is automatically configured on CI and its methods noop when running outside of CI. For more details checkout the {kib-repo}blob/{branch}/packages/kbn-dev-utils/src/ci_stats_reporter[`CiStatsReporter` readme].

View file

@ -1,5 +1,5 @@
[[development-github]]
== How we use git and github
== How we use Git and GitHub
[discrete]
=== Forking
@ -12,17 +12,21 @@ repo, which we'll refer to in later code snippets.
[discrete]
=== Branching
* All work on the next major release goes into master.
* Past major release branches are named `{majorVersion}.x`. They contain
work that will go into the next minor release. For example, if the next
minor release is `5.2.0`, work for it should go into the `5.x` branch.
* Past minor release branches are named `{majorVersion}.{minorVersion}`.
They contain work that will go into the next patch release. For example,
if the next patch release is `5.3.1`, work for it should go into the
`5.3` branch.
* All work is done on feature branches and merged into one of these
branches.
* Where appropriate, we'll backport changes into older release branches.
At Elastic, all products in the stack, including Kibana, are released at the same time with the same version number. Most of these projects have the following branching strategy:
* `master` is the next major version.
* `<major>.x` is the next minor version.
* `<major>.<minor>` is the next release of a minor version, including patch releases.
As an example, let's assume that the `7.x` branch is currently a not-yet-released `7.6.0`. Once `7.6.0` has reached feature freeze, it will be branched to `7.6` and `7.x` will be updated to reflect `7.7.0`. The release of `7.6.0` and subsequent patch releases will be cut from the `7.6` branch. At any time, you can verify the current version of a branch by inspecting the `version` attribute in the `package.json` file within the Kibana source.
Pull requests are made into the `master` branch and then backported when it is safe and appropriate.
* Breaking changes do not get backported and only go into `master`.
* All non-breaking changes can be backported to the `<major>.x` branch.
* Features should not be backported to a `<major>.<minor>` branch.
* Bugs can be backported to a `<major>.<minor>` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description.
* Documentation changes can be backported to any branch at any time.
[discrete]
=== Commits and Merging
@ -109,4 +113,4 @@ Assuming you've successfully rebased and you're happy with the code, you should
[discrete]
=== Creating a pull request
See <<development-pull-request>> for the next steps on getting your code changes merged into {kib}.
See <<development-pull-request>> for the next steps on getting your code changes merged into {kib}.

View file

@ -20,7 +20,7 @@ root)
|`yarn test:jest_integration -t regexp [test path]`
|Mocha
|`src/**/__tests__/**/*.js` `!src/**/public/__tests__/*.js``packages/kbn-datemath/test/**/*.js` `packages/kbn-dev-utils/src/**/__tests__/**/*.js` `tasks/**/__tests__/**/*.js`
|`src/**/__tests__/**/*.js` `!src/**/public/__tests__/*.js` `packages/kbn-dev-utils/src/**/__tests__/**/*.js` `tasks/**/__tests__/**/*.js`
|`node scripts/mocha --grep=regexp [test path]`
|Functional

View file

@ -9,6 +9,7 @@ Read <<development-getting-started>> to get your environment up and running, the
* <<development-tests>>
* <<development-github>>
* <<interpreting-ci-failures>>
* <<ci-metrics>>
* <<development-documentation>>
* <<development-pull-request>>
* <<kibana-issue-reporting>>
@ -78,6 +79,8 @@ include::development-tests.asciidoc[leveloffset=+1]
include::interpreting-ci-failures.asciidoc[leveloffset=+1]
include::development-ci-metrics.asciidoc[leveloffset=+1]
include::development-documentation.asciidoc[leveloffset=+1]
include::development-pull-request.asciidoc[leveloffset=+1]

View file

@ -1,7 +1,7 @@
[[building-kibana]]
== Building a {kib} distributable
The following commands will build a {kib} production distributable.
The following command will build a {kib} production distributable:
[source,bash]
----
@ -36,4 +36,4 @@ To specify a package to build you can add `rpm` or `deb` as an argument.
yarn build --rpm
----
Distributable packages can be found in `target/` after the build completes.
Distributable packages can be found in `target/` after the build completes.

View file

@ -33,7 +33,7 @@ To enable TypeScript support, create a `tsconfig.json` file at the root of your
["source","js"]
-----------
{
// extend {kib}'s tsconfig, or use your own settings
// extend Kibana's tsconfig, or use your own settings
"extends": "../../kibana/tsconfig.json",
// tell the TypeScript compiler where to find your source files

View file

@ -30,7 +30,7 @@ you can switch to the correct version when using nvm by running:
nvm use
----
Install the latest version of https://yarnpkg.com[yarn].
Install the latest version of https://classic.yarnpkg.com/en/docs/install[yarn v1].
Bootstrap {kib} and install all the dependencies:
@ -49,7 +49,7 @@ ____
(You can also run `yarn kbn` to see the other available commands. For
more info about this tool, see
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}packages/kbn-pm].)
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm].)
When switching branches which use different versions of npm packages you
may need to run:
@ -99,7 +99,7 @@ preserving data inbetween runs, running remote cluster, etc.
[discrete]
=== Run {kib}
In another terminal window, start up {kib}. Include developer examples by adding an optional `--run-examples` flag.
In another terminal window, start up {kib}. Include {kib-repo}tree/{branch}/examples[developer examples] by adding an optional `--run-examples` flag.
[source,bash]
----
@ -137,4 +137,4 @@ include::debugging.asciidoc[leveloffset=+1]
include::building-kibana.asciidoc[leveloffset=+1]
include::development-plugin-resources.asciidoc[leveloffset=+1]
include::development-plugin-resources.asciidoc[leveloffset=+1]

View file

@ -48,7 +48,7 @@ If youre installing dependencies and seeing an error that looks
something like
....
Unsupported URL Type: link:packages/eslint-config-kibana
Unsupported URL Type: link:packages/elastic-eslint-config-kibana
....
youre likely running `npm`. To install dependencies in {kib} you
@ -73,8 +73,8 @@ settings].
[discrete]
=== Potential Optimization Pitfalls
* Webpack is trying to include a file in the bundle that I deleted and
is now complaining about it is missing
* Webpack is trying to include a file in the bundle that was deleted and
is now complaining about it being missing
* A module id that used to resolve to a single file now resolves to a
directory, but webpack isnt adapting
* (if you discover other scenarios, please send a PR!)
@ -84,4 +84,4 @@ directory, but webpack isnt adapting
{kib} includes self-signed certificates that can be used for
development purposes in the browser and for communicating with
{es}: `yarn start --ssl` & `yarn es snapshot --ssl`.
{es}: `yarn start --ssl` & `yarn es snapshot --ssl`.

View file

@ -12,6 +12,7 @@ running in no time. If you have any problems, file an issue in the https://githu
* <<external-plugin-development>>
* <<kibana-architecture>>
* <<advanced>>
* <<plugin-list>>
--
@ -27,3 +28,5 @@ include::plugin/index.asciidoc[]
include::advanced/index.asciidoc[]
include::plugin-list.asciidoc[]

View file

@ -0,0 +1,528 @@
////
NOTE:
This is an automatically generated file. Please do not edit directly. Instead, run the
following from within the kibana repository:
node scripts/build_plugin_list_docs
You can update the template within packages/kbn-dev-utils/target/plugin_list/generate_plugin_list.js
////
[[plugin-list]]
== List of {kib} plugins
[discrete]
=== src/plugins
[%header,cols=2*]
|===
|Name
|Description
|{kib-repo}blob/{branch}/src/plugins/advanced_settings[advancedSettings]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/apm_oss[apmOss]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/bfetch/README.md[bfetch]
|bfetch allows to batch HTTP requests and streams responses back.
|{kib-repo}blob/{branch}/src/plugins/charts/README.md[charts]
|The Charts plugin is a way to create easier integration of shared colors, themes, types and other utilities across all Kibana charts and visualizations.
|{kib-repo}blob/{branch}/src/plugins/console[console]
|WARNING: Missing README.
|<<kibana-dashboard-plugin>>
|- Registers the dashboard application.
- Adds a dashboard embeddable that can be used in other applications.
|{kib-repo}blob/{branch}/src/plugins/data/README.md[data]
|data plugin provides common data access services.
|{kib-repo}blob/{branch}/src/plugins/dev_tools/README.md[devTools]
|The ui/registry/dev_tools is removed in favor of the devTools plugin which exposes a register method in the setup contract.
Registering app works mostly the same as registering apps in core.application.register.
Routing will be handled by the id of the dev tool - your dev tool will be mounted when the URL matches /app/dev_tools#/<YOUR ID>.
This API doesn't support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element.
|{kib-repo}blob/{branch}/src/plugins/discover/README.md[discover]
|Contains the Discover application and the saved search embeddable.
|{kib-repo}blob/{branch}/src/plugins/embeddable/README.md[embeddable]
|Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable containers.
|{kib-repo}blob/{branch}/src/plugins/es_ui_shared/README.md[esUiShared]
|This plugin contains reusable code in the form of self-contained modules (or libraries). Each of these modules exports a set of functionality relevant to the domain of the module.
|<<kibana-expressions-plugin>>
|Expression pipeline is a chain of functions that *pipe* its output to the
input of the next function. Functions can be configured using arguments provided
by the user. The final output of the expression pipeline can be rendered using
one of the *renderers* registered in `expressions` plugin.
All the arguments to expression functions need to be serializable, as well as input and output.
Expression functions should try to stay 'pure'. This makes functions easy to reuse and also
make it possible to serialize the whole chain as well as output at every step of execution.
Expressions power visualizations in Dashboard and Lens, as well as, every
*element* in Canvas is backed by an expression.
This plugin provides methods which will parse & execute an *expression pipeline*
string for you, as well as a series of registries for advanced users who might
want to incorporate their own functions, types, and renderers into the service
for use in their own application.
|{kib-repo}blob/{branch}/src/plugins/home/README.md[home]
|Moves the legacy ui/registry/feature_catalogue module for registering "features" that should be shown in the home page's feature catalogue to a service within a "home" plugin. The feature catalogue refered to here should not be confused with the "feature" plugin for registering features used to derive UI capabilities for feature controls.
|{kib-repo}blob/{branch}/src/plugins/index_pattern_management[indexPatternManagement]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/input_control_vis/README.md[inputControlVis]
|Contains the input control visualization allowing to place custom filter controls on a dashboard.
|{kib-repo}blob/{branch}/src/plugins/inspector/README.md[inspector]
|The inspector is a contextual tool to gain insights into different elements
in Kibana, e.g. visualizations. It has the form of a flyout panel.
|{kib-repo}blob/{branch}/src/plugins/kibana_legacy/README.md[kibanaLegacy]
|This plugin contains several helpers and services to integrate pieces of the legacy Kibana app with the new Kibana platform.
|{kib-repo}blob/{branch}/src/plugins/kibana_react/README.md[kibanaReact]
|Tools for building React applications in Kibana.
|{kib-repo}blob/{branch}/src/plugins/kibana_usage_collection/README.md[kibanaUsageCollection]
|This plugin registers the basic usage collectors from Kibana:
|{kib-repo}blob/{branch}/src/plugins/kibana_utils/README.md[kibanaUtils]
|Utilities for building Kibana plugins.
|{kib-repo}blob/{branch}/src/plugins/legacy_export[legacyExport]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/management[management]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/maps_legacy[mapsLegacy]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/navigation/README.md[navigation]
|The navigation plugins exports the TopNavMenu component.
It also provides a stateful version of it on the start contract.
|{kib-repo}blob/{branch}/src/plugins/newsfeed[newsfeed]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/region_map[regionMap]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/saved_objects[savedObjects]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/saved_objects_management[savedObjectsManagement]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/share/README.md[share]
|Replaces the legacy ui/share module for registering share context menus.
|{kib-repo}blob/{branch}/src/plugins/telemetry/README.md[telemetry]
|Telemetry allows Kibana features to have usage tracked in the wild. The general term "telemetry" refers to multiple things:
|{kib-repo}blob/{branch}/src/plugins/telemetry_collection_manager/README.md[telemetryCollectionManager]
|Telemetry's collection manager to go through all the telemetry sources when fetching it before reporting.
|{kib-repo}blob/{branch}/src/plugins/telemetry_management_section/README.md[telemetryManagementSection]
|This plugin adds the Advanced Settings section for the Usage Data collection (aka Telemetry).
|{kib-repo}blob/{branch}/src/plugins/tile_map[tileMap]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/timelion/README.md[timelion]
|Contains the deprecated timelion application. For the timelion visualization,
which also contains the timelion APIs and backend, look at the vis_type_timelion plugin.
|{kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions]
|An API for:
|{kib-repo}blob/{branch}/src/plugins/url_forwarding/README.md[urlForwarding]
|This plugins contains helpers to redirect legacy URLs. It can be used to forward old URLs to their new counterparts.
|{kib-repo}blob/{branch}/src/plugins/usage_collection/README.md[usageCollection]
|Usage Collection allows collecting usage data for other services to consume (telemetry and monitoring).
To integrate with the telemetry services for usage collection of your feature, there are 2 steps:
|{kib-repo}blob/{branch}/src/plugins/vis_default_editor/README.md[visDefaultEditor]
|The default editor is used in most primary visualizations, e.x. Area, Data table, Pie, etc.
It acts as a container for a particular visualization and options tabs. Contains the default "Data" tab in public/components/sidebar/data_tab.tsx.
The plugin exposes the static DefaultEditorController class to consume.
|{kib-repo}blob/{branch}/src/plugins/vis_type_markdown/README.md[visTypeMarkdown]
|The markdown visualization that can be used to place text panels on dashboards.
|{kib-repo}blob/{branch}/src/plugins/vis_type_metric/README.md[visTypeMetric]
|Contains the metric visualization.
|{kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable]
|Contains the data table visualization, that allows presenting data in a simple table format.
|{kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud/README.md[visTypeTagcloud]
|Contains the tagcloud visualization.
|{kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion]
|Contains the timelion visualization and the timelion backend.
|{kib-repo}blob/{branch}/src/plugins/vis_type_timeseries/README.md[visTypeTimeseries]
|Contains everything around TSVB (the editor, visualizatin implementations and backends).
|{kib-repo}blob/{branch}/src/plugins/vis_type_vega/README.md[visTypeVega]
|Contains the Vega visualization.
|{kib-repo}blob/{branch}/src/plugins/vis_type_vislib/README.md[visTypeVislib]
|Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and
heatmap charts.
|{kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy]
|Contains the new xy-axis chart using the elastic-charts library, which will eventually
replace the vislib xy-axis (bar, area, line) charts.
|{kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations]
|Contains most of the visualization infrastructure, e.g. the visualization type registry or the
visualization embeddable.
|{kib-repo}blob/{branch}/src/plugins/visualize/README.md[visualize]
|Contains the visualize application which includes the listing page and the app frame,
which will load the visualization's editor.
|===
[discrete]
=== x-pack/plugins
[%header,cols=2*]
|===
|Name
|Description
|{kib-repo}blob/{branch}/x-pack/plugins/actions/README.md[actions]
|The Kibana actions plugin provides a framework to create executable actions. You can:
|{kib-repo}blob/{branch}/x-pack/plugins/alerting_builtins/README.md[alertingBuiltins]
|This plugin provides alertTypes shipped with Kibana for use with the
the alerts plugin. When enabled, it will register
the built-in alertTypes with the alerting plugin, register associated HTTP
routes, etc.
|{kib-repo}blob/{branch}/x-pack/plugins/alerts/README.md[alerts]
|The Kibana alerting plugin provides a common place to set up alerts. You can:
|{kib-repo}blob/{branch}/x-pack/plugins/apm/readme.md[apm]
|To access an elasticsearch instance that has live data you have two options:
|{kib-repo}blob/{branch}/x-pack/plugins/audit_trail[auditTrail]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/beats_management/readme.md[beatsManagement]
|Notes:
Failure to have auth enabled in Kibana will make for a broken UI. UI-based errors not yet in place
|{kib-repo}blob/{branch}/x-pack/plugins/canvas/README.md[canvas]
|"Never look back. The past is done. The future is a blank canvas." ― Suzy Kassem, Rise Up and Salute the Sun
|{kib-repo}blob/{branch}/x-pack/plugins/case/README.md[case]
|Experimental Feature
|{kib-repo}blob/{branch}/x-pack/plugins/cloud[cloud]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/code[code]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/console_extensions[consoleExtensions]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/cross_cluster_replication/README.md[crossClusterReplication]
|You can run a local cluster and simulate a remote cluster within a single Kibana directory.
|<<dashboard-enhanced-plugin>>
|Adds drilldown capabilities to dashboard. Owned by the Kibana App team.
|{kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode/README.md[dashboardMode]
|The deprecated dashboard only mode.
|{kib-repo}blob/{branch}/x-pack/plugins/data_enhanced[dataEnhanced]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced]
|Contains the enhancements to the OSS discover app.
|<<enhanced-embeddables-plugin>>
|Enhances Embeddables by registering a custom factory provider. The enhanced factory provider
adds dynamic actions to every embeddables state, in order to support drilldowns.
|{kib-repo}blob/{branch}/x-pack/plugins/encrypted_saved_objects/README.md[encryptedSavedObjects]
|The purpose of this plugin is to provide a way to encrypt/decrypt attributes on the custom Saved Objects that works with
security and spaces filtering as well as performing audit logging.
|{kib-repo}blob/{branch}/x-pack/plugins/enterprise_search/README.md[enterpriseSearch]
|This plugin's goal is to provide a Kibana user interface to the Enterprise Search solution's products (App Search and Workplace Search). In it's current MVP state, the plugin provides the following with the goal of gathering user feedback and raising product awareness:
|{kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog]
|The purpose of this plugin is to provide a way to persist a history of events
occuring in Kibana, initially just for the Make It Action project - alerts
and actions.
|{kib-repo}blob/{branch}/x-pack/plugins/features[features]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/file_upload[fileUpload]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch]
|The GlobalSearch plugin provides an easy way to search for various objects, such as applications
or dashboards from the Kibana instance, from both server and client-side plugins
|{kib-repo}blob/{branch}/x-pack/plugins/global_search_bar/README.md[globalSearchBar]
|The GlobalSearchBar plugin provides a search interface for navigating Kibana. (It is the UI to the GlobalSearch plugin.)
|{kib-repo}blob/{branch}/x-pack/plugins/global_search_providers[globalSearchProviders]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/graph/README.md[graph]
|This is the main source folder of the Graph plugin. It contains all of the Kibana server and client source code. x-pack/test/functional/apps/graph contains additional functional tests.
|{kib-repo}blob/{branch}/x-pack/plugins/grokdebugger[grokdebugger]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/index_lifecycle_management/README.md[indexLifecycleManagement]
|You can test that the Frozen badge, phase filtering, and lifecycle information is surfaced in
Index Management by running this series of requests in Console:
|{kib-repo}blob/{branch}/x-pack/plugins/index_management/README.md[indexManagement]
|Create a data stream using Console and you'll be able to view it in the UI:
|{kib-repo}blob/{branch}/x-pack/plugins/infra/README.md[infra]
|This is the home of the infra plugin, which aims to provide a solution for
the infrastructure monitoring use-case within Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_manager/README.md[ingestManager]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.ingestManager.fleet.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines]
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details.
|{kib-repo}blob/{branch}/x-pack/plugins/lens/readme.md[lens]
|Run all tests from the x-pack root directory
|{kib-repo}blob/{branch}/x-pack/plugins/license_management[licenseManagement]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/licensing/README.md[licensing]
|The licensing plugin retrieves license data from Elasticsearch at regular configurable intervals.
|{kib-repo}blob/{branch}/x-pack/plugins/lists/README.md[lists]
|README.md for developers working on the backend lists on how to get started
using the CURL scripts in the scripts folder.
|{kib-repo}blob/{branch}/x-pack/plugins/logstash[logstash]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/maps/README.md[maps]
|Visualize geo data from Elasticsearch or 3rd party geo-services.
|{kib-repo}blob/{branch}/x-pack/plugins/maps_legacy_licensing/README.md[mapsLegacyLicensing]
|This plugin provides access to the detailed tile map services from Elastic.
|{kib-repo}blob/{branch}/x-pack/plugins/ml[ml]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/monitoring[monitoring]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/observability/README.md[observability]
|This plugin provides shared components and services for use across observability solutions, as well as the observability landing page UI.
|{kib-repo}blob/{branch}/x-pack/plugins/painless_lab[painlessLab]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/remote_clusters[remoteClusters]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/reporting/README.md[reporting]
|An awesome Kibana reporting plugin
|{kib-repo}blob/{branch}/x-pack/plugins/rollup/README.md[rollup]
|Welcome to the Kibana rollup plugin! This plugin provides Kibana support for Elasticsearch's rollup feature. Please refer to the Elasticsearch documentation to understand rollup indices and how to create rollup jobs.
|{kib-repo}blob/{branch}/x-pack/plugins/searchprofiler[searchprofiler]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/security/README.md[security]
|See Configuring security in Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution]
|Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing.
|{kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore]
|or
|{kib-repo}blob/{branch}/x-pack/plugins/spaces[spaces]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/task_manager[taskManager]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/telemetry_collection_xpack/README.md[telemetryCollectionXpack]
|Gathers all usage collection, retrieving them from both: OSS and X-Pack plugins.
|{kib-repo}blob/{branch}/x-pack/plugins/transform[transform]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/translations[translations]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/triggers_actions_ui/README.md[triggers_actions_ui]
|The Kibana alerts and actions UI plugin provides a user interface for managing alerts and actions.
As a developer you can reuse and extend built-in alerts and actions UI functionality:
|{kib-repo}blob/{branch}/x-pack/plugins/ui_actions_enhanced/README.md[uiActionsEnhanced]
|Registers commercially licensed generic actions like per panel time range and contains some code that supports drilldown work.
|{kib-repo}blob/{branch}/x-pack/plugins/upgrade_assistant[upgradeAssistant]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/uptime/README.md[uptime]
|The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening
in their infrastructure.
|{kib-repo}blob/{branch}/x-pack/plugins/watcher/README.md[watcher]
|This plugins adopts some conventions in addition to or in place of conventions in Kibana (at the time of the plugin's creation):
|{kib-repo}blob/{branch}/x-pack/plugins/xpack_legacy/README.md[xpackLegacy]
|Contains HTTP endpoints and UiSettings that are slated for removal.
|{kib-repo}blob/{branch}/x-pack/plugins/drilldowns/url_drilldown/README.md[urlDrilldown]
|NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to ui_actions_enhanced plugin.
|===
include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1]
include::{kibana-root}/src/plugins/expressions/README.asciidoc[leveloffset=+1]
include::{kibana-root}/x-pack/plugins/dashboard_enhanced/README.asciidoc[leveloffset=+1]
include::{kibana-root}/x-pack/plugins/embeddable_enhanced/README.asciidoc[leveloffset=+1]

View file

@ -13,7 +13,7 @@ To get started copy and paste this example to `test/functional/config.js`:
["source","js"]
-----------
import { resolve } from 'path';
import { resolveKibanaPath } from '@kbn/plugin-helpers';
import { REPO_ROOT } from '@kbn/utils';
import { MyServiceProvider } from './services/my_service';
import { MyAppPageProvider } from './services/my_app_page';
@ -24,7 +24,7 @@ export default async function ({ readConfigFile }) {
// read the {kib} config file so that we can utilize some of
// its services and PageObjects
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
const kibanaConfig = await readConfigFile(resolve(REPO_ROOT, 'test/functional/config.js'));
return {
// list paths to the files that contain your plugins tests

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [capabilities](./kibana-plugin-core-public.app.capabilities.md)
## App.capabilities property
Custom capabilities defined by the app.
<b>Signature:</b>
```typescript
capabilities?: Partial<Capabilities>;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [category](./kibana-plugin-core-public.app.category.md)
## App.category property
The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference
<b>Signature:</b>
```typescript
category?: AppCategory;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [defaultPath](./kibana-plugin-core-public.app.defaultpath.md)
## App.defaultPath property
Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the `path` option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar.
<b>Signature:</b>
```typescript
defaultPath?: string;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [euiIconType](./kibana-plugin-core-public.app.euiicontype.md)
## App.euiIconType property
A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property.
<b>Signature:</b>
```typescript
euiIconType?: string;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [icon](./kibana-plugin-core-public.app.icon.md)
## App.icon property
A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided.
<b>Signature:</b>
```typescript
icon?: string;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [id](./kibana-plugin-core-public.app.id.md)
## App.id property
The unique identifier of the application
<b>Signature:</b>
```typescript
id: string;
```

View file

@ -4,12 +4,11 @@
## App interface
Extension of [common app properties](./kibana-plugin-core-public.appbase.md) with the mount function.
<b>Signature:</b>
```typescript
export interface App<HistoryLocationState = unknown> extends AppBase
export interface App<HistoryLocationState = unknown>
```
## Properties
@ -17,7 +16,19 @@ export interface App<HistoryLocationState = unknown> extends AppBase
| Property | Type | Description |
| --- | --- | --- |
| [appRoute](./kibana-plugin-core-public.app.approute.md) | <code>string</code> | Override the application's routing path from <code>/app/${id}</code>. Must be unique across registered applications. Should not include the base path from HTTP. |
| [capabilities](./kibana-plugin-core-public.app.capabilities.md) | <code>Partial&lt;Capabilities&gt;</code> | Custom capabilities defined by the app. |
| [category](./kibana-plugin-core-public.app.category.md) | <code>AppCategory</code> | The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference |
| [chromeless](./kibana-plugin-core-public.app.chromeless.md) | <code>boolean</code> | Hide the UI chrome when the application is mounted. Defaults to <code>false</code>. Takes precedence over chrome service visibility settings. |
| [defaultPath](./kibana-plugin-core-public.app.defaultpath.md) | <code>string</code> | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the <code>path</code> option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. |
| [euiIconType](./kibana-plugin-core-public.app.euiicontype.md) | <code>string</code> | A EUI iconType that will be used for the app's icon. This icon takes precendence over the <code>icon</code> property. |
| [exactRoute](./kibana-plugin-core-public.app.exactroute.md) | <code>boolean</code> | If set to true, the application's route will only be checked against an exact match. Defaults to <code>false</code>. |
| [icon](./kibana-plugin-core-public.app.icon.md) | <code>string</code> | A URL to an image file used as an icon. Used as a fallback if <code>euiIconType</code> is not provided. |
| [id](./kibana-plugin-core-public.app.id.md) | <code>string</code> | The unique identifier of the application |
| [mount](./kibana-plugin-core-public.app.mount.md) | <code>AppMount&lt;HistoryLocationState&gt; &#124; AppMountDeprecated&lt;HistoryLocationState&gt;</code> | A mount function called when the user navigates to this app's route. May have signature of [AppMount](./kibana-plugin-core-public.appmount.md) or [AppMountDeprecated](./kibana-plugin-core-public.appmountdeprecated.md)<!-- -->. |
| [navLinkStatus](./kibana-plugin-core-public.app.navlinkstatus.md) | <code>AppNavLinkStatus</code> | The initial status of the application's navLink. Defaulting to <code>visible</code> if <code>status</code> is <code>accessible</code> and <code>hidden</code> if status is <code>inaccessible</code> See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) |
| [order](./kibana-plugin-core-public.app.order.md) | <code>number</code> | An ordinal used to sort nav links relative to one another for display. |
| [status](./kibana-plugin-core-public.app.status.md) | <code>AppStatus</code> | The initial status of the application. Defaulting to <code>accessible</code> |
| [title](./kibana-plugin-core-public.app.title.md) | <code>string</code> | The title of the application. |
| [tooltip](./kibana-plugin-core-public.app.tooltip.md) | <code>string</code> | A tooltip shown when hovering over app link. |
| [updater$](./kibana-plugin-core-public.app.updater_.md) | <code>Observable&lt;AppUpdater&gt;</code> | An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. |

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [navLinkStatus](./kibana-plugin-core-public.app.navlinkstatus.md)
## App.navLinkStatus property
The initial status of the application's navLink. Defaulting to `visible` if `status` is `accessible` and `hidden` if status is `inaccessible` See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md)
<b>Signature:</b>
```typescript
navLinkStatus?: AppNavLinkStatus;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [order](./kibana-plugin-core-public.app.order.md)
## App.order property
An ordinal used to sort nav links relative to one another for display.
<b>Signature:</b>
```typescript
order?: number;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [status](./kibana-plugin-core-public.app.status.md)
## App.status property
The initial status of the application. Defaulting to `accessible`
<b>Signature:</b>
```typescript
status?: AppStatus;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [title](./kibana-plugin-core-public.app.title.md)
## App.title property
The title of the application.
<b>Signature:</b>
```typescript
title: string;
```

View file

@ -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; [App](./kibana-plugin-core-public.app.md) &gt; [tooltip](./kibana-plugin-core-public.app.tooltip.md)
## App.tooltip property
A tooltip shown when hovering over app link.
<b>Signature:</b>
```typescript
tooltip?: string;
```

View file

@ -0,0 +1,44 @@
<!-- 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; [App](./kibana-plugin-core-public.app.md) &gt; [updater$](./kibana-plugin-core-public.app.updater_.md)
## App.updater$ property
An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime.
<b>Signature:</b>
```typescript
updater$?: Observable<AppUpdater>;
```
## Example
How to update an application navLink at runtime
```ts
// inside your plugin's setup function
export class MyPlugin implements Plugin {
private appUpdater = new BehaviorSubject<AppUpdater>(() => ({}));
setup({ application }) {
application.register({
id: 'my-app',
title: 'My App',
updater$: this.appUpdater,
async mount(params) {
const { renderApp } = await import('./application');
return renderApp(params);
},
});
}
start() {
// later, when the navlink needs to be updated
appUpdater.next(() => {
navLinkStatus: AppNavLinkStatus.disabled,
})
}
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [capabilities](./kibana-plugin-core-public.appbase.capabilities.md)
## AppBase.capabilities property
Custom capabilities defined by the app.
<b>Signature:</b>
```typescript
capabilities?: Partial<Capabilities>;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [category](./kibana-plugin-core-public.appbase.category.md)
## AppBase.category property
The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference
<b>Signature:</b>
```typescript
category?: AppCategory;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [chromeless](./kibana-plugin-core-public.appbase.chromeless.md)
## AppBase.chromeless property
Hide the UI chrome when the application is mounted. Defaults to `false`<!-- -->. Takes precedence over chrome service visibility settings.
<b>Signature:</b>
```typescript
chromeless?: boolean;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [defaultPath](./kibana-plugin-core-public.appbase.defaultpath.md)
## AppBase.defaultPath property
Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the `path` option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar.
<b>Signature:</b>
```typescript
defaultPath?: string;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [euiIconType](./kibana-plugin-core-public.appbase.euiicontype.md)
## AppBase.euiIconType property
A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property.
<b>Signature:</b>
```typescript
euiIconType?: string;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [icon](./kibana-plugin-core-public.appbase.icon.md)
## AppBase.icon property
A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided.
<b>Signature:</b>
```typescript
icon?: string;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [id](./kibana-plugin-core-public.appbase.id.md)
## AppBase.id property
The unique identifier of the application
<b>Signature:</b>
```typescript
id: string;
```

View file

@ -1,31 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md)
## AppBase interface
<b>Signature:</b>
```typescript
export interface AppBase
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [capabilities](./kibana-plugin-core-public.appbase.capabilities.md) | <code>Partial&lt;Capabilities&gt;</code> | Custom capabilities defined by the app. |
| [category](./kibana-plugin-core-public.appbase.category.md) | <code>AppCategory</code> | The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference |
| [chromeless](./kibana-plugin-core-public.appbase.chromeless.md) | <code>boolean</code> | Hide the UI chrome when the application is mounted. Defaults to <code>false</code>. Takes precedence over chrome service visibility settings. |
| [defaultPath](./kibana-plugin-core-public.appbase.defaultpath.md) | <code>string</code> | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the <code>path</code> option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. |
| [euiIconType](./kibana-plugin-core-public.appbase.euiicontype.md) | <code>string</code> | A EUI iconType that will be used for the app's icon. This icon takes precendence over the <code>icon</code> property. |
| [icon](./kibana-plugin-core-public.appbase.icon.md) | <code>string</code> | A URL to an image file used as an icon. Used as a fallback if <code>euiIconType</code> is not provided. |
| [id](./kibana-plugin-core-public.appbase.id.md) | <code>string</code> | The unique identifier of the application |
| [navLinkStatus](./kibana-plugin-core-public.appbase.navlinkstatus.md) | <code>AppNavLinkStatus</code> | The initial status of the application's navLink. Defaulting to <code>visible</code> if <code>status</code> is <code>accessible</code> and <code>hidden</code> if status is <code>inaccessible</code> See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) |
| [order](./kibana-plugin-core-public.appbase.order.md) | <code>number</code> | An ordinal used to sort nav links relative to one another for display. |
| [status](./kibana-plugin-core-public.appbase.status.md) | <code>AppStatus</code> | The initial status of the application. Defaulting to <code>accessible</code> |
| [title](./kibana-plugin-core-public.appbase.title.md) | <code>string</code> | The title of the application. |
| [tooltip](./kibana-plugin-core-public.appbase.tooltip.md) | <code>string</code> | A tooltip shown when hovering over app link. |
| [updater$](./kibana-plugin-core-public.appbase.updater_.md) | <code>Observable&lt;AppUpdater&gt;</code> | An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. |

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [navLinkStatus](./kibana-plugin-core-public.appbase.navlinkstatus.md)
## AppBase.navLinkStatus property
The initial status of the application's navLink. Defaulting to `visible` if `status` is `accessible` and `hidden` if status is `inaccessible` See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md)
<b>Signature:</b>
```typescript
navLinkStatus?: AppNavLinkStatus;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [order](./kibana-plugin-core-public.appbase.order.md)
## AppBase.order property
An ordinal used to sort nav links relative to one another for display.
<b>Signature:</b>
```typescript
order?: number;
```

View file

@ -1,13 +0,0 @@
<!-- 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; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [status](./kibana-plugin-core-public.appbase.status.md)
## AppBase.status property
The initial status of the application. Defaulting to `accessible`
<b>Signature:</b>
```typescript
status?: AppStatus;
```

Some files were not shown because too many files have changed in this diff Show more