Commit graph

281 commits

Author SHA1 Message Date
Chandler Prall
84d7b9e4ac
Upgrade EUI to v30.6.0 and update jest snapshots (#85504) 2020-12-14 15:18:29 -07:00
Poff Poffenberger
cda3627a79
[Reporting/PDF] Layout option for generating full-page Canvas reports (#84959)
* [Reporting/PDF] Custom layout option for Canvas

* fix snapshots

* --wip-- [skip ci]

* check pdf data

* add test

* functional tests work

* add fixme comment

* read strings from pdf for test

* Update reports.ts

* function name / comment improvment

* Add Canvas toggle to choose pdf layout type

* Fix Canvas pdf panel storybook test

* Update style for new Canvas report type switch

* Update canvas share menu snapshot

* Fix tests for validating Canvas PDF using inline snapshots

Run test server with:
node scripts/functional_tests_server.js --config x-pack/test/functional/config.js

Run test suite with:
node scripts/functional_test_runner.js --config x-pack/test/functional/config.js --grep 'Canvas PDF Report'

* Fix i18n and typo

* Add a test for removing borders

* Fix i18n

* Update snapshot

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-10 13:34:47 -06:00
Joel Griffith
9073aec955
[Reporting] Bump puppeteer 5.4.1 + roll chromium rev (#85066)
* Update puppeteer + new headless shell bin

* Bump types for pptr

* Fix broken mock for pptr
2020-12-04 14:50:07 -08:00
Chandler Prall
2f72c8ad10
Upgrade EUI to v30.5.1 (#84677)
* Updated to eui@30.4.1, fixed types and unit tests

* Cleanup some imports

* Fix a text color swap, now back to danger text

* Bump EUI to v30.4.2

* Revert snapshot changes from ownFocus modification

* Clean up alert flyout test actions to better represent user actions

* Upgrade EUI to 30.5.1

* More accurate test interaction

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 09:39:03 -07:00
Brandon Kobel
f9ade905a2
Deprecate reporting.index setting (#84005)
* Deprecating `xpack.reporting.index` setting

* Adding unit test

* Now with more standard deprecation messages

* Updating the xpack.reporting.index docs

* Fixing tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-03 06:42:32 -08:00
Tyler Smalley
b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Alejandro Fernández Haro
cb55898c98
[UsageCollection] Remove formatBulkUpload and other unused APIs (#84313)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-30 11:30:47 +00:00
Mikhail Shustov
5ec6fe315f
[DX] Bump TS version to v4.1 (#83397)
* bump version to 4.1.1-rc

* fix code to run kbn bootstrap

* fix errors

* DO NOT MERGE. mute errors and ping teams to fix them

* Address EuiSelectableProps configuration in discover sidebar

* use explicit type for EuiSelectable

* update to ts v4.1.2

* fix ts error in EuiSelectable

* update docs

* update prettier with ts version support

* Revert "update prettier with ts version support"

This reverts commit 3de48db3ec.

* address another new problem

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2020-11-24 16:04:33 +01:00
Mikhail Shustov
95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Jonathan Budzenski
6c23302b36
[cli] Add bin/kibana-encryption-keys (#82838)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2020-11-19 12:41:48 -06:00
Joel Griffith
e07d6d0b38
Derive the port from the protocol in cases where it's not explicitly stated (#83583) 2020-11-18 08:19:41 -08:00
Alejandro Fernández Haro
484437f66d
[UsageCollection] Expose KibanaRequest to explicitly opted-in collectors (#83413) 2020-11-18 08:32:33 +00:00
Tyler Smalley
aba2068291
Consolidates Jest configuration files and scripts (#82671)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-12 16:19:56 -08:00
Thomas Watson
4c49d5d1be
Upgrade Node.js to version 12 (#61587) 2020-11-12 22:00:57 +01:00
Tim Sullivan
4932dc55a6
[Reporting] Move "common" types and constants to allow cross-plugin integration (#83198) 2020-11-12 08:58:05 -07:00
Thomas Watson
700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +01:00
Thomas Watson
1407f713e5
Update KibanaRequest to use the new WHATWG URL API (#80713) 2020-10-29 14:35:48 +01:00
Joel Griffith
932e92b8ad
Make sure to is 'now' and not the same as from (#81524)
* Make sure `to` is 'now' and not the same as `from`

* Revert "Make sure `to` is 'now' and not the same as `from`"

This reverts commit 48e8d08213.

* Ensure `to` is properly rounded up to prevent `from` and `to` being identical

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-26 15:24:29 -07:00
Tim Sullivan
ae95bf2b05
[Reporting/Tech Debt] Convert PdfMaker class to TypeScript (#81242)
* convert pdf.js to TS

* more typescript

* simplify caller

* more typescript

* more typescript

* fix the code to match the expected interface

* very cool comment

* interface correction

* remove unused class method

* add unit test for PdfMaker

* file rename for typo correction

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-21 13:54:52 -07:00
Chandler Prall
42a1744af6
Upgrade EUI to v29.5.0 (#80753)
* Upgraded eui to v29.5.0; snapshot updates

* Cleaned up some types

* addresses feedback on types change

* Update EuiIcon snapshots in jest integration tests

* Updated snapshot from rebasing on master
2020-10-19 14:48:33 -06:00
Vadim Dalecky
fc5ad4d859
Lazy load reporting (#80492)
* perf: ️ load dynamically reporting management section

* refactor: 💡 remove JSX from main plugin entry file

* perf: ️ lazy-load CSV sharing panel React component

* perf: ️ lazy-load screen capture sharing panel React components

* feat: 🎸 show spinner while shring panels are loading
2020-10-16 10:54:46 +02:00
Tim Sullivan
2fa083763b
[Reporting] Config Schema Validation for rules[N].protocol strings (#80766) 2020-10-15 16:14:23 -07:00
Tim Sullivan
f09aefb9e2
[Reporting] Add context to logging about Space ID handling (#80106)
* [Reporting] Logger Fixes

* info level to debug level for default space message

* fix context for custom logo

* fix tags

* Update x-pack/plugins/reporting/server/core.ts

Co-authored-by: Joel Griffith <joel@joelgriffith.net>

* rm whitespace

* one more backtick string

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joel Griffith <joel@joelgriffith.net>
2020-10-13 15:22:26 -07:00
Christiane (Tina) Heiligers
70a9164790
[Usage Collection] Improves Collector fetch API (#79595)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-13 09:55:22 -07:00
Tiago Costa
e5d8d49164
chore(NA): assures a single version for the same dependency across the entire project (#78825)
* chore(NA): script to check for multiple version of same dependency

* chore(NA): remove multiple versions for the same dependency

* chore(NA): hook single_version_dependencies script into the CI

* chore(NA): remove grunt from the CI hook integration

* chore(NA): update kbn pm dist

* chore(NA): fix typechecking

* chore(NA): update code to run under last extract-zip version

* fix(NA): multiple versions of the same type dependency

* move validation to bootstrap (#13)

Co-authored-by: spalger <spalger@users.noreply.github.com>

* chore(NA): todo to remove logic to validate single version deps once we move into a single package.json

* chore(NA): remove verify dependency versions jenkins task

* chore(NA): update kbn pm dist file

* chore(NA): remove last mention to verify_dependency_versions.sh fom tasks.groovy

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 00:46:00 +01:00
Tyler Smalley
7211f78ce1
Bumps Jest related packages (#78720)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-10-01 14:38:51 -07:00
Alejandro Fernández Haro
66866d0af1
[Usage Collection] [schema] reporting + add MappedType support (#78591) 2020-09-29 19:00:09 +01:00
gchaps
dffd631217
[DOCS] Edits copy in Reporting Diagnostics tool (#77833)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:12:13 -07:00
Tim Sullivan
aa9131f641
[Reporting] Add Refresh parameter to Delete query (#78516)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:10:33 -07:00
Tim Sullivan
38f517ae9f
[Reporting] TS changes to reference an interface instead of class as the logger object (#78359)
* [Reporting] TS changes to reference an interface instead of class, making functions more shareable

* rename the interface

* less flexible interface
2020-09-24 08:54:34 -07:00
Matthew Kime
533309dc2c
Remove [key: string]: any; from IIndexPattern (#77968)
* Remove [key: string]: any; from IIndexPattern
2020-09-22 18:03:22 -05:00
Tim Sullivan
a537f9af50
[Reporting] Clean Up TypeScript Definitions (#76566)
* [Reporting] Simplify Export Type Definitions, use defaults for generics, refactor

* ReportApiJSON interface for common

* rename JobSummary to JobStatusBucket for clarity

* revert unneeded create mock changes

* clean up the diff

* revert changes to worker.js

* rewrite comment

* rename type to jobtype in JobStatusBucket

* allow type inference

* JobSummarySet

* remove odd comment

* Reflect that browser timezone may be undefined in the BaseParams

* comment about optional browserTimezone

* revert unecessary es archive change

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-22 12:33:59 -07:00
Tim Sullivan
b7cc6d3f2f
[Reporting/PDF] Switch layout to no border (#78036) 2020-09-22 10:34:25 -07:00
Tim Sullivan
6908fe7619
[Reporting] Use spaceId from request in export generation (#76998)
* [Reporting] Use spaceId from request in export generation

* remove todo that has been done

* whitespace

* use post params api in test

* add logging to core

* Update x-pack/plugins/reporting/server/export_types/printable_pdf/lib/get_custom_logo.ts

Co-authored-by: Joel Griffith <joel@joelgriffith.net>

* more logging

* fix interdependence and remove Promise.all

* getAbsoluteUrl have only 1 way to provide basePath

* --wip-- [skip ci]

* log apipath

* deleteAllReports at the end

* tests pass locally

* set config in the tests

* re-add skips of flaky tests

* test using csv:quoteValues

Co-authored-by: Joel Griffith <joel@joelgriffith.net>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-18 13:08:15 -07:00
Pierre Gayvallet
3759063e81
remove legacy ES plugin (#77703)
* remove legacy ES plug

* fix types

* delete some `legacy/core_plugins` references

* fix type
2020-09-18 09:30:13 +02:00
Tim Sullivan
d22c47d47b
[Reporting/Config] allow string representations of duration settings (#74202)
* [Reporting/Config] use better schema methods

* add createMockConfig

* update documentation

* fix observable.test

* add docs links to common options page

* make the schema match the docs

* wording edits per feedback

* self edits

* todo comment

* fix tests

* feedback change 1

* schema utils

* fix goof

* use objects for the defaults when available

* fix pollInterval

* fix snapshots

* Update report_listing.tsx

* call new ByteSizeValue on server side only

* revert xpack.reporting.poll

* fix ts

* fix snapshot

* use correct input for duration

* revert reorganize imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-17 12:04:01 -07:00
Matthias Wilhelm
0dc0f1f34c
[Discover] Migrate discover.html Angular template to React (#75784)
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2020-09-17 07:51:31 +02:00
Vadim Dalecky
ea56a32d51
Neutral-naming in reporting plugin (#77371)
* refactor: 💡 remove "blacklist" reference in reporting plugin

* refactor: 💡 remove "whitelist" in reporting plugin

* fix: 🐛 correctly import function after refactor

* refactor: 💡 use "blocked" instead of "denied" terminology
2020-09-14 22:08:04 +02:00
Larry Gregory
2e34eb239f
Hide management sections based on cluster/index privileges (#67791)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 09:30:47 -04:00
Joel Griffith
9edb8d9ae2
Reporting/diagnostics (#74314)
* WIP: Adding in new reporting diag tool

* WIP: chrome-binary test + log capturing/error handling

* More wip on diagnostic tool

* More work adding in diagnose routes

* Alter link in description + minor rename of chrome => browser

* Wiring UI to API + some polish on UI flow

* WIP: Add in screenshot diag route

* Adding in screenshot diag route, hooking up client to it

* Add missing lib check + memory check

* Working screenshot test + config check for RAM

* Small test helper consolidation + screenshot diag test

* Delete old i18n translations

* PR feedback, browser tests, rename, re-organize import statements and lite fixes

* Lite rename for consistency

* Remove old validate check i18n

* Add config check

* i18n all the things!

* Docs on diagnostics tool

* Fixes, better readability, spelling and more for diagnostic tool

* Translate a few error messages

* Rename of test => start_logs for clarity. Move to observables

* Gathering logs even during process exit or crash

* Adds a test case for the browser exiting during the diag check

* Tap into browser logs for checking output

* Rename asciidoc diag id

* Remove duplicate shared object message

* Add better comment as to why we merge events + wait for a period of time

* Cloning logger for mirroring browser stderr to kibana output

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-09 16:11:23 -07:00
Joel Griffith
fef21ab373
Adds back in custom images for reporting + tests (#76810) 2020-09-04 13:16:15 -07:00
Tim Sullivan
e4464a189f
[Reporting] rename interfaces to align with task manager integration (#76716)
* [Reporting] rename interfaces for schedule task

* move screenshot types to their local

* organize imports

* remove schedule terminology

* revert comment

* fix ts

* add newline
2020-09-03 21:20:00 -07:00
Tim Sullivan
ba9ad8d1fb
[Reporting/CSV] Do not fail the job if scroll ID can not be cleared (#76014)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-01 09:27:03 -07:00
Tim Sullivan
69a8d06129
[Reporting/Download CSV] Get the file name from savedSearch data (#76031)
* [Reporting/Download CSV] provide title even if panel \titles are hidden in the dashboard

* add functional test

* Update embeddable_panel.tsx

* Update download_csv.ts
2020-08-27 08:40:56 -07:00
Pierre Gayvallet
eee139295d
Migrate data folder creation from legacy to KP (#75527)
* rename uuid service to environment service

* adapt resolve_uuid to directly use the configurations

* move data folder creation to core

* update generated doc

* fix types

* fix monitoring tests

* move instanceUuid to plugin initializer context

* update generated doc
2020-08-26 21:40:03 +02:00
Greg Thompson
82e30f6eff
Upgrade EUI to v27.4.1 (#75240)
* eui to 27.4.1

* src snapshot updates

* x-pack snapshot updates

* remove increased default timeout

* revert date change

* delete default_timeout file

* reinstate storyshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 10:48:04 -06:00
Josh Dover
51a80c61a0
Add support for reading request ID from X-Opaque-Id header (#71019)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-19 15:41:12 -06:00
Tim Sullivan
e48a5672c0
[Reporting/JobListing] fix user ID for non-security in queries (#75365)
* [Reporting/JobListing] fix user ID for non-security in queries

* fix tests

* add fn api test

* fix ci

* revert TS exploration
2020-08-19 13:52:43 -07:00
Tim Sullivan
982402145c
[Reporting] Network Policy: Do not throw from the intercept handler (#75105)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-18 13:26:52 -07:00
Tim Sullivan
47d41437d9
[Reporting] Increase capture.timeouts.openUrl to 1 minute (#75207)
* [Reporting] Increase capture.timeouts.openUrl to 1 minute

* update the docs
2020-08-18 13:26:31 -07:00