Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into alert…
Browse files Browse the repository at this point in the history
…ing/decrypt-error-on-migration-eso
  • Loading branch information
ymao1 committed Jul 22, 2021
2 parents c1e8afd + abee36d commit b1cae5f
Show file tree
Hide file tree
Showing 68 changed files with 1,666 additions and 756 deletions.
2 changes: 1 addition & 1 deletion docs/dev-tools/painlesslab/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ beta::[]
The *Painless Lab* is an interactive code editor that lets you test and
debug {ref}/modules-scripting-painless.html[Painless scripts] in real-time.
You can use the Painless scripting
language to create <<scripted-fields, {kib} scripted fields>>,
language to create <<runtime-fields, {kib} runtime fields>>,
process {ref}/docs-reindex.html[reindexed data], define complex
<<watcher-create-advanced-watch, Watcher conditions>>,
and work with data in other contexts.
Expand Down
6 changes: 2 additions & 4 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,11 @@ out through *Advanced Settings*. *Default: `true`*
| Set this value to true to allow Vega to use any URL to access external data
sources and images. When false, Vega can only get data from {es}. *Default: `false`*

a|
`xpack.discoverEnhanced.actions.`
|[[settings-explore-data-in-context]] `xpack.discoverEnhanced.actions.`
`exploreDataInContextMenu.enabled`
| Enables the *Explore underlying data* option that allows you to open *Discover* from a dashboard panel and view the panel data. *Default: `false`*

a|
`xpack.discoverEnhanced.actions.`
|[[settings-explore-data-in-chart]] `xpack.discoverEnhanced.actions.`
`exploreDataInChart.enabled`
| Enables you to view the underlying documents in a data series from a dashboard panel. *Default: `false`*

Expand Down
32 changes: 9 additions & 23 deletions docs/user/dashboard/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -265,33 +265,19 @@ Copy panels from one dashboard to another dashboard.
[[explore-the-underlying-documents]]
== Explore the underlying documents

To gain insight to the data, open the underlying panel or data series documents in *Discover*. The panel documents that you open in *Discover* have the same time range and filters as the source panel.
You can add additional interactions that allow you to open *Discover* from dashboard panels. To use the interactions, the panel must use only one index pattern.

[float]
[[explore-underlying-panel-documents]]
=== Explore the underlying panel documents

When your visualization panel contains a single index pattern, you can open the panel documents in *Discover*.

. Open the panel menu.

. Click *Explore underlying data*.
Panel interaction:: Opens the data in *Discover* with the current dashboard filters, but does not take the filters
saved with the panel.
+
[role="screenshot"]
image::images/explore_data_context_menu.png[Explore underlying data from panel context menu]
To enable panel interactions, refere to <<settings-explore-data-in-context,`xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled`>>.

[float]
[[explore-underlying-data-series-documents]]
=== Explore the underlying data series documents

To gain insight to a data series, open the documents in *Discover*.

. Click the data series in the panel that you want to view.

. Select *Explore underlying data*.
Series interaction::
Opens the series data in *Discover* from inside the panel.
+
[role="screenshot"]
image::images/explore_data_in_chart.png[Explore underlying data from chart]
To enable series interactions, refer to <<settings-explore-data-in-chart,`xpack.discoverEnhanced.actions.exploreDataInChart.enabled`>>.

NOTE: In {kib} 7.13 and earlier, the panel interaction was enabled by default.

[float]
[[download-csv]]
Expand Down
Binary file not shown.
Binary file removed docs/user/dashboard/images/explore_data_in_chart.png
Binary file not shown.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@
"copy-webpack-plugin": "^6.0.2",
"cpy": "^8.1.1",
"css-loader": "^3.4.2",
"css-minimizer-webpack-plugin": "^1.3.0",
"cssnano": "^4.1.11",
"cypress": "^6.8.0",
"cypress-cucumber-preprocessor": "^2.5.2",
"cypress-multi-reporters": "^1.4.0",
Expand Down Expand Up @@ -742,7 +742,11 @@
"grunt-peg": "^2.0.1",
"gulp": "4.0.2",
"gulp-babel": "^8.0.0",
"gulp-brotli": "^3.0.0",
"gulp-postcss": "^8.0.0",
"gulp-sourcemaps": "2.6.5",
"gulp-terser": "^2.0.1",
"gulp-gzip": "^1.4.2",
"gulp-zip": "^5.0.2",
"has-ansi": "^3.0.0",
"hdr-histogram-js": "^1.2.0",
Expand Down Expand Up @@ -830,6 +834,7 @@
"tempy": "^0.3.0",
"terminal-link": "^2.1.1",
"terser-webpack-plugin": "^2.1.2",
"terser": "^5.7.1",
"ts-loader": "^7.0.5",
"ts-morph": "^9.1.0",
"tsd": "^0.13.1",
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-ui-shared-deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ SRC_DEPS = [
"@npm//abortcontroller-polyfill",
"@npm//angular",
"@npm//babel-loader",
"@npm//compression-webpack-plugin",
"@npm//core-js",
"@npm//css-minimizer-webpack-plugin",
"@npm//css-loader",
"@npm//fflate",
"@npm//jquery",
Expand All @@ -67,7 +65,6 @@ SRC_DEPS = [
"@npm//rxjs",
"@npm//styled-components",
"@npm//symbol-observable",
"@npm//terser-webpack-plugin",
"@npm//url-loader",
"@npm//val-loader",
"@npm//whatwg-fetch"
Expand Down
86 changes: 16 additions & 70 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@
*/

const Path = require('path');

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const CompressionPlugin = require('compression-webpack-plugin');
const { REPO_ROOT } = require('@kbn/utils');
const { RawSource } = require('webpack-sources');

const UiSharedDeps = require('./src/index');

const MOMENT_SRC = require.resolve('moment/min/moment-with-locales.js');
const WEBPACK_SRC = require.resolve('webpack');

module.exports = {
node: {
child_process: 'empty',
fs: 'empty',
},
externals: {
module: 'module',
},
mode: 'production',
entry: {
'kbn-ui-shared-deps': './src/entry.js',
Expand All @@ -30,19 +33,19 @@ module.exports = {
'kbn-ui-shared-deps.v8.light': ['@elastic/eui/dist/eui_theme_amsterdam_light.css'],
},
context: __dirname,
// cheap-source-map should be used if needed
devtool: false,
devtool: 'cheap-source-map',
output: {
path: UiSharedDeps.distDir,
filename: '[name].js',
sourceMapFilename: '[file].map',
devtoolModuleFilenameTemplate: (info) =>
`kbn-ui-shared-deps/${Path.relative(REPO_ROOT, info.absoluteResourcePath)}`,
library: '__kbnSharedDeps__',
futureEmitAssets: true,
},

module: {
noParse: [MOMENT_SRC],
noParse: [MOMENT_SRC, WEBPACK_SRC],
rules: [
{
include: [require.resolve('./src/entry.js')],
Expand Down Expand Up @@ -102,35 +105,17 @@ module.exports = {
resolve: {
alias: {
moment: MOMENT_SRC,
// NOTE: Used to include react profiling on bundles
// https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977#webpack-4
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
},
extensions: ['.js', '.ts'],
symlinks: false,
},

optimization: {
minimizer: [
new CssMinimizerPlugin({
parallel: false,
minimizerOptions: {
preset: [
'default',
{
discardComments: false,
},
],
},
}),
new TerserPlugin({
cache: false,
sourceMap: false,
extractComments: false,
parallel: false,
terserOptions: {
compress: true,
mangle: true,
},
}),
],
minimize: false,
noEmitOnErrors: true,
splitChunks: {
cacheGroups: {
Expand All @@ -155,44 +140,5 @@ module.exports = {
new MiniCssExtractPlugin({
filename: '[name].css',
}),
new CompressionPlugin({
algorithm: 'brotliCompress',
filename: '[path].br',
test: /\.(js|css)$/,
cache: false,
}),
new CompressionPlugin({
algorithm: 'gzip',
filename: '[path].gz',
test: /\.(js|css)$/,
cache: false,
}),
new (class MetricsPlugin {
apply(compiler) {
compiler.hooks.emit.tap('MetricsPlugin', (compilation) => {
const metrics = [
{
group: 'page load bundle size',
id: 'kbnUiSharedDeps-js',
value: compilation.assets['kbn-ui-shared-deps.js'].size(),
},
{
group: 'page load bundle size',
id: 'kbnUiSharedDeps-css',
value:
compilation.assets['kbn-ui-shared-deps.css'].size() +
compilation.assets['kbn-ui-shared-deps.v7.light.css'].size(),
},
{
group: 'page load bundle size',
id: 'kbnUiSharedDeps-elastic',
value: compilation.assets['kbn-ui-shared-deps.@elastic.js'].size(),
},
];

compilation.emitAsset('metrics.json', new RawSource(JSON.stringify(metrics, null, 2)));
});
}
})(),
],
};
1 change: 1 addition & 0 deletions src/dev/build/build_distributables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
await run(Tasks.TranspileBabel);
await run(Tasks.CreatePackageJson);
await run(Tasks.InstallDependencies);
await run(Tasks.GeneratePackagesOptimizedAssets);
await run(Tasks.CleanPackages);
await run(Tasks.CreateNoticeFile);
await run(Tasks.UpdateLicenseFile);
Expand Down
Loading

0 comments on commit b1cae5f

Please sign in to comment.