In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
Fixes#31828
To avoid a timeout we've seen fail 11 times since the end of January by moving the test into an integration test. The test starts up TypeScript, so it's clearly an integration test, and by moving it into an integration test it can have more time to run.
Fixes#31913
There have been 6 failures in this test in the last 60 days, which I believe is caused by a race condition of some sort that prevents us from accessing the file right after it's been written. It might have to do with writeStreams not actually flushing to the filesystem within time, but I haven't been able to prove it. @mikecote is taking a look at seeing if he can do some simple testing to reproduce the situation locally.
In order to avoid further errors this PR updates to use the `fs.copyFile` function that was added in node 8.5, which does the whole copy in a single native operation.
* bump typescript version to 3.3.3333
* fix tests after updating TS version
* suppress type errors until they fixed appropriately
* address comments
* add type def for UnconnectedKibanaLink
* remove fix @ts-ignore
* fix snapshot test. provide displayName
* udpate jest, jest-cli, @types/jest to v24
* fix type error in kibana-i18n package
* return serivce explicitly to fix typings
* add explicit never
* suppress typings errors
* update jest versions in x-pack
* make tests in x-pack more robust and fix incompatibility
* suppress CallCluster mock typings
Mock interface doesn't match CallCluster. Requires
additional work
* x-pack. resolve other typing conflicts
* remove unused types/jest
* fix snapshots
* restore mocks after jest.spyOn
* remove outdated definitions for jest
* cleanup x-pack package.json and update @types/jest
* fix tests merged from master
* updated yarn.lock and log errors for scripts/type_check
* This commit fixes error in TS, which failed on parsing the file.
* suppress type errors from master
* jest-cli is devDep
Closes https://github.com/elastic/kibana/issues/32161
All the elements are loaded in the router, so loading the from the component just duplicates the work.
This is actually left-over code from before we had a router. Apparently I missed this lifecycle when adding the router, so it's been an issue in Canvas for quite some time now.
### Stats
Workpad | Previous load time | PR load time
-- | -- | --
Elastic{ON} Tour Dallas: Canvas v3 | 10 seconds | 7 seconds
Kibana Canvas - Your data, your way. | 32 seconds | 18 seconds
*Time from when the Canvas loading indicator goes away and the workpad app renders to when the loading indicator stops spinning*
* fix client validation for rollup index name
* remove wrapper object in constants file
* move support for "*" illegal character to common constants file
Fixes a regression introduced in #31692. The table interval selection wasn't properly restored from `AppState` because of a mismatch in the expected object structure.
Windows has a maximum path length of 260 characters. We're approaching this limit so this adds a build task to check for any path > 200 characters.
200 + C:/ + path + kibana = total. Rough estimation.
* [APM] closes#18114 by trunctating db statements in span flyout by default but allowing toggle between preview and full content.
* Made component more tolerant of changes in props/children by checking for clipping on each update
* [APM] simplify component by enforcing the prop previewHeight is a number and use it for calculation
* Fix hardcoded plugin name and license modes in common license checker
* Fix licensePreRoutingFactory scope issues
* PR feedback adjustments
* Use minimum license string instead of array of valid license
* Pass plugin name instead of ID for UX
* Return license status instead of `showLinks` and other flags
* Adjust factory closure for readability
* Fix test
* Additional PR feedback:
* Move license status constants to `/common`
* Internationalize plugin names that are passed to check license, and its error messages
* Remove `isAvailable` flag, change pre-routing logic to use `LICENSE_STATUS.VALID` instead
* Change constant `INACTIVE` to `EXPIRED`
* Convert check license test from mocha to jest
* Fix test
* fixing issues with maximum documents and maximum size being set
* removing defaults from ES policy load and removing unneeded propTypes
* fixing react warnings about controlled -> uncontrolled
* fixing tests
* more fixes for react controlled -> uncontrolled errors
* better fix for react warnings through empty default phases
* removing unused translation
* removing unnecessary async/awaits in onChange handlers
* Added a feature of rollup search on the UI side
Signed-off-by: Alexey Antonov <alexwizp@gmail.com>
* Rollup Feature - initial commit
* Revert "Added a feature of rollup search on the UI side"
This reverts commit 9568b0970b16f5102f50b748bb4d691a8612c2c2.
# Conflicts:
# src/legacy/core_plugins/metrics/public/components/index_pattern.js
* Remove the 'label' property from the search strategies
* Changed search by strategy from the last
* add single search request
* rollup_search_strategy add base implementation of isViable method
* rollup_search_strategy add base implementation of isViable method -fix
* Changed requests due to search request type
* refactoring of import Base classes / remove '../../../../../../
* remove extra await
* rollup_search_strategy. Refactoring of isRollupJobExists method
* remove question
* Add support of annotations and table data
* skeleton for adding Search Strategy restrictions
* Add rollup search capabilities
* apply search strategy for annotations request
* set fields capabilities for rollup strategy
* add timezone, interval into SearchCapabilities
* Add fields from capabilities
* add timezone, interval into SearchCapabilities
* fix default timezone
* Merging of two Rollup Jobs was removed
* move getFieldsForWildcard to searchStrategy
* Fix TSVB search requests should have a timeout
# Conflicts:
# src/legacy/core_plugins/metrics/server/lib/vis_data/get_annotations.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/series/get_request_params.js
* Add unit test
* apply getEsShardTimeout for annorations/get_request_params, series/get_request_params
* rename metrics -> tsvb
* search_strategies_register refactoring: move 'add' method from class
* Add merge rollup capabilities with fields
* Add merge rollup capabilities with fields - small fixes
* Add support of 'Everything' aggregation for Rollup Search
* Return back metrics plugin
* remove 'metrics' from the X-pack\rollup require
* Fix test cases
* fix broken test: fail: "apis InfraOps GraphQL Endpoints metrics should basically work"
* rollup search - split by terms is not working
* Add count metric
* /get_bucket_size.js. Add support of 'auto' interval, Add support of gte intervals e.g.: >=1m
* fix build_request_body test
* [Rollup] [Phase 1] Error handling - rollup search errors should be more user friendly
* [Rollup] [Phase 1] Table View - research the query to ES - sorting is not wokring
* Merge #26006 into rollup
# Conflicts:
# src/legacy/core_plugins/metrics/server/lib/vis_data/annorations/build_request_body.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/get_annotations.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/get_series_data.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/get_table_data.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/request_processors/annotations/query.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/series/__tests__/build_request_body.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/series/build_request_body.js
# src/legacy/core_plugins/metrics/server/lib/vis_data/series/get_request_params.js
* Add table view support
* fix broken build
* fix broken build
* [Rollup] [Phase 1] - write new tests (rollup_search_request, rollup_search_strategy)
* [Rollup] [Phase 1] - write tests for rollup_search_capabilities
* Add test on default_search_capabilities, abstract_search_strategy, search_strategies_register
* Add test cases for search_requests folder
* [Rollup] [Phase 1] - write tests for rollup_search_strategy
* FIx broken build
* remove todo
* fix calculation of interval value for rollup search
* add unit tests
* Remove default exports
* fix PR comments
* fix calendar intervals