No description
Find a file
Vadim Dalecky b9f4eec008
[7.x] Expressions refactor (#54342) (#57366)
* Expressions refactor (#54342)

* feat: 🎸 add UiComponent interface

* feat: 🎸 add adapter for react => ui components and back

* refactor: 💡 move registries to shared /common folder

* feat: 🎸 create expressions service state contaienr

* chore: 🤖 export some symbols

* feat: 🎸 add Executor class

* test: 💍 add simple integration test

* feat: 🎸 move registries into executor

* feat: 🎸 add initial implementation of Execution

* feat: 🎸 move Executor's state container into a signle file

* refactor: 💡 move createError() to /common folder

* feat: 🎸 use Executor in plugin definition

* refactor: 💡 rename handlers to FunctionHandlers

* feat: 🎸 improve function typings

* feat: 🎸 move types and func in sep folder, improve Execution

* refactor: 💡 cleanup expression_types folder

* refactor: 💡 improve typing names of expression types

* refactor: 💡 remove lodash from ExpressionType and improve types

* test: 💍 add ExpressionType tests

* refactor: 💡 remove function wrappers around types

* refactor: 💡 move functions to /common

* test: 💍 improve expression function tests

* feat: 🎸 create /parser folder

* refactor: 💡 move function types into /expression_functions dir

* refactor: 💡 improve parser setup

* refactor: 💡 fix export structure and move args into expr_func

* test: 💍 add ExpressionFunctionParameter tests

* fix: 🐛 fix executor types and imports

* refactor: 💡 move getByAlias to plugin, fix Execution types

* feat: 🎸 add function for argument parsing

* test: 💍 add Executor type tests

* test: 💍 add executor function and context tests

* test: 💍 check that Executor returns Execution

* test: 💍 add basic tests for Execution

* test: 💍 add basic test for execution of a chain of functions

* test: 💍 add "mult" function tot tests

* feat: 🎸 create separate expression_renderer folder

* feat: 🎸 use new executor in public plugin

* feat: 🎸 remove renderers from executor, add result to execution

* fix: 🐛 fix Kibana TypeScript errors

* test: 💍 add file to write integration tests for expr plugin

* refactor: 💡 move state_containers to /common

* refactor: 💡 move /parser to /ast and inline format() function

* refactor: 💡 remove remaining @kbn/interpreter imports

* feat: 🎸 better handling and typing for Executor context

* feat: 🎸 use Executor.run function in plugin

* fix: 🐛 fix TypeScript type errors

* test: 💍 move integration tests into one file

* feat: 🎸 create ExpressionsService

* chore: 🤖 clean up legacy code

* feat: 🎸 use ExpressionsService in /public

* refactor: 💡 move inspector adapters to /common

* feat: 🎸 improve execution

* feat: 🎸 add state to execution state and don't clone AST

* test: 💍 add tests for Execution object

* test: 💍 improve expression test helpers

* test: 💍 add Execution tests

* refactor: 💡 improve required argument checking

* fix: 🐛 fix Kibana TypeScript errors

* test: 💍 add ExpressionsService unit tests

* fix: 🐛 fix Expression plugin TypeScript types

* refactor: 💡 prefix React component with React*

* fix: 🐛 fix X-Pack TypeScript errors

* fix: 🐛 fix test TypeScript errors

* fix: 🐛 fix issues preventing loading

* feat: 🎸 remove getInitialContext() handler

* fix: 🐛 fix TypeScript errors

* chore: 🤖 remove uicomponent interface

* chore: 🤖 remove missing import

* fix: 🐛 correctly handle .query in "kibana" expression function

* refactor: 💡 call first arg in expression functions "input"

* fix: 🐛 do not free Execution state container

* test: 💍 fix tests after refactor

* test: 💍 fix more tests after refactor

* fix: 🐛 remove redundant export

* test: 💍 update intepreter_functional test shapshots

* fix: 🐛 relax "kibana" function throwing on missin gsearch ctx

* refactor: 💡 don't use ExpressionAST interface in Canvas

* docs: ✏️ improve ExpressionRenderer JSDocs

* refactor: 💡 rename context.types to inputTypes in internal fn

* refactor: 💡 replace context.types by unknown in ExprFuncDef

* refactor: 💡 improve expression function definitions in OSS

* fix: 🐛 correctly set name on metric_vis_fn

* refactor: 💡 improve Lens definitions of expression functions

* refactor: 💡 improve Canvas expression function definitions

* test: 💍 add createMockExecutionContext() helper

* refactor: 💡 add some type to events$ observable in expr handler

* feat: 🎸 add types to observables in data handler

* refactor: 💡 use inputTypes in canvas

* fix: 🐛 fix interpreter grammer generation script

* feat: 🎸 allow array in getByAlias

* test: 💍 simplify test function specs

* test: 💍 fix autocomplete tests

* fix: 🐛 use correct expression types and NP getFunctions() API

* refactor: 💡 use NP expressions to get renderer

* fix: 🐛 use context.types on server-side Canvas function defs

* refactor: 💡 use NP API to register Canvas renderers

* feat: 🎸 use NP API to get types

* style: 💄 minor formatting changes

* feat: 🎸 use NP API to get expression functions

* fix: 🐛 fix Canvas workpads

* test: 💍 add missing mock functions

* refactor: 💡 improve Lens func definition argument types

* fix: 🐛 fix Lens type error

* feat: 🎸 make lens datatable work again

* feat: 🎸 bootstrap ExpressionsService on server-side

* feat: 🎸 expose more registry related functions in contract

* feat: 🎸 add environment: server to server-side expressions

* docs: ✏️ add documentation

* test: 💍 add missing Jest mocks

* fix: 🐛 correct TypeScript type

* docs: ✏️ improve documentation

* fix: 🐛 make FunctionHelpDict type contain only Canvas functions

* fix: 🐛 fix merge conflict

* test: 💍 fix expression mocks

* fix: fix TypeScript disabled help type

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-12 09:26:48 +01:00
.ci Remove matrix build support (#54202) (#56170) 2020-01-28 16:55:29 -05:00
.github Remove CODEOWNERS (#55580) 2020-01-22 17:21:44 +01:00
bin
common/graphql
config Hide stderr git output during APM agent configuration (#52878) (#52890) 2019-12-12 17:58:40 +01:00
data
docs [7.x] Adding the Accessibility Statement to docs (#57153) (#57386) 2020-02-11 17:52:02 -05:00
examples Ui Actions explorer example (#57006) (#57315) 2020-02-11 12:01:37 -05:00
licenses
packages [7.x] Expressions refactor (#54342) (#57366) 2020-02-12 09:26:48 +01:00
rfcs/text Console to NP ready (#43346) (#45511) 2019-09-12 18:30:03 +02:00
scripts [7.x] 📕 Storybook for everyone (take 2) (#43529) (#54992) 2020-01-16 00:39:01 -08:00
src [7.x] Expressions refactor (#54342) (#57366) 2020-02-12 09:26:48 +01:00
tasks Generate a static parser, move tests to vis_type_timelion (#55299) (#55401) 2020-01-22 12:43:01 +03:00
test [7.x] Expressions refactor (#54342) (#57366) 2020-02-12 09:26:48 +01:00
typings [State Management] State syncing utilities (#53582) (#54454) 2020-01-13 10:10:56 +03:00
utilities remove use of experimental fs.promises api (#53346) (#53796) 2019-12-25 21:28:41 -07:00
vars Remove matrix build support (#54202) (#56170) 2020-01-28 16:55:29 -05:00
webpackShims [7.x] [kbn/ui-shared-deps] include polyfills, required by some… (#54784) 2020-01-14 12:55:29 -07:00
x-pack [7.x] Expressions refactor (#54342) (#57366) 2020-02-12 09:26:48 +01:00
.backportrc.json [backport-config] Adds 7.4 branch (#44402) 2019-08-29 10:11:53 -07:00
.browserslistrc
.editorconfig
.eslintignore Check for legacy imports in vis types and fix problems (#56763) (#57188) 2020-02-10 17:28:05 +01:00
.eslintrc.js Check for legacy imports in vis types and fix problems (#56763) (#57188) 2020-02-10 17:28:05 +01:00
.gitattributes
.gitignore Instrument Kibana with Elastic APM (#43548) (#52186) 2019-12-04 17:04:12 +01:00
.i18nrc.json Kibana app migration: Move static code dependencies into kibana_legacy plugin, part 1 (#56408) (#57095) 2020-02-07 15:22:55 +01:00
.node-version Update Node.js to version 10.19.0 (#56940) (#56941) 2020-02-06 07:33:19 -08:00
.nvmrc Update Node.js to version 10.19.0 (#56940) (#56941) 2020-02-06 07:33:19 -08:00
.prettierrc
.sass-lint.yml Vislib replacement toggle (#56439) (#56719) 2020-02-04 08:04:27 -06:00
.yarnrc
api-documenter.json Normalize EOL symbol in platform docs (#56021) (#56041) 2020-01-27 21:04:26 +01:00
CONTRIBUTING.md [7.x] Remove Kibana a11y guide in favor of EUI (#57021) (#57134) 2020-02-07 14:45:01 -05:00
FAQ.md
github_checks_reporter.json
Gruntfile.js autofix all violations 2019-12-13 23:55:01 -07:00
Jenkinsfile Remove matrix build support (#54202) (#56170) 2020-01-28 16:55:29 -05:00
kibana.d.ts Update eslint related packages (#48513) (#48853) 2019-10-22 06:41:28 -07:00
LICENSE.txt
NOTICE.txt [SIEM][Detection Engine] Final final rule changes (#56806) (#56819) 2020-02-04 21:10:53 -07:00
package.json [7.x] Bump backport to 4.9.0 (#57293) (#57338) 2020-02-11 10:43:01 -08:00
preinstall_check.js
README.md [7.x] chore: point issue links to choose (#49616) (#49648) 2019-10-29 20:37:52 +01:00
renovate.json5 De-angularize vis tooltips (#54954) (#55432) 2020-01-21 15:03:34 -06:00
STYLEGUIDE.md [7.x] Remove Kibana a11y guide in favor of EUI (#57021) (#57134) 2020-02-07 14:45:01 -05:00
tsconfig.browser.json
tsconfig.json [Metric] convert mocha tests to jest (#54054) (#55210) 2020-01-17 13:33:46 -06:00
tsconfig.types.json
TYPESCRIPT.md [7.x] Update deprecated React.SFC and React.StatelessComponent types (#50852) (#51336) 2019-11-22 13:12:30 +01:00
yarn.lock Updating to kind-of@6.0.3 (#57367) (#57378) 2020-02-11 15:47:11 -08:00

Kibana

Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.

Getting Started

If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.

Using a Kibana Release

If you want to use a Kibana release in production, give it a test run, or just play around:

Building and Running Kibana, and/or Contributing Code

You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:

Documentation

Visit Elastic.co for the full Kibana documentation.

For information about building the documentation, see the README in elastic/docs.

Version Compatibility with Elasticsearch

Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.

Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.

Situation Example Kibana version Example ES version Outcome
Versions are the same. 5.1.2 5.1.2 💚 OK
ES patch number is newer. 5.1.2 5.1.5 ⚠️ Logged warning
ES minor number is newer. 5.1.2 5.5.0 ⚠️ Logged warning
ES major number is newer. 5.1.2 6.0.0 🚫 Fatal error
ES patch number is older. 5.1.2 5.1.0 ⚠️ Logged warning
ES minor number is older. 5.1.2 5.0.0 🚫 Fatal error
ES major number is older. 5.1.2 4.0.0 🚫 Fatal error

Questions? Problems? Suggestions?

  • If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
  • Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.