Commit graph

46 commits

Author SHA1 Message Date
Spencer f466ebf1a3
[esArchiver] drop support for --dir, use repo-relative paths instead (#101345)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 17:37:42 -04:00
Spencer bdafd27e19
[ts] migrate x-pack/test to composite ts project (#101441)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 12:54:05 -04:00
Spencer 808b44f2c1
[kbn/test] move types/ftr into src (#99555)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:51:53 -07:00
Tiago Costa d079dae56d
skip failing es promotion suite (#99915) 2021-05-17 16:21:46 +01:00
Tim Sullivan 5a6eda2b22
[Reporting] Kibana Application Privileges for Reporting (#94966)
* Implement Reporting features as subfeatures of applications

* add setting to the docker list

* update doc images

* finish docs

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* typo fix

* "PDF / PNG Reports" => "Reporting"

* Update x-pack/plugins/reporting/server/config/index.ts

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Update x-pack/test/functional/apps/security/secure_roles_perm.js

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* update ids of report privileges

* combine dashboard privileges into 1 group

* update jest snapshot

* fix tests

* fix tests

* updates from feedback

* add note

* update screenshot

* fix grammer

* fix bad link breaks in doc

* update doc heading

* Apply suggestions documentation feedback

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* simplify

* use const assertions

* Apply text change suggestion from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* more test for oss_features and reporting subFeatures

* reduce loc diff

* fix snapshot

* fix flakiness in licensing plugin public functional tests

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-20 20:44:24 -07:00
Tim Sullivan 1615d5f62b
Reporting: Refactor functional tests with security roles checks (#96856)
* Reporting: Refactor functional tests with security roles checks

* consolidate initEcommerce calls

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-14 09:20:59 -07:00
Tim Sullivan f67f0e80e7
Reporting: Fix _index and _id columns in CSV export (#96097)
* Reporting: Fix _index and _id columns in CSV export

* optimize - cache _columns and run getColumns once per execution

* Update x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

* feedback

* fix typescripts

* fix plugin list test

* fix plugin list

* take away the export interface to test CI build stats

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Dokolin <dokmic@gmail.com>
2021-04-13 08:03:09 -07:00
spalger 5a9cff2644 skip suite failing es promotion (#96000) 2021-03-31 18:23:46 -07:00
Tim Sullivan 0fce2427e5
[Reporting] CSV Export: fix and unskip failing test (#95824)
* [Reporting] CSV Export: fix and unskip failing test

* fix snapshot extra records

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 13:12:19 -07:00
Tiago Costa 50313f75f6
chore(NA): enable preserve symlinks for ts without breaking packages development (#95433)
* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
2021-03-31 00:02:22 +01:00
Brian Seeders b95e5a996a skip failing suite blocking ES promotion (#95594) 2021-03-26 17:46:20 -04:00
Tim Sullivan ec41ae3c49
[Reporting-CSV Export] Re-write CSV Export using SearchSource (#88303)
* [Reporting-CSV Export] Re-write CSV Export using SearchSource

* replace PIT solution with scan-and-scroll

* update tests

* cleanup

* simplify pr

* update docs

* update docs

* update telemetry schema

* use getSearchRequestBody instead of flatten

* Revert "update docs"

This reverts commit ab9f4d9642.

* optimize some async calls

* cleanup

* --wip-- [skip ci]

* fix telemetry schema

* fix telemetry tests

* fix snapshot

* api docs

* api doc updates

* use import type

* format the data through chains of maps

* add another saved search to reporting/ecommerce_kibana

* add a failing test

* add error logging to query failures

* put clear scroll in a finally so the ES error can be captured

* log dat error

* set dat fieldsFromSource

* --wip-- [skip ci]

* Revert "add another saved search to reporting/ecommerce_kibana"

This reverts commit 6edf26eff2.

* functional test fixes

* clean up ecommerce test archive

* add test for new search with fieldsFromSource set

* add tests and refactor tests

* cleanup redundant conditionals

* add GenerateCsv.getFields

* fix some tests

* fix double-escaping

* fix test snapshots and refactoring

* fix other tests

* fix test

* fix default index pattern in functional tests

* fix ts and sort fields when they come from API response

* --wip-- [skip ci]

* fix formatting and increase maxSizeBytes for testing

* remove client-side logic for sanitizing fields

* do not prepend timefield name if it already is a column

* test the logic to prepend timeField

* test the logic to sort the fields

* fix functional test

* preserve the error from data.search

* add functional test for ES returning an error

* fix snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 11:54:47 -07:00
Tim Sullivan 366e085874
[Reporting/Test] label job param URL as deprecated in the variable name (#94639) 2021-03-15 16:55:38 -07:00
Tim Sullivan 9fef424bba
Switch Reporting to Task Manager (#64853)
* [Reporting] Task Manager

* fix startup

* use synchronous config for task registration

* fix eslint

* pr-90365

* --wip-- [skip ci]

* set maxConcurrency to 0 if pollEnabled is false

* add test for execute_report

* remove unused test file

* more tests

* remove unused test files

* remove priority

* logging cleanups

* fix for queue.pollEnabled: false

* more logging fixes for less duplicated code

* update jest snapshots

* polish

* remove unnecessary

* Update mapping.ts

* polish

* fix bug if instance gets a monitoring task and pollEnabled is false

* simplification

* cosmetic

* fix test

* stop monitoring task sabotage

* update api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 17:33:19 -07:00
Tim Sullivan 40fa961d53
[Reporting] Remove unused priority field (#92552)
* [Reporting] Remove unused priority field

* fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 10:41:08 -07:00
Rudolf Meijering fd1d965039
Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992)
* Revert "Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)""

This reverts commit f97958043f.

* Fix flaky saved objects management test #89953

* If a clone target exists, wait for yellow, not green, index status

* Fix test after master merge

* Fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-06 18:45:20 +01:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
spalger f97958043f Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)"
This reverts commit 03636a07fe.
2021-02-01 17:46:45 -07:00
Rudolf Meijering 03636a07fe
Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)
* Migrations V2 on by default

* esArchiver delete migrations v2 indices

* Fix saved_objects_management api_integration tests

* Try to fix v2 migrations for pre-release builds

* esArchiver delete auto-created v2 migration indices like .kibana_8.0.0

* Try to fix v2 migrations for pre-release builds

* Use require_alias to prevent auto-created saved objects index

* Wrap SO routes until core logs all internal errors

* Fix api_integration tests requiring an empty kibana index

* Delete corrupt saved object from lens archives

* Update docs

* Fix ui_settings tests

* Fix core jest tests

* Fix type errors

* Fix accessibility tests

* Fix plugin functional tests

* Fix api_integration tests after merging in master

* Fix plugin functional tests #2

* EsArchiver: Don't reset ui settings after the .kibana index was deleted

* Fix functional management/visualize tests

* Fix oss security functional tests

* EsArchiver clean task manager indices to fix alerting api integration tests

* migrationsv2 correctly handle unknown saved object type mappings

* Revert "Try to fix v2 migrations for pre-release builds"

This reverts commit a1a1567501.

* Revert "Try to fix v2 migrations for pre-release builds"

This reverts commit a9a935558c.

* Re-enable v2 migrations in tests after merging in master

* Try to fix async dashboard functional test

* Restore UiSettings defaults after emptyKibanaIndex()

* Review feedback: rename test to match behaviour
2021-02-01 15:46:16 +01:00
Rudolf Meijering c8afae8a51
Enable v2 so migrations, disable in FTR tests (#89297)
* Enable v2 so migrations, disable in FTR tests

* Disable v2 migrations for ui_settings integration tests

* Disable v2 migrations for reporting without serucity api integration test
2021-01-27 12:13:15 +01:00
Tiago Costa 69182a8628
chore(NA): create new x-pack cigroups and rebalancing them all (#88366)
* chore(NA): create new x-pack cigroups and rebalancing them all

* chore(NA): better cigroups balancing

* chore(NA): push rollup tests back into ciGroup1

* chore(NA): move some functional ml tests from cigroup3 into cigroup13

* chore(NA): move some more tests into ciGroup13

* chore(NA): use a single top level describe at x-pack/test/functional/apps/ml

* chore(NA): move settings into ciGroup13

* temporary test for es snapshots env

* Revert "temporary test for es snapshots env"

This reverts commit 789ebe7b9c.

* docs(NA): add missing documentation on the function tests describe split

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 13:47:08 +00:00
Robert Oskamp b36273693a
Functional tests - stabilize reporting API network policy test for cloud (#88456)
This PR fixes a reporting API network policy test failure that occurred during cloud execution.
2021-01-15 17:58:33 +01:00
Robert Oskamp 2b3fe1f7da
Functional tests - stabilize reporting tests for cloud execution (#83787)
This PR fixes some reporting API test failure that occurred during cloud execution.
2020-11-20 05:47:25 +01:00
Thomas Watson 4c49d5d1be
Upgrade Node.js to version 12 (#61587) 2020-11-12 22:00:57 +01:00
Tim Sullivan 23b9465e37
[Reporting] Add functional test for new jobs (#79599)
* [Reporting] Add functional test for finding new jobs in the reporting table

* comment moving

* remove unecessary and use the existing x-pack page objects

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-13 13:13:24 -07:00
Tim Sullivan 46e1c5b0f9
[Reporting/Usage] Unskip failing test (#79172)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 09:18:29 -07:00
Tim Sullivan 82cad2cb90
[Reporting] API Integration tests: fix flaky tests for Spaces CSV formatting (#78849)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-30 12:01:32 -07:00
spalger ace38b4ad4 skip flaky suite (#78494) 2020-09-24 14:34:19 -07:00
Tim Sullivan a23a5c3864
[Reporting/Fn Tests] Wait longer for reports to finish (#78190)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 11:07:18 -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
Tyler Smalley 9acf8d2656
Adds @kbn/utils package (#76518)
Moves common utility functions to obtain the repository root,
paths (config/data), and Kibana package.json to a @kbn/utils package.
Moving these existing functions allows them to be used in production, in
other packages because of Kibana.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-09-15 10:34:39 -07:00
Tim Sullivan 791a73c1eb
Reporting/Test: unskip non-screenshot tests (#77088) 2020-09-09 14:42:30 -07:00
spalger 46aef4b1e0 skip failing suite (#76581) 2020-09-02 15:18:37 -07:00
spalger d9dc47ef36 skip flaky suite (#76551) 2020-09-02 12:17:49 -07:00
Tim Sullivan a3af33ddaf
[Reporting] Add functional test for Reports in non-default spaces (#76053)
* [Reporting] Add functional test for Download CSV in non-default space

* skip tests

* unskip

* rm comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-01 16:55:04 -07:00
Mikhail Shustov 37ec1e1053
Update to TS v4 (#73924)
* bump ts to v4

* MOAR RAM

* fix type errors for OSS

* first pass on x-pack errors

* second pass on x-pack type errors

* 3rd pass on x-pack type-errors

* mute errors if complex cases

* don't delete if spread suffices

* mute other complex cases

* make User fields optional

* fix optional types

* fix tests

* fix typings for time_range

* fix type errors in x-pack/tests

* rebuild kbn-pm

* remove leftovers from master update

* fix alert tests

* [Telemetry Checker] TS4 Fixes

* bump to 4.0.1-rc

* fix new errors in master

* bump typescript-eslint to version supporting TS v4 syntax

* fix merge commit errors

* update to the stable TS version 4.0.2

* bump ts-eslint to version supporting ts v4

* fix typo

* fix type errors after merge

* update ts in another new package.json

* TEMP: remove me

* Revert "TEMP: remove me"

This reverts commit dc0fc3bae6.

* [Telemetry] Update snapshot for new TS4 SyntaxKind

* bump prettier to support TS v4 syntax

* fix prettier rules

* last style change

* fix new type errors

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2020-08-27 10:28:02 +02: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 e00d7d279a
[Reporting] Handle error gracefully when browser driver unexpectedly exits or crashes. (#71989)
* [Reporting] Handle page error event directly with Puppeteer

* clean up logger.error that was stringifying error

* use fromEvent

* better handling and error messaging if browser was closed in the middle of the screenshot pipeline

* fix pdf functional api tests

* fix i18n error

* fix jest

* fix ts

* fix i18n

* tweaks

* ok to throw error in callback

* fix ts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-03 16:03:13 -07:00
Tim Sullivan 2340f8a59b
[Reporting] Formatting fixes for CSV export in Discover, CSV download from Dashboard panel (#67027)
* [Reporting] Data formatting fixes for CSV export in Discover, CSV download from Dashboard panel

commit e195964deaa3e7e8d94704d6514e01498c913a81
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Mon Jul 13 10:17:36 2020 -0700

    Squashed commit of the following:

    commit 87c9c496a6cccaf7a60a44b496f7c0c0423cd2ea
    Merge: d531101ab3 ed749eb5ad
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:17:02 2020 -0700

        Merge branch 'data/allow-custom-formatting' into reporting/csv-date-format-consistency

    commit d531101ab3c2f12628287bd5ad4a02bbf8b5c990
    Merge: 400e2ffba4 17dc0439e2
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:15:38 2020 -0700

        Merge branch 'master' into reporting/csv-date-format-consistency

    commit ed749eb5ad
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:12:28 2020 -0700

        move shared code to common

    commit 4e5eebd93b
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 09:07:32 2020 -0700

        3td time api doc chagens

    commit 34df3318bf
    Merge: 54fa2fe97f 17dc0439e2
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 08:50:21 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 400e2ffba4546cf78c53ce96b45a59878f0df076
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Sun Jul 12 21:29:34 2020 -0700

        [Reporting] Data formatting fixes for CSV export in Discover, CSV download from Dashboard panel

    commit 54fa2fe97f
    Merge: 1b6e9e8719 e1253ed047
    Author: Elastic Machine <elasticmachine@users.noreply.github.com>
    Date:   Sun Jul 12 22:18:38 2020 -0600

        Merge branch 'master' into data/allow-custom-formatting

    commit 1b6e9e8719
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 10 15:03:08 2020 -0700

        weird api change needed but no real diff

    commit fc9ff7be61
    Merge: 736e9eecdd 66c531d903
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 10 14:51:51 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 736e9eecdd
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 17:43:10 2020 -0700

        fix path for tests

    commit 1bebcc83e6
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 17:25:09 2020 -0700

        re-use public code in server, add test

    commit 1e1d3c58ab
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:35:30 2020 -0700

        rerun api changes

    commit 231f793943
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:31:55 2020 -0700

        fix src/plugins/data/public/field_formats/constants.ts

    commit d42275cfeb
    Merge: 206aed6210 8e2277a667
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:01:40 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 206aed6210
    Merge: 5aa2d802ec 09da11047d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 15:03:12 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 5aa2d802ec
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Wed Jul 8 12:12:31 2020 -0700

        api doc changes

    commit 76e2c307e7
    Merge: 1789afcdc9 595e9c2d8d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Wed Jul 8 12:04:12 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 1789afcdc9
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 3 11:23:03 2020 -0700

        simplify changes

    commit 6428455873
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 2 16:05:57 2020 -0700

        add more to tests - need help though

    commit 6aacfbd25d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 2 12:04:28 2020 -0700

        [Data Plugin] Allow server-side date formatters to accept custom timezone

        When Advanced Settings shows the date format timezone to be "Browser,"
        this means nothing to field formatters in the server-side context. The
        field formatters need a way to accept custom format parameters. This
        allows a server-side module that creates a FieldFormatMap to set a
        timezone as a custom parameter. When custom formatting parameters exist,
        they get combined with the defaults.

* comments
2020-07-13 17:22:01 -07:00
Tim Sullivan a9f82a3469
[Reporting] remove async execution from csv_from_savedobject (#71031)
* [Reporting] remove async execution from csv_from_savedobject

This simplifies the csv_from_savedobject logic by removing the async
hook. This was added as premature optimization in the initial PR that
added the Download CSV button to the dashboards.

* copy out export type ts changes

* remove routes

* fix i18n
2020-07-09 09:58:45 -07:00
Alejandro Fernández Haro 56aac44ac3
[API Integration Tests] usageApi service to expose the private telemetry API (#70057)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-30 20:14:59 +01:00
Tim Sullivan e143905223
[Reporting] ReportingStore module (#69426)
* Add store class

* fix tests

* fix the createIndex bug

* add reportingstore test

* change function args

* nits

* add test for automatic index creation failure recovery
2020-06-25 14:52:30 -07:00
Tim Sullivan 2f67cbfa9c
[Reporting] Move code out of Legacy (#67904)
* [Reporting] Move code out of Legacy

* Elasticsearch is not a plugin dep

* add data as plugin dependo

* diff cleanup 1

* log the browser download

* Update paths in outside code for new Reporting home

* fix download test

* add numeral typing for x-pack/test

* Fix jest tests for np migration

* Shorten import paths

* remove this file, add typings to the node module

* remove local typing that has been provided by node module

* Add optional security plugin dep

* revert conflicting apm typings removal

* fix i18n

* fix snakecase whitelist

Co-authored-by: Joel Griffith <joel.griffith@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-03 15:40:56 -07:00
Joel Griffith 39902870c8
[Reporting]: Move router + license checks to new platform (#66331)
* WIP: Move routes to new API, license and other checks inbound

* Move license checks over to np licensing observable

* Fix license checks + remove older modules

* Fixing check_license tests, move to TS/Jest

* Fix licensing setup for mocks

* Move job.test.ts over to np

* WIP: move user checks to higher-order func

* Move more handler logic over to Response factory vs Boom

* Major refactor to consolidate types, remove facades, and udpate helpers

* Fix validation for dates in immediate exports

* Linter fix on check license test

* Fix job generation tests

* Move deps => setupDeps

* fix api test

* fix jobs test

* authorized_user_pre_routing and tests

* Fixing duplicate identifiers

* Fix licensing implementation changes

* WIP: Moving license over to async/observables

* Fix disabled-security case

* finish auth_user_pre_routing cleanup - no more license check

* WIP: Fixing final api tests

* Trying to get schema differences in alignment

* Reverting back to previous generation handler

* Fix final API tests

* Final API test fixes, few more hardening tests and better error messages

* Simplify lower-level module implementation (core only interface) + test updates

* Push some core logic into plugin

* Move some core logic up to plugin

* Marking private setupDeps + downstream fixes

* revert logger as a param

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2020-05-29 15:31:17 -07:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Tim Sullivan a8b1a6b924
[Reporting] Consolidate API Integration Test configs (#66637)
* [Reporting] Consolidate API Integration Test configs

* fix test isolation

* tweak

* import order

* fix ts refactor ish

* fix a test bug

* fix test

* --wip-- [skip ci]

* revision

* undo bad cherrypick

* fix delete reports

* log tweak

* fix default index pattern

* fix the test

* revert

* --wip-- [skip ci]

* unrevert

* harden the deleteAllReportingIndexes function

* fix tests

* move the log.debug line

* fix config path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-19 11:37:09 -07:00