Commit graph

3926 commits

Author SHA1 Message Date
Garrett Spong 459b00b7f1
Create Host Summary Component on the Host Details Page (#29311)
* Displaying the HostDetailsPanel with placeholder data

* Modified hostsQuery to take hostId as a filter param and replaced placeholder data with real host data

* Cleaning up unused id variable on the hosts query

* Separating out HostsTable and HostSummary queries

* First pass at adding dnd to the summary values

* Added support for array summary values, cleaned up dnd, and created function to clear up confusion around checking if an index exists or is undefined when using WithSource component

* Adding remaining summary values and now using escapeDataProviderId() when setting dataprovider id

* Plumbing through start and end date to set the correct queryDate on draggable, cleaned up host from field names, and added support for relative time fields

* Separating hosts/index.gql_query.ts into two separate files to keep one query per file

* Adding host.type to ECSFields, renaming HostDetailsPanel to HostSummary, and added integration test for testing fields returned by the HostSummaryQuery

* Adding unit tests for HostSummary and updated to use new type for filterQuery

* Using the explicit ESTermQuery type for the queryFilter

* Fixes from PR comments

* Updating integration tests to use test instead of it

* Reverting integration tests back to it as test is unsupported
2019-01-29 22:02:06 -07:00
Frank Hassanabad 4ee22c21be
Updated uncommon process to sort correctly and have better column names (#29561)
* Updated `Command Line` -> `Last Command`
* Updated `User` -> `Last User`
* Updated the sort to be descending in the `top_hits` to order them by last document to get the last user and last command
* Updated integration tests with this change
* Fixed a bug where users were not being returned in the user column
* https://github.com/elastic/ingest-dev/issues/222
2019-01-29 21:54:17 -07:00
Josh Dover 908db0de07
[7.0] Add reindex feature to Upgrade Assistant (#27457) (#29516) 2019-01-29 17:55:35 -06:00
Frank Hassanabad 5abbd3123b
Turns the integration tests back on and upgrades them from the last merge from master (#29468)
* Fixed areas where we were guessing on test upgrades from when it was turned off
* https://github.com/elastic/ingest-dev/issues/216
2019-01-28 22:17:17 -07:00
Fuyao Zhao 7172f61f7e Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-28 18:53:12 -08:00
Nathan Reese dbf5421405
[Maps] prepare for geotile_grid aggregation (#29461)
* rename geohashgrid to geo_grid

* more stuff

* simplify getSearchFitlers

* rename precision to geogridPrecision

* missed one rename precision to geogridPrecision

* rename funtional test

* fix functional test gis/index import

* fix regression
2019-01-28 19:22:52 -07:00
Frank Hassanabad 43b02a38d5
Use terms aggs instead of composite refactor of Authentications Table based on feedback (#29283)
* Made it sort by desc of number of failures
  * Reduced type usages where possible to ECS based types
  * Added newer fields to the Authentications based on feedback which is based on last success and last failure.
  * Removed the upperLimit from uncommon process and refactored to be the same terms patter that Authentications is using
  * Fixed the bug with uncommon process where it could not re-limit its self back to 5 rows if you expanded it.
  * Added a new `extendMap` for ECS mapping fields to make things easier
  * Replaced ares where unit tests as `it(` in favor of `test(`
  * Added a `escapeDataProviderId` and consolidated code to use that
  * Replaced Types that were incorrect in areas from functions to `ActionCreator`
  * Pushed up higher the Types of `Edges` in the code to remove less boilerplate
  * Introduced a few functions and unit tests to reduce boiler plate in a few areas
  * Made all appropriate cells of AuthenticationTable draggable
  * Replaced areas that use `moment().valueOf()` for `Date.now()` as it's more semantic and we can remove moment where that's all we were using it for.
  * Added unit tests for all the above or refactored existing unit tests.
  * https://github.com/elastic/ingest-dev/issues/218
2019-01-28 14:24:31 -07:00
Tim Sullivan 97dc19c608
[Task Manager] Remove doc type awareness (#28968)
* remove doc from mappings

* fix: section for type should include an inner object describing the mapping
2019-01-28 10:20:31 -07:00
Thomas Neirynck b39d7947a4
[Maps] move grid resolution to source (#29294) 2019-01-28 10:30:57 -05:00
Luke Elmers c6f0595262
Remove nested table splits from table vis (#26057) 2019-01-25 10:13:19 -07:00
Xavier Mouligneau 3b51264eb3 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-01-25 11:46:32 -05:00
Felix Stürmer 9588443601
[Infra UI] Read and write data sources from and to saved objects (#28016) 2019-01-25 16:08:09 +01:00
Chris Roberson 9f37c1fd0a
[Monitoring] Support for unlinked deployments (#28278)
* Unlinked deployment working for beats

* Use better constant

* Show N/A for license

* Rename to Unlinked Cluster

* Use callout to mention unlinked cluster

* PR feedback

* Use fragment

* Speed up the query by using terminate_after

* Handle failures more defensively

* Remove unnecessary msearch

* PR feedback

* PR feedback and a bit of light refactor

* Updated text

* Add api integration tests

* Localize call out

* Update loc pattern

* Fix improper i18n.translate usage

* Revert "Fix improper i18n.translate usage"

This reverts commit 0e2e7608c3.

* Revert "Update loc pattern"

This reverts commit cc99fe8a8a.

* Ensure the unlinked deployment cluster counts as a valid cluster

* Sometimes, you miss the smallest things

* Ensure the unlinked cluster is supported, in that users can click the link and load it

* Update tests

* PR feedback. Simplifying the flag supported code and adding more tests

* Update naming

* Rename to Standalone Cluster

* Remove unnecessary file

* Move logic for setting isSupported to exclusively in flag supported clusters code, update tests
2019-01-25 09:34:01 -05:00
Fuyao Zhao 602d39678f Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-24 15:03:13 -08:00
Matthew Kime f897026e1f
management/kibana/indices => management/kibana/index_patterns (#29151)
* partial progress

* fix routing, account for create flow

* fix test

* fix test

* fix test

* fix next page after delete

* fix test

* indices refs to index_patterns as appropriate

* more refactor and potential test fix

* change more urls
2019-01-24 08:10:52 -06:00
Spencer c052613962
[dashboard+gis] remove dark mode options (#29017)
* [dashboard+gis] remove dark mode options

* [reporting/extract] restore fixtures

* remove mentions of old `.theme-dark` class

* import panel styles from panel/_index.scss
2019-01-23 14:29:35 -08:00
Dmitry Lemeshko 5b67941b5f
page_objects updates prior webDriver migration (#28941)
* page_objects updates prior webDriver migration

* [services/test_subjects] set default find timeout to timeouts.find

* remove redundant waitUntilLoadingHasFinished
2019-01-23 09:40:57 +01:00
Fuyao Zhao b40bfdeb45 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-22 18:07:01 -08:00
Brandon Kobel 0e00c3ffef
Remove legacy fallback (#29107)
* Remove mode.initialize and change useRbacForRequest to useRbac

* Updating saved object api tests

* Fixing spaces api integration tests

* Removing unused "expect legacy forbidden" declarations and imports

* Updating docs

* Update docs/migration/migrate_7_0.asciidoc

Co-Authored-By: kobelb <brandon.kobel@gmail.com>

* Update docs/migration/migrate_7_0.asciidoc

Co-Authored-By: kobelb <brandon.kobel@gmail.com>

* Updating comment that mentions the scenario when we aren't using RBAC

* Adding back the authorization section of the config

When a config setting is marked as unused using the deprecations, it's
still required to show up in the config declarations so an error isn't
thrown on startup.

* Adding note about watcher jobs

* Update docs/migration/migrate_7_0.asciidoc

Co-Authored-By: kobelb <brandon.kobel@gmail.com>
2019-01-22 12:08:45 -08:00
Thomas Neirynck 87f7f8e64b
[Maps] Use geohash precision, not zoom-level, to rerequest data (#28537)
Use a change in geohash precision to determine if data needs to be rerequested, instead of a change in zoom. Also add tests for generic zoom-level change behavior for es_geohash_grids.
2019-01-22 09:28:05 -05:00
Mengwei Ding 8a59f36596
[Code] fix test (#29074) 2019-01-22 19:14:37 +08:00
Yulong 42e64a1de4 [Code] change back to codeNode (#29073) 2019-01-21 18:36:59 -08:00
Yulong 3635a784f2
[Code] Only config master code node rather than config all the nodes (#28160) 2019-01-21 14:19:56 +08:00
Fuyao Zhao 840a8a8672 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-20 17:36:08 -08:00
Spencer 61ca36f15d
Switch to K7 design by default (#29009)
* [visualize] update breadcrumbs when updating visualization

* [ftr] auto-scroll elements passed the fixed header if necessary

* [uiSettings] enable the k7design by default

* [ftr/services/flyout] add ensureClosed() and ensureAllClosed()

* [ftr/services/globalNav] implement globalNav service

* [ftr/services/appsMenu] implement service for using app menu

* [ftr/services/userMenu] add service for using user menu

* [ftr/discover+visualize] update assertions that are based on the app width

* [ftr/monitoring] pass test subjects to new breadcrumbs

* [headerGlobalNav] don't offset the app container in embed mode

* update heights for slightly smaller header
2019-01-18 12:39:01 -08:00
Spencer 4911fb1ce8
[ftr/pageObjects/security] try simplified logout check to avoid flakiness (#28893)
* [ftr/pageObjects/security] try simplified logout check to avoid flakiness

* [pageObjects/security] wait for longer than normal
2019-01-17 15:19:42 -08:00
Nathan Reese b72ce1c3e7
[Maps] Handle extent filters that cross dateline (#28775)
* [Maps] handle extent filtering when extent crosses dateline

* ensure lat within range

* use geo_bounding_box instead of geo_polygon since it supports dateline

* add geo_shape functional test

* get functional tests running

* update convertMapExtentToPolygon so its not recursive

* clean up comment
2019-01-17 13:38:45 -07:00
Spencer 4d40ddff7a
Implement config for disabling welcome screen (#28888)
As suggested by @legrego in #28792, this PR adds a config flag to completely disable the welcome screen, which is enabled by the functional test runner to ensure that the welcome screen doesn't pop up.
2019-01-17 12:13:13 -08:00
Frank Hassanabad a4cb4109d9
Added User column to the Uncommon processes table (#28728)
* Updated process, host, and user to now be ECS reduction names
  * Updated unit tests and used more types to make updates easier to unit tests
  * Reduced types into more canonical ECS types
  * Changed GraphQL types from Float to Int (except for date time ranges which exceed standard float 32 size)
  * Updated unit tests to have more Type based friendly expects
  * Updated other Types in the system during refactoring to be stricter
  * Added unit test file for authorization flatten function
  * Changed out the named edges for nodes per documentation from GraphQL
  * With edges called nodes, reduced mergeFieldsWithHit to not have to take a named parameter
  * Renamed event mock file to match the other named mock files
  * Renamed authorization to be authentication since we are only dealing with authentications
  * Commented out functional api tests for the moment until we upgrade to master again
  * https://github.com/elastic/ingest-dev/issues/204
  * https://github.com/elastic/ingest-dev/issues/194
2019-01-16 20:23:42 -07:00
Fuyao Zhao 88908d46a2 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-16 11:38:26 -08:00
Spencer 3bea7a31d5
[pageObjects/welcome] automatically disable on navigation (#28792)
* [pageObjects/welcome] automatically disable on navigation

* [pageObjects/welcome] disable on beforeTests to not slow down navigation

* [ftr/services/welcome] also disable welcome after logout

* [ftr/services/welcome] revist home after disabling welcome
2019-01-16 09:45:28 -08:00
Felix Stürmer 769c50de03
[Infra UI] Explicitly set format in date range queries and aggs (#28094)
Previously, the Logs UI assumes that the index mapping of the logs indices has a default date format including `epoch_millis` configured for the timestamp field. If that is not the case queries can fail, leaving parsing exceptions in the Elasticsearch logs.

This PR fixes the Elasticsearch queries related to the Logs UI to explicitly specify the `epoch_millis` format for date range queries and aggregations.

fixes elastic/kibana#27554
2019-01-16 12:00:27 +01:00
Fuyao Zhao f11e08068f Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-15 13:31:06 -08:00
Stacey Gammon 1078782106
Refactor, clean up, new inspector, pie chart services (#28509)
* Refactor, clean up, new inspector, pie chart services

* Move inspector service to top level, outside of visualizations folder

* Refactor some more instances of getTableData into expectTableData
2019-01-15 15:05:12 -05:00
Fuyao Zhao d13c15b862 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-14 15:38:37 -08:00
Spencer 17c0cbd174
[pageObjects/header] use testSubjects.existOrFail (#28632)
* [ftr/services] convert exists() timeout arg to options object

* [ftr/testSubjects] add allowHidden option to exists() fns

* [pageObjects/header] use existsOfFail for globalLoadingIndicatorHidden
2019-01-14 12:19:40 -08:00
Dmitry Lemeshko 8357fccb47
wrap leadfoot/keys in browser, pressKeys on elementWrapper (#27720) 2019-01-14 17:15:03 +01:00
Frank Hassanabad 7b5941c4a6
Authorization table (#28552)
* Created the table using an auditd ssh query (for now)
* Added unit tests, ESArchiver tests
* It does not sort by anything other than document counts
* It does not filter out the `(invalid user)`, `(unknown user)` but keeps them as is for the moment
* Added drag and drop with the user column into the timeline
* https://github.com/elastic/ingest-dev/issues/195
* https://github.com/elastic/ingest-dev/issues/200
* https://github.com/elastic/ingest-dev/issues/201
2019-01-11 19:42:53 -07:00
Justin Kambic dcd10e580d
Add sort to tests to prevent uncertainty in the API call result. (#28544)
Necessary fix to make 6.x green again.
2019-01-11 07:29:47 -05:00
John Dorlus de73aeac33
Fixed omission that caused the test to still be flaky. Need to make sure the element is displayed. (#28517) 2019-01-10 16:46:26 -05:00
Fuyao Zhao 2f292bd5c5 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-10 13:07:09 -08:00
Andrew Cholakian b09d849d4c
[Uptime] Fix Total Calculation for AllPings (#28224)
The all pings panel on the monitor page was incorrectly calculating the number of pings. This patch uses the ES search's hits.total for the value, whereas before we simply counted the returned array. For anything but the shortest histories this number would be wrong since it'd only count the number of items returned, by default 200.
2019-01-10 12:26:38 -08:00
Nathan Reese 519956f892
[Maps] add query bar to map application top nav (#28210)
* display query bar in top nav with index patterns for typeahead support

* add query to state and pass query to search source

* store query in app state and saved object

* functional tests

* functional tests for geohashgrid source

* functional tests for es_search_source

* delete previous join properties when joining results

* re-fetch on query refresh

* review feedback
2019-01-10 12:53:04 -07:00
Xavier Mouligneau a1a00b39ae
Add Timeline Query (#28368)
* add new source for timeline query

* add pagination and sorting on event query

* wip to get timeline query working

* full integration with timeline query

* fix existing unit testing

* wip add testing

* wip add api test integration

* finish unit testing + cleanup

* one ECS type from graphql

* fix bug on events table add tiebreak in query + some review

* fix bug with formaSafely with unit test

* fix _id to always be defined

* cleanup + review

* remove cast

* fix type Direction to only have one type from server or UI + some other cleanup
2019-01-10 10:20:43 -05:00
Fuyao Zhao 78af65ebad Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-09 13:14:50 -08:00
John Dorlus 68e12e31d9
Added change to look for header instead of checking container element. (#28279)
* Added change to look for header instead of checking container element.

* Made fix to enable both tests to pass.
2019-01-09 12:33:25 -05:00
Xavier Mouligneau a44371b360 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-01-08 16:13:46 -05:00
Fuyao Zhao f48000022c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-07 21:59:21 -08:00
Justin Kambic c46b102e77
[Uptime] Rename plugin (#28008)
* Rename "Uptime Monitoring" to "uptime".

* Remove "Monitoring" from the app's title.

* Fix broken integration tests.
2019-01-04 14:29:15 -05:00
Frank Hassanabad be1f8fd876
Add uncommon process es-archiver tests and remove ci tech debt (#28004)
* Added ES Archiver Tests for uncommon processes
* Re-initialized host api integration tests with new data
* Fixed ci build to work with api integration tests again
* Fixed ci build to run tslint, eslint, type_check again
* Fixed import with ui/theme to work with the dll optimizer
* Minor word changes
* https://github.com/elastic/ingest-dev/issues/193
* https://github.com/elastic/ingest-dev/issues/185
2019-01-04 08:08:49 -07:00
Tim Sullivan d568e65e78
Core task manager (#24356)
* Core task manager (#23555)

* Initial stab at core task manager logic

* Update task_manager readme

* Update task manager readme

* Add cancelable helper package, OSS, and general purpose, but
will be useful for writing cancelable x-pack tasks.

* Make the cancellable package promise-compliant

* Update task manager readme w/ reference to cancellable

* Change pool from lazy to eager, add support for sub-pools per task type.

* Move cancellable to task_manager, and typescriptify it.

* Working proof of concept for task manager. Still have lots to do:
clean up, tests, comments, validations, assertions, etc.

* Add pagination support to task manager fetch

* Move task manager to OSS

* Remove task manager reference from x-pack

* Make task_manager a valid core plugin

* Modify how task resource allocation works

* Remove the special case 'max' workers occupied value

* Remove x-pack package.json changes

* Make taskDefinitions a part of uiExports

* Make task docs saved-object compliant.

* Add kbnServer to the task context.

* Allow tasks to have a void / undefined return type

* revert x-pack change

* move cancellable to src/utils

* move to src/server

* use afterPluginsInit hook

* task_manager.ts rename

* add a wrapper with a setClient method

* Add tests for task runner

* Break task_pool into smaller, testable pieces

* return raw task doc fields for calling code

* remove todo comment

* helper module for default client
 - setClient takes a callback fn

* fix misidentified field name

* fix rest args warning

* flatten task_pool

* remove cancellable

* return raw task doc fields for calling code

* remove todo comment

* helper module for default client
 - setClient takes a callback fn

* fix rest args warning

* typescript fixes

* roll back setClient takes a callback

* createTaskRunner returns an object with run/cancel functions

* Test task store, tweak task poller tests

* Rename num_workers to max_workers

* Tweak task pool method names

* Fix cancellable test, and ts errors

* Rename doc to _doc

* Fix the doc type in the task manager index mappings

* Make task costs configurable in kibana.yml

* fix a tslint warning

* TaskManager.afterPluginsInit replaces circuitous stuff

* addMiddleware, implement beforeSave

* wip

* comment

* run context stuff

* pretty fix

* comments

* lint/pretty fixes

* safeties in case they don't define both beforeRun and beforeSave

* task runner test constructor opts fix

* Add task_manager integration tests

* FIx readme mistakes, fix schedule signature

* Fix integration tests

* Add blurb about middleware

* make a libs directory for the small things

* test for extractTaskDefinitions

* unit test for middleware

* Comment, refactor, and test task_manager

* Touch up comments

* Make task store throw error if given an unknown task type

* Fix sample task definition in readme

* Make task manager toggle on / off based on Elasticsearch connectivity

* Prevent task manager from crashing Kibana if
elasticsearch plugin is disabled

* Fix task manager signature

* Move the task manager into the task manager mixin,
fix tests. It's an uber integration object anyway, so
it seemed to make sense to keep it in one place.

* Fix task manager integration tests

* Update the task manager index creation to use auto_expand_replicas

* Fix task manager integration tests

* Fix task manager integration tests

* Fix the overzealous deletion of .kibana during tests

* Core task manager

* Allow hardcoded ID passed in

* comments

* don't deconstruct type and task for payload

* remove uiExport support

* move task_manager to x-pack/plugins

* expose as client on the plugin namespace

* fix tests

* move plugin api integration tests

* roll back readme sample task definition example

* fix sample plugin link

* server.taskManager

* sanitizeTaskDefinitions

* fix integration tests

* sanitize rename

* assert unintialized and check for duplicates in registerTaskDefinitions

* Remove unnecessary defaults from task_manager.test.ts

* Remove task manager from OSS

* Remove task manager from src

* Tidy up task_manager unit tests around elasticsearch status changes

* Integration test for specifying ID in scheduling

* Task_manager init -> preInit to allow other plugins to consume
taskManager in their init.

* Remove task manager integration tests from OSS

* spelling

* readme fix

* fix test code impacted by hapi upgrade

* Task Manager index creation changes (#24542)

* Uses putTemplate for task manager mappings and index settings.

* Removes create option.

* Opposite day, the test catches up to the code changes.

* Ignores index unavailable during searches.

* Improve taskRunner's processResult (#24880)

* Set task state to idle after run, and add failed state

* fix tests

* Test alerting demo (#25136)

* Ensures that task store init gets called before schedule.

* Removes unused option for debugging purposes.

* Fix unit tests because a second callCluster was made.

* Task manager starts sanely.

Does not preInit
Will not allow definitions after initialization
Creates store immediately.
Modifies store after all plugins have initialized
Adds static tasks that will be defined by plugins.

* Task manager should not allow operations before initialization.

* Attempts to fix runner tests.

* Fixes unit test contract with APIs.

* Removes unused type definitions.

* Removes unused package json.

* Removes unused import type.

* Removes unnecessary async applied to a function.

* Returns diferently if task store has already initialized.

* Explains how to add static task instances to task definitions. (#25880)

* Tasks cannot be scheduled until task manager is initialized.

* Adds task manager api integration tests to ci group4.

* Context of describe test must be the test framework object.

* Update src/es_archiver/lib/indices/kibana_index.js

regex update to actually disallow non-kibana system indices

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* verify fillPool exception passing

* readme update about max_workers/numWorkers

* change forEach to reduce

* use public interfaces in internal method

* replace getMaxAttempts with public readonly maxAttempts

* Update x-pack/plugins/task_manager/task_store.ts

`throw new Error` and initializattion spell fix

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* min = 1 for max_workers

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* timeOut => timeout

* min 1

* scope as an array

* no retries

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* ConcreteTaskInstance is a TaskInstance

* remove guard per joi logic

* more return types for functions

* more comments around incremental back-off

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* throw error instead of return undefined

* poll_interval min 1000

* avoid handling err.stack directly

* break up processResult

* fix a few runtime issues

* only fetch idle tasks

* remove check for status idle

* always return a state, and when there is an error return the state we had at beforeRun

* check isStarted before attemptWork

Co-Authored-By: tsullivan <tsullivan@users.noreply.github.com>

* ts fix
2019-01-03 16:32:09 -07:00
Matthew Kime b491d8790a
Management: EUI Navigation sidebar (#25905)
* partial work - sidebar works, need to address rendering issues

* rendering fixes

* refactor sidenav into its own file

* refactor sidenav into its own file

* remove unneeded changes

* remove unneeded formatting changes

* remove unneeded formatting changes

* remove unneeded formatting changes

* remove unneeded formatting changes

* remove more unneeded EuiPage

* remove more unneeded EuiPage

* snap snap

* remove unused dependencies

* functional tests

* sidebar tweaks, beats-cm

* lint

* properly sharing UI code

* fix eui export

* type fixes

* add test

* add test

* testy test

* partial progress

* attmpt to fix functional test

* from merge

* snap snap

* clean up management for side nav changes

* functional test fix

* snap, blank landing

* snap snap

* change management item order

* test fix

* disable tslint line

* ts fix

* functional test fix

* functional test fixes

* fix functional test

* minor cleanup

* simplify management registry callback

* remove comment

* react island with kibana version

* merge

* fix scss reference

* fix types

* remove mistaken commit

* remove k7 switch

* snapshot update

* fix sidebar nav headers

* landing page copy

* remove dummy text

* merge

* i18n and revert unneeded change

* Update edit_role_page.tsx

* i18n

* i18n

* snap snap

* better text

* snap snap

* mergi

* pop open nav on mobile

* add management section tests

* NOTICE

* fix subhead text, add padding to bottom of management nav

* Update sidebar_nav.tsx

* merge merge

* fix sass lint
2019-01-03 17:09:42 -06:00
Tim Sullivan 237e446ba3
[Reporting] Remove Phantom (#27142)
* remove some phantom stuff and tests

* remove phantom

* remove phantom

* remove phantom

* todo comments

* remove from yarn.lock

* edit fix

* use constant in init

* readme edit

* update migration guide

* remove refs to non-existing docs
2019-01-03 14:35:15 -07:00
Mengwei Ding 30816f9c19
[Code] Add initial code import repository functional test (#27857) 2019-01-03 10:06:23 -08:00
Justin Kambic 2d8e7a146b
[Uptime Monitoring] Add uptime monitoring (#27552)
* Add Uptime Monitoring (#25480)

* Initial commit.

* Add heartbeat app to Kibana.

* Add routing architecture.

* Add graphQL endpoint.

* Rename app to be 'uptime monitoring' instead of 'heartbeat'.

* Add server tests.

* Standardize interface/class/route naming.

* Clean up GraphQL type inference script.

* Update gql schema.

* Rename classes/interfaces. Add tests for ES ping adapter.

* Rename more symbols.

* Improve angular lifecycle management.

* Move angular lifecycle management code to framework adapter.

* [Uptime Monitoring] Add user auth checks (#26070)

* Add Uptime Monitoring (#25480)

* Add authentication checks and tests. WIP.

* Add auth adapter types. Finish work on adapter and update tests.

* Add route errors. Rename license symbols.

* [Uptime Monitoring] Add Overview and Monitor pages (#27279)

* Add Uptime Monitoring (#25480)

* Initial commit.

* Add heartbeat app to Kibana.

* Add routing architecture.

* Add graphQL endpoint.

* Rename app to be 'uptime monitoring' instead of 'heartbeat'.

* Add server tests.

* Standardize interface/class/route naming.

* Clean up GraphQL type inference script.

* Update gql schema.

* Rename classes/interfaces. Add tests for ES ping adapter.

* Rename more symbols.

* Improve angular lifecycle management.

* Move angular lifecycle management code to framework adapter.

* [Uptime Monitoring] Add user auth checks (#26070)

* Add Uptime Monitoring (#25480)

* Add authentication checks and tests. WIP.

* Add auth adapter types. Finish work on adapter and update tests.

* Add route errors. Rename license symbols.

* Add GQL query components.

* Remove reference to dedicated histogram resolver.

* Update formatting of displayed dates and columns for monitor statuses.

* Add UI import for framework adapter.

* Add Uptime Monitoring (#25480)

* Initial commit.

* Add heartbeat app to Kibana.

* Add routing architecture.

* Add graphQL endpoint.

* Rename app to be 'uptime monitoring' instead of 'heartbeat'.

* Add server tests.

* Standardize interface/class/route naming.

* Clean up GraphQL type inference script.

* Update gql schema.

* Rename classes/interfaces. Add tests for ES ping adapter.

* Rename more symbols.

* Improve angular lifecycle management.

* Move angular lifecycle management code to framework adapter.

* [Uptime Monitoring] Add user auth checks (#26070)

* Add Uptime Monitoring (#25480)

* Add authentication checks and tests. WIP.

* Add auth adapter types. Finish work on adapter and update tests.

* Add route errors. Rename license symbols.

* Add React Router and some basic breadcrumbs.

* Update application flow to subscribe to use K7 if available.

* Rename a type.

* Update to work with K7.

* Update breadcrumb module to export functions per uptime page.

* Add explicit type to object.

* HTML-encode a symbol.

* Extract router basename to prop/constant.

* Add autorefresh control and state variables.

* Support passing monitor ID to route.

* Mock up some charts in the Monitor page.

* Add spacer.

* Enlarge spacer.

* Add ID to sample link.

* Replace div with fragment.

* Remove unused text.

* Add GQL components/resolvers/queries for PingList and MonitorSelect.

* Add MonitorStatusBar GQL component, update GQL schema + resolver.

* Add GQL support for Monitor charts.

* Add auto-polling for Monitor Page components.

* Fix routing bug.

* Remove outdated code.

* Add beaker icon.

* Add snapshot component to Overview page.

* Update snapshot histogram to display monitors up/down. Update types.

* Update typings for adapters/libs.

* Move monitor list to Overview page. Update formatting of snapshot component.

* Include link from monitor table to monitor page.

* Add help link to app header.

* Remove unneeded title from Overview page.

* Update the data shown in checks list.

* Put limit on check query size.

* Remove obsolete code.

* Add filtering to Overview page.

* Add Monitor List component.

* Add filtering capabilities to errors list.

* Add pagination, sorting, and status code to errors list.

* Add Uptime Monitoring (#25480)

* Initial commit.

* Add heartbeat app to Kibana.

* Add routing architecture.

* Add graphQL endpoint.

* Rename app to be 'uptime monitoring' instead of 'heartbeat'.

* Add server tests.

* Standardize interface/class/route naming.

* Clean up GraphQL type inference script.

* Update gql schema.

* Rename classes/interfaces. Add tests for ES ping adapter.

* Rename more symbols.

* Improve angular lifecycle management.

* Move angular lifecycle management code to framework adapter.

* [Uptime Monitoring] Add user auth checks (#26070)

* Add Uptime Monitoring (#25480)

* Add authentication checks and tests. WIP.

* Add auth adapter types. Finish work on adapter and update tests.

* Add route errors. Rename license symbols.

* Fix broken test.

* Add more tests for pings ES adapter.

* Remove obsolete code.

* Track autorefresh state in localStorage.

* Shrink top visualizations.

* Fix typings in monitor charts component.

* Fix typings in monitor status bar.

* Fix typings in monitor select component.

* Fix typings for monitor memory adapter.

* Update error list column ordering. Fix broken API test.

* Clean up names.

* Refactor snapshot histogram into dedicated component, make histogram data nullable.

* Add API test.

* Add Uptime Monitoring (#25480)

* Initial commit.

* Add heartbeat app to Kibana.

* Add routing architecture.

* Add graphQL endpoint.

* Rename app to be 'uptime monitoring' instead of 'heartbeat'.

* Add server tests.

* Standardize interface/class/route naming.

* Clean up GraphQL type inference script.

* Update gql schema.

* Rename classes/interfaces. Add tests for ES ping adapter.

* Rename more symbols.

* Improve angular lifecycle management.

* Move angular lifecycle management code to framework adapter.

* [Uptime Monitoring] Add user auth checks (#26070)

* Add Uptime Monitoring (#25480)

* Add authentication checks and tests. WIP.

* Add auth adapter types. Finish work on adapter and update tests.

* Add route errors. Rename license symbols.

* Add test for ES pings adapter.

* Add empty prompt when no index found.

* Place limits on filtering capabilities.

* Update plugin order.

* Add date picker.

* Fix bug setting date range. Update chart color.

* Downgrade apollo cache package to avoid bumping other clients.

* Extract reference to chrome API from app startup to kibana adapter.

* Update framework_adapter_types.ts

Remove unneeded comment via GitHub web UI.

* Extract data formatting function to dedicated file to improve modularity.

* Add a TODO.

* Add TODO for moving formatting code to server.

* Switch to use auto_date_histogram agg.

* Add filter schema.

* Add pagination and sorting to Monitor List component.

* Add latest timestamp to errors list.

* Add code to default the date range's end to be greater than 'now' to avoid the user missing latest information on refresh.

* Delete console.log call from code.
2019-01-03 12:17:21 -05:00
Sébastien Loix 96f25db3f9
[CCR] Put back integration test for remote cluster (#27778) 2018-12-27 09:25:57 +01:00
Nathan Reese 72680f2fa0
[Maps] update layers on kibana global refresh interval (#27721)
* update layers on kibana global refresh interval

* store refresh in UI state

* clearer function names for refresh timer

* rename a bunch of things

* fix store_actions jest test

* add functional test to verify refresh config is loaded from saved object state

* add functional tests verifing layers re-fetch data on refresh timer
2018-12-26 10:14:43 -07:00
Xavier Mouligneau 9abded2119
Fix graphql type generation after package upgrades (#27738)
* update type generation for graphql

* fix uncommonProcess because elasticsearch change the total attribute to an object and not just the value

* fix unit test by adding the new interface for total hit
2018-12-23 17:34:12 -05:00
Nathan Reese e62db25d62
[Maps] Allow saving gis-map saved objects that cross dateline (#27615)
* [Maps] allow saving map that crosses dateline

* remove camel case variable names for map extent - causing linting error
2018-12-21 09:08:29 -07:00
Stacey Gammon fd28ce3eae
Stabilize flaky visualize test (#27470)
* Stabilize flaky visualize test

- don’t wait for header unnecessarily.  - use clickWhenNotDisabled instead of click. - use an outer retry to account for stale elements from pie chart likely not editing render complete correctly

* More fixes

- fix interval selection so it doesn’t accidentally click Go.  - fix legit bug with non existent _source field being used in a test. - Don’t “click Go” when not needed.

* Clean up

- can’t run pie chart tests multiple times in a row.  - remove more unnecessary clickGos
2018-12-20 17:04:15 -05:00
Josh Dover 41bbbe38a6
Update telemetry test for ODBC stat changes in Elasticsearch (#27608)
* Update telemetry test for elasticsearch#36753

* Skip broken remote cluster test for today
2018-12-20 13:44:03 -06:00
Xavier Mouligneau 06be9aba69 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2018-12-20 14:33:36 -05:00
Thomas Neirynck ffc8bae820
[GIS] Add Maps Plugin (#24804)
This adds the MVP of the Phase 1 version of the Maps Plugin to Kibana (https://github.com/elastic/kibana/issues/19582).

This is added as a new Stack Feature, requiring a basic license.
2018-12-19 16:14:41 -05:00
Court Ewing 948932ae45
[security] Token auth provider (#26997)
* [security] Token auth provider

From a user perspective, the token provider behaves similarly to the
basic provider in that it can power the native login experience and can
also be used for API calls via the authorization header (albeit with the
Bearer realm).

From a technical perspective, the token provider deals with
authentication via the token service in Elasticsearch, so while it
handles user credentials in the case of login, a temporary, refreshable
access token is stored in the session cookie instead. This means that
when you log out, not only is the cookie invalidated, but the token
itself cannot be reused.

* token provider integration tests

* include token api integration tests by default

* remove unused ProviderOptions from typedef

* assert that valid login sets an authorization header

* unit tests for refresh token and failure cases

* integration tests for headers and sessions

* clean up login/logout tests for consistent setup functions

* test for header rejection scenarios
2018-12-19 11:13:29 -05:00
CJ Cenizal 2371e58590
[CCR] Remote Clusters and Cross-cluster Replication apps (#26777) 2018-12-18 17:59:10 -08:00
Josh Dover 4d295c7923
Upgrade assistant - Phase 1 (#25168)
* Get basic scaffolding working

* Wire up cluster checkup data

* Add types for elasticsearch plugin

* Implement basics of checkup tab

* Update style of deprecations

* Add copy and reload button to checkup

* Add filtering by warning level

* Add deprecation logging tab

* Copy updates and cleanup

* Type cleanup

* Move deprecation logging to overview tab

* Make filters togglable

* Move sections into tabs and add support for grouping

* Cleanup and add clearer labels

* Use tables for message grouping

* Cleanup and small fixes

* Allow console to load relative URLs

* Add reindex in console button to reindex tasks

* Merge documentation UI and uiButtons

* Fix tests

* Filter bar tweaks

* Filter out index settings that can't be set

* Fix types

* Add tests for deprecation_logging

* Add tests for reindex templates

* Make KibanaConfig generic

* Simplify integration test

* Finish backend unit tests

* Fixup types

* Fix uiButton updating for reindex items

* Fixed background color stretching

* Pulling tabs out and re-ordering filter buttons

* Making accordions more item-list like

* Turned Healths into Badges

- Couldn’t do the conversion within the cell because it only passed color

* Fix overflow issue

* Optional filter and expand/collapse controls

* Reorganizing

- Added placeholder for moving action button up into accordion header
- Removed repetitive message name outputs
- Slightly better listing of each message when sorting by index
- Only showing number of severity when sorting by index
  - Still need to allow showing all severity levels
- Added indice count when sorting by issue

* Putting `Deprecation logging` in a `EuiDescribedFormGroup`

* Added some stats, empty prompts, and all clear prompt

* Added docs link

* Cleaned up sass files

* Revert changes to fake_deprecations

* Update blacklisted settings

* wip

* Move data fetching and tab control

* Wire up overview summary

* Cleanup docs/uiButtons + move actions to index table

* Add expand/collapse all functionality

* Wire up search box

* Wire up severity indicators

* Fix types

* Round out functional tests

* Fix fake data

* Remove info deprecation level

* Fix extra space on cluster tab control bar

* Cleanup code and localize majority of UI controls

* Change overview tab to steps layout

* Update copy

* Localize overview tab

* Complete localization of checkup tabs

* Make ES version dynamic based on branch

* Add pagination to checkup tabs

* Rename checkup -> assistant

* Cleanup filter and group by bars

* WIP UI unit tests

* Copy tweaks

* Fix i18n formatting issues

* Update tests for copy

* Add tests for remaining UI

* Fix pagination w/ filter changes + table button color

* Small cleanup

* Add reindex button to old index deprecations

* Add shrunken indices setting to copy settings blacklist for #18469

* Add next steps to overview tab + update copy

* Remove usage of migration assistance API

* Use all/critical toggle for filter buttons

* Cloud upgrade copy

* Translate reindex button

* Remove hacked EUI type

* Show incomplete banner on all tabs

* Update copy for waiting for next version

* Review comments

* Update deprecation level type

* Update checkup tab snapshots

* Remove dependencies on types from #25168

* Use types from new global type defs

* Remove 'Reindex in Console' button

* Remove unused variable
2018-12-18 17:08:06 -06:00
Brandon Kobel 2fa3cd8bf4 Changing from /_xpack/security/ to /_security/ (#26922)
* Changing from /_xpack/security/ to /_security/

* Putting ML's routes back, will be addressed separately
2018-12-18 09:34:24 -05:00
Chris Roberson faa57fd7a9
[Monitoring] Stop a new request when one is inflight (#27253)
* Convert all pages to use the base controlller, then add logic in there to stop a new request when one is inflight

* Reuse the promise

* Undo logstash changes

* Update in catch too

* Add unit test

* Fix cluster name showing up

* Update broken test

* Just use updateDataPromise
2018-12-17 14:38:21 -05:00
Chris Cowan 53710d8ae0
[Infra UI] Update links for containers to use ID instead of name (#27088)
* Adding id and name to metadata response

* Adding name to response

* update to types

* Adding support for displayNames to waffle map

* fixing a bug when _source is missing

* Fixing tests

* making the metadata response manditory

* Fixes from PR review

* Fixing typing errors related to displayName being required part of path

* Changing 'Loading data for xxx' to 'Loading data'

* Changing InfraNodePath.displayName to InfraNodePath.label

* Change groups to use the label instead of value

* Fixing merge changes
2018-12-17 11:00:34 -07:00
Aleh Zasypkin 6995ea9513
Remove ES node discovery settings from test configuration. (#27125) 2018-12-15 00:52:55 +01:00
Caroline Horn 911b57172b
Even moar 'ui/public' LESS to SASS (#26435)
also Fixes #26597
2018-12-14 11:41:27 -05:00
Tim Sullivan 15ee6deaa9
[Reporting] Re-enable some skipped tests (#27094)
* [Test/Reporting] Enable "generates a report with/without data"

* navigate to discover before each csv test

* get another test working

* re-enable more tests

* refactor api usage tests

* catch error in createIndex to avoid race condition in test

* delete reports before
2018-12-13 17:05:34 -07:00
Chris Roberson 96338a7ea2
[Monitoring] Monitoring eui (#27064)
* [Monitoring] Cluster alerts table to EUI (#26031)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* [Monitoring] Elasticsearch monitoring to EUI (#26217)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* Update summary status

* ES nodes

* Indices page

* ML job listing

* Fix tests up

* Node listing page

* Advanced node page

* Advanced index

* Fix tests

* Fix onBrush

* Cluster listing page

* Update snapshots

* Fix functional tests

* Fix more tests

* Remove commented out code

* Update token API calls in elaticsearch.js (#26650)

* make selection border 1px (#26739)

* Reporting phantom and chromium tests should run in parallel. (#26566)

* Reporting phantom and chromium tests should run in parallel.

* Chromium tests should be done in group 9.

* Attempting to use group 2 in ci for chromium tests.

* X-pack CI jobs should have 7 groups.

* Phantom tests should be in group 7.

* [es-management/watcher] implement k7Breadcrumbs (#26719)

* [timelion] implement k7Breadcrumbs (#26729)

* [timelion] implement k7Breadcrumbs

* [timelion] show "Create" breadcrumb by default

* [es-management] implement k7Breadcrumbs (#26711)

* [es-manaagement] implement k7Breadcrumbs

* fix i18n ids

* Fixes i18n issue in space nav selector (#26742)

## Summary

Wraps the Spaces `NavControlPopover` in `<I18nProvider>`.

Fixes #26736

* [Docs] Add beta flag to central management docs (#26558)

* Feature/translate ml-jobs-jobs_list(part_1) (#25466)

Translate ml -> jobsList(part_1)

* Corrected wrong calls from .on to .off (#24575)

Closing memory leak

* Fix saved objects client _processBatchQueue function to handle errors (#26763)

* Fix saved objects client _processBatchQueue function to handle errors

* Fix error thrown in try/catch

* chore(.gitignore): ignore sublime workspace files (#26516)

* Map inspector requests by id so single requests can be reset at a time (#26770)

* [ML] Implement k7 breadcrumbs for ML routes (#26774)

* [ML] Implement k7 breadcrumbs for ML routes

* [ML] Remove duplicate nouns from jobs and settings breadcrumbs

* [Reporting] Re-enabled Chromium API tests (#26789)

* [Reporting] Test logging

* chromium api tests fixed

* whitespace

* Fix Elasticsearch typo on connection error screen (#26815)

`Elastiscearch` -> `Elasticsearch`.

* Reporting/reveal document bytes (#26667)

* Adding a `size` property to all job-reporting meta-data and showing in reporting details pane

* Enable heartbeat telemetry (#25886)

This commit allows heartbeat telemetry data to be sent through kibana.

The change to beats was introduced in https://github.com/elastic/beats/pull/8621

* Change 'Disenroll' text to be consistent with menu option 'Unenroll'. (#26816)

* Upgrading sshpk (#26834)

sshpk is an implicit dependency of request@2.88.0

* Re-enable the chromium functional tests (#26822)

* Logging when max-bytes is larger than what's set in ES (#26482)

* Simple check if ES body-size is smaller than KBN report size

* [BeatsCM] Cleanup and refactor (#26636)

* Refactor BeatsCM

* update deps

* update more deps

* update for new EUI definitions

* update import

* Revert "update deps"

This reverts commit 759a14561d.

* use _source_includes

* remove _source_includes

* work-around due to watcher UI tests

* Keep all xpack checks safe because we cant trust its there in tests for some reason

* VALIDATION. This commit is to ensure the errors in CI are coming from beats

* remove validation that this is a beats CM issue

* More try/catch to try and find where this error is

* testing another call

* revert back to dangerouslyGetActiveInjector

* ensure expire always is a number

* fix swallowed error

* Update x-pack/plugins/beats_management/public/lib/compose/kibana.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* Update x-pack/plugins/beats_management/public/utils/page_loader.test.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* Update x-pack/plugins/beats_management/public/utils/page_loader.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* fix for new webpack import

* Fix translation map

* fix URL path

* fix other link

* removing tag from beats via tag details screen now uses container

* remove debug text

* added comment/readme about routing on the client side

* enrolled beat UI now works on overview screen

* newly enrolled beat now reloads the beats table

* fix TS errors

* [APM] Transaction group agg size config (#26683)

* [APM] Fixes #24204 by adding default configs to kibana.yml

* [APM] fixes #25940 by adding APM config to control top transation group agg size

* Revert the default configs added to kibana.yml and define joi validations for `xpack.apm.ui.transactionGroupBucketSize`

* fix broken test for incorrect config

* [APM] add docs entry for `xpack.apm.ui.transactionGroupBucketSize`

* [APM] fixes #26784 by updateing import from a default to a named import (#26785)

* allow disabling gpu in tests (#26684)

* skipping failing tests (#26877)

* Feature/translate ml - jobs(part 2) (#25528)

Translate ml -> jobs - jobs-list(part_2)

* use canvas pipeline in visualize (#25996)

* Upgrade to NodeJS 10 (#25157)

* feat(NA): upgrade node js version on file configs.

* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x

* fix(NA): add missing async function declaration.

* chore(NA): updated elastic/good package to work with node10

* chore(NA): update lockfiles.

* fix(NA): add missing dep.

* fix(NA): types for node 10.

* test(NA): fix error return type for node10.

* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.

* test(NA): jest integration test for kbn-pluin-helpers.

* test(NA): fix jest tests for kbn-es.

* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* refact(NA): rewrite tests using mock-fs and completely remove this dependency.

* fix(NA): failing test implementation using jest mock in order to replace mock-fs.

* fix(NA): update jest snapshots to match new ones generated one node 10.

* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.

* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener

* test(NA): fix management advance settings image field test flow.

* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.

* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.

* refact(NA): fix eslint errors.

* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.

* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.

* fix(NA): tslint errors.

* chore(NA): upgrade types node to the last version.

* fix(NA): missing utf8 input format encoding when reading a file.

* chore(NA): upgrade to node 10.14.1

* fix(NA): Buffer api usage to avoid deprecation warnings.

* fixing a11y errors so we can add a11y rules for tslint (#26902)

* [DOCS] Deprecate X-Pack-centric watcher endpoints (#26899)

* Index lifecycle (#25553)

* [WIP] Index lifecycle (#25071)

* Index lifecycle management wizard

* Adding index lifecycle management files

* Updates

* Fix errors and add flyout for node details

* New diff tool

* Scroll to change for review diff

* Some feedback on copy

* Updating copy, moving components around and fixing bugs with the diff view

* Add logic to auto enable a phase when something is set

* redesign ilm

* Adding server api tests

* Removing debug and some tweaks from dave's work

* Conditionally show this message

* Policy selection cleanup

* Updates for better UX

* [COPYEDIT | ILM] Copyedit of text in index lifecycle management UI

* Use better default text

* Remove debug

* Adding readme and comments

* Update readme

* Do not need this anymore

* Remove debug or commented out code

* Remove these - they are in the tests PR

* Toggle system indices

* Aliases are not defined here anymore

* Handle rollover better in warm phase and remove from cold,delete

* adding learn more link component and switching over to using that

* fixing UI issue when no policies exist

* various fixes

* some cleanup

* moving number_of_replicas due to API change

* modifying some messaging

* fixing typo

* fixing some diff issues and not adding sattr_name if none chosen

* making write alias required for template step and making necessary API changes

* removing alias definition from template patching as it needs to be per index

* some copy edits for clarity

* fixing issue with editing existing policy when rollover starts the warm phase

* addressing PR feedback on server side code

* addressing PR feedback

* removing additional spaces from findMatchingNodes call

* changing template to index template in one more place

* fixing issue with error message showing when bootstrap is successful

* fixing node options for warm and cold phase

* adding seconds to duration fields to match what ES supports

* changing icon for enabled steps so it does not look like an error indicator

* adjusting icon color for enabled lifecycle steps

* fixing issue with editing an existing policy with warm phase on rollover enabled

* fixing issue with default unit for age dropdowns

* fixing issues with shrink action serialization and deserialization

* fixing issue with deserialization of ES policy for shrink

* removing shrink option from UI when primary shard count is not greater than 1 for hot phase

* going straight to create policy when no policies exist

* improving lifecycle policy selection

* adding active badge instead of checkmark for active lifecycle policy phases

* some cleanup of unneeded properties and only showing save as new when it is appropriate

* removing stray fullWidth attribute

* adding missing minimum for replica count for warm phase

* adding scroll to top for review step

* fixing issue with start warm phase after rollover introduced by time representaiton change from ES

* making shrink options not show for primary shard count of 1 as you can't shrink in that situation

* fixing issue with editing existing policy and saveAsNew

* bare bones policy table implementation

* implementing delete policy behavior

* fixing sorting and paging

* fixing policy table title

* rudimentary navigation flow

* fixing delete

* Index lifecycle management wizard (#21925)

* Index lifecycle management wizard

* Adding index lifecycle management files

* Updates

* Fix errors and add flyout for node details

* New diff tool

* Scroll to change for review diff

* Some feedback on copy

* Updating copy, moving components around and fixing bugs with the diff view

* Add logic to auto enable a phase when something is set

* redesign ilm

* Adding server api tests

* Removing debug and some tweaks from dave's work

* Conditionally show this message

* Policy selection cleanup

* Updates for better UX

* [COPYEDIT | ILM] Copyedit of text in index lifecycle management UI

* Use better default text

* Remove debug

* Adding readme and comments

* Update readme

* Do not need this anymore

* Remove debug or commented out code

* Remove these - they are in the tests PR

* Toggle system indices

* Aliases are not defined here anymore

* Handle rollover better in warm phase and remove from cold,delete

* adding learn more link component and switching over to using that

* fixing UI issue when no policies exist

* various fixes

* some cleanup

* moving number_of_replicas due to API change

* modifying some messaging

* fixing typo

* fixing some diff issues and not adding sattr_name if none chosen

* making write alias required for template step and making necessary API changes

* removing alias definition from template patching as it needs to be per index

* some copy edits for clarity

* fixing issue with editing existing policy when rollover starts the warm phase

* addressing PR feedback on server side code

* addressing PR feedback

* removing additional spaces from findMatchingNodes call

* changing template to index template in one more place

* fixing issue with error message showing when bootstrap is successful

* fixing node options for warm and cold phase

* adding seconds to duration fields to match what ES supports

* changing icon for enabled steps so it does not look like an error indicator

* adjusting icon color for enabled lifecycle steps

* fixing issue with editing an existing policy with warm phase on rollover enabled

* fixing issue with default unit for age dropdowns

* fixing issues with shrink action serialization and deserialization

* fixing issue with deserialization of ES policy for shrink

* removing shrink option from UI when primary shard count is not greater than 1 for hot phase

* going straight to create policy when no policies exist

* improving lifecycle policy selection

* adding active badge instead of checkmark for active lifecycle policy phases

* some cleanup of unneeded properties and only showing save as new when it is appropriate

* removing stray fullWidth attribute

* adding missing minimum for replica count for warm phase

* adding scroll to top for review step

* fixing issue with start warm phase after rollover introduced by time representaiton change from ES

* making shrink options not show for primary shard count of 1 as you can't shrink in that situation

* fixing issue with editing existing policy and saveAsNew

* adjusting to changes in ES API

* adding version and modified date to policies table

* implementing new CRUD approach

* simplified delete

* cleanup edit_policy

* removed wizard code

* fixing issue with edit policy

* fixing issue with closing delete confirmation modal

* making max age and max size not mutually exclusive

* removing names of covered indices from policy table

* changing minimum_age to min_age

* first pass at index lifecycle extensions

* adding retry button for ilm covered index that is in error

* first pass at index lifecycle banner

* i18n work

* more i18n

* fixing issue with node attributes

* removing console.log statements

* fixing issue with deserializing number_of_shards for edit policy

* defaulting shrink to false and fixing ui spacing issue

* removing hot phase shard count from warm phase

* scrolling to first error when user submits form for edit policy

* disabling UI for index management when enabled is false in kibana.yml

* disabling index lifecycle management when enabled is false in kibana.yml

* extending index management filter to allow for searching fields

* add support for filtering to indices with errors for index lifecycle management banner

* i18n work

* fixing error wrappers

* fixing tests

* adding view JSON for index lifecycle policy on edit screen

* fixing label for i18n on policy JSON flyout

* removing console.log statements

* fixing tests

* removing console.log statements

* adding key for banner extensions

* fixing bad import for FormattedMessage

* add link to edit index lifecycle policy from index management index summary

* adding key for map of summary extensions

* adding proper icon for retry lifecycle action

* factoring out common min age component

* factoring out common NodeAllocation component

* add copy to clipboard for json policy flyout

* adding validation rules for policy names to match ES rules

* fixing issues with policy names with non-alphabetic characters like & ^ % ?

* moving create policy button to top right and adding fill

* adding better empty state for policy list

* moving shrink and force merge titles and descriptions to the left

* moving show JSON button to right and limiting width of JSON flyout

* fixing warning about lifecycle prop type for JSON flyout

* fixing issue with warning on prop isShowingErrors

* removing outdated README

* simplifying constants

* moving components to more logical places

* moving lib and api files to services

* renaming provider to enricher

* factoring out common data enricher behavior

* consolidating index management extension code

* removing unnecessary colon

* Revert "removing unnecessary colon"

This reverts commit 19712807bb.

* removing unnecessary colon

* adding callout to ilm summary for errors

* better formatting for banner extensions

* Revert "disabling UI for index management when enabled is false in kibana.yml"

This reverts commit 45d4e8c51d.

* removing unnecessary code for detecting disabled plugin

* adding config prefix of xpack.index_lifecycle_management

* making policy link use href and consolidating link encoding logic

* removed outdated comment

* removed outdated comment

* better solution for policy name in URI

* fixing issue with index management being disabled and index_lifecycle_management not

* adding link to index management list filtered to policy name from index_lifecycle_management policy list

* fixing tests

* adding popover for stack trace for ilm errors

* adding stack trace and phase definition popovers to ilm summary in index management

* adding to blacklist for node attributes and not showing node allocation section when there are not any node attributes to choose from

* not showing create policy button in upper right for empty state

* moving policy name form field to right to be consistent with the rest of the form layout

* moving save button to left and using secondary color

* added copied to clipboard toast message

* moving activate/deactivate buttons to left on edit policy page

* deleting unnecessary less file

* using spacer instead of style

* translating success message for edit policy save

* fixing missing props warnings for EuiDescribedFormGroup usages

* better error handling borrowed from rollups

* disabling delete when a policy is attached to indices

* adding remove lifecycle policy action

* fixing issue with remove ilm policy showing for non-managed indices`

* adding add lifecycle policy action to index management extensions in index lifecycle management

* adding confirm modal for remove lifecycle policy

* fixing validation

* fixing issue with back button and edit policy retaining old policy

* removing console.log

* making no policy modal for add lifecycle policy make more sense (no add button)

* Calling reloadIndices when a lifecycle policy gets added or removed

* fixing logic issue with spinner showing

* refactoring confirm modal on policy list page

* adding an add to index template button on policy list page

* fixing console warning about select value being null

* fixing issue with modal not opening from index management table manage menu

* changing app title and adding i18n for it

* more naming changes and adding beta badge

* adding filter extension to index management and using it to add filters for index lifecycle management

* fixing broken jest test

* fixing issue with banners appearing/disappearing based on filters

* adding xpack.ilm.ui.enabled to allow cloud to disable the ui

* add ability to configure list of node attributes to ignore in kibana.yml for cloud

* filtering out reserved system templates from fetch route list

* adding warning when user tries to add a policy to a template that already has a policy

* fixing a11y issues on edit policy form

* incorporating docs team feedback on copy

* adding learn more link to add policy to index template modal

* fixing app order for management

* fixing breadcrumb issue by adding redirect for BASE_PATH (and adding memory leak fix)

* making version and covered indices column smaller and adding horizontal scroll and min width

* right align actions and better width solution for columns

* bigger spacer under callout for no node attributes

* restricting width of edit page

* fixing typo

* removing unnecessary store code for index templates

* fixing react warning about boolean type

* moving beta badge in line with title on policies screen

* better UI for show JSON for edit policy

* commenting on the memory leak fix for React Router redirects

* fixing fatal error with node allocation flyout

* fixing issue with banner not showing

* moving unmanaged/managed filter to filter group to make it clearer what they mean

* removing unused code

* copy changes

* adding context menu for policy table instead of icon buttons

* adding fix errors badge for phases

* removing unnecessary close button in flyout footer

* adding spinner when nodeOptions are not present

* moving view a list button below input

* adding more explanation to add policy to index template modal

* adding documentation link for main ILM docs in ES

* only showing view nodes link when node attributes are selected

* removing colon from flyout title

* fixing layout for view nodes button for attributes

* making loading spinner larger for node attributes select

* fixing issue with button going off end of table

* removing title from empty prompt for policy table

* fixing max width for edit policy page

* copy edits

* don't show pager when number of policies is less than minimum page size

* making number of replicas optional and adding optional label

* fixing sort for policy table

* fixing flicker for node allocation

* removing redundant message for index policies defined

* fixing spacing/alignment issues on error display for summary

* fixing issues with pager not showing and controls disappearing when filters applied

* adding tests for policy table

* more test additions

* making search bar incremental for index management

* making JSON policy flyout show ES request JSON not internal representation

* adding error message when user tries to submit add policy to index without selecting policy

* adding validation for missing template on add policy to index template modal

* adding tests for ilm index management extensions

* adding tests for edit policy

* removing learn about node attributes link until docs come

* fixing prop type warning

* adding missing translations

* better tests for edit policy

* adding tests for node attribute inputs

* better tests for node attributes

* fixing policy table test

* fixing bad i18n id

* updating snapshot

* [Telemetry] Pull local Kibana usage stats  (#26496)

* add kibana stats

* fix tests

* format the stats for telemetry

* fix the os/platform stats

* add version to locally-source kibana telemetry stats

* use callWithInternalUser

* better get_kibana module unit test verification

* separate handleKibanaStats

* variable rename

* fix comment

* fix functional test

* keep the return object literal from handleLocalStats

* validate the payload fields

* add warning log if no kibana stats returned

* add missing apm-server response error monitor (#26570)

* [DOCS] Deprecate /_xpack/security in favor of /_security (#26897)

* fix ems hotlink (#26868)

* Initialize authorization mode for reporting jobs (#26762)

* wrap non error in a try/catch (#26898)

* fix(NA): change kbn pm webpack config to generate dist files in mode=none. (#26847)

* Fail out of auth flow on first provider failure (#26648)

In practical terms, the flexibility afforded by providers being able to
recover from the failures of previously configured providers isn't
compelling, but the ambiguity is not ideal.

* fixing a11y errors so we can add a11y rules to tslint (#26895)

* EUI 5.6.0 (#26839)

* eui 5.6.0

* Import IconType in infra/types/eui.d.ts

* fixing interpreter socket error (#26870)

* fixes split chart with no data (#26872)

* fixing tooltips for line chart (#26881)

* Make space selector a button (#26889)

* [ML] Adds isRequired where applicable to timeseries_chart props. (#26880)

Adds isRequired to timeseries_chart props to match the minimum required props necessary to render the component without errors reflected in the Minimal initialization test.

* Translate share (#26802)

* Only show change password form when a password change is possible (#26779)

* only show change password form when a password change is possible

* cleanup

* remove test code

* improved message

* [Beats CM] Add basic license type (#26935)

* Improve wording when creating a space (#26915)

* copy tweaks

* update save space toast

* adjust save toast

* fixing issue with multiple execution in console (#26933)

* fixing a11y error (#26906)

* [i18n] Translate ML - File Datavisualizer (Part 1) (#25641)

translate file_datavisualizer folder of Machine Learning (Part 1)

* Use new _graph endpoints (#26956)

* [ML] Do not pass datafeed query to Discover in custom URL (#26957)

* quick ILM fixes (#26966)

* fix fatal IE 11 error with undefined TextEncoder

* fixing validation issue with hot phase

* fixing double scroll bar on IE11
:

* Fixing a11y errors in querybar and suggestion_component (#26892)

* correcting a11y errors so that we can add a11y rules to tslint

* updating the jest snapshot

* updating the jest snapshot

* do not pass 'sortOrder' to EuiContextMenuItem in share context menu (#26890)

* do not pass 'sortOrder' to EuiContextMenuItem in share context menu

* add unit test for sortOrder

* avoid using lodash

* fix merge conflicts with internationization PR

* Feat: Workpad Templates (#23966)

* Added workpad manager which contains workpad_loader and workpad_templates

* Fixed term filter in workpad_templates

* design changes

* Removed console logs

Closes workpad manager modal after cloning template

Fixed filtering workpad templates

Removed console log

Added sample templates

Added more templates to test with

Removed cloneDeep

* case insensitive template search

* Case insensitive tag order in popover

* added descriptions and tags to sample data workpads

* refine list of initial templates

* remove sample data templates, make buttons bigger

* Added template and tag registries

* Fixed workpad loader resizing issue on home page

* Moved tags to ui folder

* Fixed template class

* Fixed properties in templates to match workpad

* fix lint errors (#26985)

* Fix: Support columns with dots (#26659)

Closes https://github.com/elastic/kibana/issues/26405

Upgrades tinymath so that columns with dots now work correctly.

---

To test, follow the details in #26405.

1. Get some data that has fields with dots in them. Beats data would work, or you can create a test index with just 2 documents as follows: 

```
POST test/test
{
  "string":"abc",
  "with.dot":"abc"
}
POST test/test
{
  "string":"abcd",
  "with.dot":"abcd"
}
```

2. Create a pie chart, splitting labels on one of the available fields.

Previously, given the POST info above, only `string` would work correctly. Now both (and both of their `.keyword` variants) work correctly.

![dec-04-2018 13-35-47](https://user-images.githubusercontent.com/404731/49473970-b2cf7a00-f7d0-11e8-995b-e1a5e2a2acba.gif)

* upgrade resize-observer-polyfill version (#26990)

* Fixing issues with the url.search being null in Node 10 (#26992)

Node 10 uses `null` to denote the non-existence of a querystring
parameter when `url.parse(urlString, true)` is used, the following
changes fix our usages within the security plugin.

* Hide logs from deleteAll on task: clean client modules into dll (#26884)

* refact(NA): deleteAll function in order to allow it to not log anything out.

* fix(NA): add missing no op debug and verbose functions.

* refact(NA): wrap log calls into if calls.

* [APM] Fix for library frames not collapsing (#26827)

* [APM] fixes #26525
- simplified the stackframe grouping algorithm
- add support for `stackframe.exclude_from_grouping`
- made the rendering more tolerant of edge cases

* Made improvements to code readability and added more meaningful test cases

*  [i18n] Translate untranslated labels (#26416)

* Translate some missing translations

* Fix issues

* Add topNavMenu translations

* Fix issues

* Fix topNav

* Fix issues

* Fix issues

* Fix kbnTopNav test and parametrs description

* [ML] Fix word break in anomalies and jobs tables (#26978)

* fixes other bucket request (#26874)

* [I18n] Register translations before plugins init (#26078)

* Register translations before plugins init

* Fix i18n engine initialization

* Fix translationPath$ RxJS pipeline

* Move translations registration to mixin

* Fix arrays concatenation

* Use prettier

* Fix translations relative paths

* Use globby instead of glob

* Update docs

* Move globby to dependencies

* Get rid of translation directories config

* Update globby patterns

* Search only for current locale translation files

* [Infra UI] Fix styling after breaking EUI changes (#27021)

This restores the Infrastructure and Logs UIs after upstream changes:

* The theme json import now behaves like a ES6 module.
* The `<EuiHeaderSection>` now requires the `grow` prop to be `true` in order to grow horizontally.

* [i18n] Optimize translation labels for Roles page (#26945)

* [i18n] Optimize translation labels

* Usage of ng-if instead of ng-show

* Update APM readme

* [APM] Convert errors API to typescript (#26801)

*  [I18n] Allow i18n filter usage outside of interpolation expressions  (#26803)

* [I18n] Allow i18n filter usage outside of interpolation expressions

* Remove redundant quotes from translation

* Update tests

* Resolve comments

* Fix wrong filter usage

* Introduce `recordOf` schema. Remove redundant declarations. (#26952)

* [Infra UI] Fix graphql type generation after package upgrades (#26991)

This fixes the infrastructure UI graphql type generation after relevant packages have been upgraded in #25157.

* [Monitoring] APM monitoring to EUI (#26344)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* Update summary status

* ES nodes

* Indices page

* ML job listing

* Fix tests up

* Node listing page

* Advanced node page

* Advanced index

* Fix tests

* Fix onBrush

* Cluster listing page

* Overview page

* Update snapshots

* Fix functional tests

* Beats instances

* Fix more tests

* Update cluster tests

* Logstash UIs

* Logstash tests

* APM pages

* [Monitoring] Beats monitoring to EUI (#26287)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* Update summary status

* ES nodes

* Indices page

* ML job listing

* Fix tests up

* Node listing page

* Advanced node page

* Advanced index

* Fix tests

* Fix onBrush

* Cluster listing page

* Overview page

* Update snapshots

* Fix functional tests

* Beats instances

* Fix more tests

* Update cluster tests

* [Monitoring] Kibana monitoring to EUI (#26361)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* Update summary status

* ES nodes

* Indices page

* ML job listing

* Fix tests up

* Node listing page

* Advanced node page

* Advanced index

* Fix tests

* Fix onBrush

* Cluster listing page

* Overview page

* Update snapshots

* Fix functional tests

* Beats instances

* Fix more tests

* Update cluster tests

* Logstash UIs

* Logstash tests

* APM pages

* Kibana pages

* [Monitoring] Logstash monitoring to EUI (#26298)

* Convert cluster alerts page to use EUI tables. Also adds baseline support for all monitoring tables

* Fix tests

* Remove these two files

* Keep the original table but offer a new one so existing UIs still work

* Use different base table controller for the EUI table

* Use EUI specific asc and desc constants

* Update summary status

* ES nodes

* Indices page

* ML job listing

* Fix tests up

* Node listing page

* Advanced node page

* Advanced index

* Fix tests

* Fix onBrush

* Cluster listing page

* Overview page

* Update snapshots

* Fix functional tests

* Beats instances

* Fix more tests

* Update cluster tests

* Logstash UIs

* Logstash tests

* Add this translation back in

* PR feedback
2018-12-13 15:04:51 -05:00
Aleh Zasypkin 4d10fae8c7 Include cluster_stats.nodes.discovery_types.zen2 into cluster stats response in telemetry test. 2018-12-13 18:53:35 +01:00
Felix Stürmer 2616c452b8
[Infra UI] Fix graphql type generation after package upgrades (#26991)
This fixes the infrastructure UI graphql type generation after relevant packages have been upgraded in #25157.
2018-12-12 15:51:31 +01:00
Court Ewing 4d0424529e
Fail out of auth flow on first provider failure (#26648)
In practical terms, the flexibility afforded by providers being able to
recover from the failures of previously configured providers isn't
compelling, but the ambiguity is not ideal.
2018-12-10 20:55:07 -05:00
Gil Raphaelli ab47228729
add missing apm-server response error monitor (#26570) 2018-12-10 15:14:48 -05:00
Tim Sullivan 83b8c91e48
[Telemetry] Pull local Kibana usage stats (#26496)
* add kibana stats

* fix tests

* format the stats for telemetry

* fix the os/platform stats

* add version to locally-source kibana telemetry stats

* use callWithInternalUser

* better get_kibana module unit test verification

* separate handleKibanaStats

* variable rename

* fix comment

* fix functional test

* keep the return object literal from handleLocalStats

* validate the payload fields

* add warning log if no kibana stats returned
2018-12-10 12:21:13 -07:00
Tiago Costa 45a67701f2
Upgrade to NodeJS 10 (#25157)
* feat(NA): upgrade node js version on file configs.

* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x

* fix(NA): add missing async function declaration.

* chore(NA): updated elastic/good package to work with node10

* chore(NA): update lockfiles.

* fix(NA): add missing dep.

* fix(NA): types for node 10.

* test(NA): fix error return type for node10.

* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.

* test(NA): jest integration test for kbn-pluin-helpers.

* test(NA): fix jest tests for kbn-es.

* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* refact(NA): rewrite tests using mock-fs and completely remove this dependency.

* fix(NA): failing test implementation using jest mock in order to replace mock-fs.

* fix(NA): update jest snapshots to match new ones generated one node 10.

* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.

* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener

* test(NA): fix management advance settings image field test flow.

* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.

* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.

* refact(NA): fix eslint errors.

* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.

* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.

* fix(NA): tslint errors.

* chore(NA): upgrade types node to the last version.

* fix(NA): missing utf8 input format encoding when reading a file.

* chore(NA): upgrade to node 10.14.1

* fix(NA): Buffer api usage to avoid deprecation warnings.
2018-12-10 17:41:51 +00:00
Xavier Mouligneau 5a92309596
Add Hosts query (#25969)
* add skeleton for hosts query

* finalyze hosts query

* Update hostquery with cursor pagination

* add hoststable + some quick fixed of layout

* add how many row you want on the table

* add how many row you want on the table

* remove important in css

* add new fetch policy

* Need to have important for css but adapt to height instead of fit-content property

* fix remarks from review

* add unit testing on server side

* add api-integration

* add new mapping of ecs for event query

* add Unit test on UI components

* format constructor & remove dist

* update two obselete  snapshots
2018-12-10 11:56:34 -05:00
Peter Pisljar 7b688066a8
skipping failing tests (#26877) 2018-12-10 16:24:37 +01:00
Matt Apperson 7354a3760c
[BeatsCM] Cleanup and refactor (#26636)
* Refactor BeatsCM

* update deps

* update more deps

* update for new EUI definitions

* update import

* Revert "update deps"

This reverts commit 759a14561d.

* use _source_includes

* remove _source_includes

* work-around due to watcher UI tests

* Keep all xpack checks safe because we cant trust its there in tests for some reason

* VALIDATION. This commit is to ensure the errors in CI are coming from beats

* remove validation that this is a beats CM issue

* More try/catch to try and find where this error is

* testing another call

* revert back to dangerouslyGetActiveInjector

* ensure expire always is a number

* fix swallowed error

* Update x-pack/plugins/beats_management/public/lib/compose/kibana.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* Update x-pack/plugins/beats_management/public/utils/page_loader.test.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* Update x-pack/plugins/beats_management/public/utils/page_loader.ts

Co-Authored-By: mattapperson <me@mattapperson.com>

* fix for new webpack import

* Fix translation map

* fix URL path

* fix other link

* removing tag from beats via tag details screen now uses container

* remove debug text

* added comment/readme about routing on the client side

* enrolled beat UI now works on overview screen

* newly enrolled beat now reloads the beats table

* fix TS errors
2018-12-07 19:07:33 -05:00
Tim Sullivan ba82bc2f59
[Reporting] Re-enabled Chromium API tests (#26789)
* [Reporting] Test logging

* chromium api tests fixed

* whitespace
2018-12-07 09:27:19 -07:00
nicknak ac75236b78
Reporting phantom and chromium tests should run in parallel. (#26566)
* Reporting phantom and chromium tests should run in parallel.

* Chromium tests should be done in group 9.

* Attempting to use group 2 in ci for chromium tests.

* X-pack CI jobs should have 7 groups.

* Phantom tests should be in group 7.
2018-12-06 13:45:40 -05:00
Felix Stürmer d8f487d331
[Infra UI] Replace redux source slice with constate container (#26121) 2018-12-05 18:42:11 +01:00
Xavier Mouligneau afe82e2054
add query to check auditbeat indexes/indices/alias + indexfield query… (#26234)
* add query to check auditbeat indexes/indices/alias + indexfield query for KQL

* Add api integration test for secops with esArchiver

* restructure esArchiver folder for auditbeat

* mock is not a page

* add EmptyPage component + container to detect if audibeat indexes is set up or not + test

* fix type issues

* review re-working

* remove any for ALiases

* remove duplicate interface

* resolve PR review

* remove flicky transistion between data and no data
2018-12-04 10:24:48 -07:00
Frank Hassanabad 8de4294686
Cut down on all tests except for secops tests and one example of infr… (#24693)
* Cut down on all tests except for secops tests and one example of infra integration tests
* Commented out code for only this branch
* Added comments and "please see issue number"
* https://github.com/elastic/ingest-dev/issues/60
2018-12-04 10:02:23 -07:00
Larry Gregory 7248d23095
[test fix] - Adds authentication_realm and lookup_realm to the list of expected keys (#26470)
* adds authentication_realm and lookup_realm to the list of expected keys

* update saml tests
2018-11-30 12:11:16 -05:00
Spencer 50be0d888e
[ftr] wrap remote in browser service (#26394)
* [pageObjects/common] remove unused runScript method

* [pageObjects/common] remove almost unused doesCssSelectorExist method

* [pageObjects/graph] convert to use find/testSubjects services

* [pageObjects/discover] refactor out remote service

* [pageObjects/pointSeries] refactor out remote service

* [pageObjects/monitoring] refactor out remote service

* [ftr] refactor uses of remote to use browser or find

* [ftr/services/remote] wrap remote with browser service

* [pageObjects/security] refactor out uses of remote

* [ftr/services/browser] isolate element calls to find

* [ftr] rename remote service to __leadfoot__

* [ftr/leadfoot] cleanup some renames in find, keep names in other tests
2018-11-29 14:30:47 -08:00
Luke Elmers d46eaf9903
Show pagination on saved searches in dashboard read mode. (#26224) 2018-11-29 09:59:30 -07:00
Tim Sullivan 34d7a3bd3b
[Reporting] Better logging for waitForSelector failure (#25762)
* [Reporting] Better logging for waitForSelector failure

* break waitForSelector

* experimental changes

* cleanup/consistency

* fix some test report title strings

* test disable chromium

* roll back test code

* take out non-working phantom changes

* roll back disable chromium test

* allow logger to use curried tags

* temporarily re-do report failure-causing change for test

* replace newline with escaped for single log line

* undo test change

* remove obsolete test
2018-11-27 10:57:00 -07:00
Joe Fleming 4f1ca7e07f
Fix: revert and enable canvas tests (#26054)
## Summary

CI was broken when enabling functional smoke tests via #25262. The problem is that the Kibana build is broken in master...

I think #25711 broke it, which was merged in between #25262 passing and it being merged (and then CI breaking). So this PR reverts that PR and enabled canvas smoke tests again to see if CI will pass.

- Revert #25711
- Revert 7ae0d28d87
2018-11-21 16:25:12 -07:00
spalger 7ae0d28d87 [canvas] skip functional tests for now 2018-11-21 13:45:55 -08:00
Joe Fleming a6c6706965
test: add tags to canvas functional suite (#26046) 2018-11-21 13:47:18 -07:00
Tim Roes c8647f109b
Add typings for new tags API (#26027)
* Add typings for new tags API

* Remove test code
2018-11-21 18:55:48 +01:00
Joe Fleming 4d7c141e66
Test: canvas functional smoke test (#25262)
~~Blocked by https://github.com/elastic/kibana/issues/23046 (pending https://github.com/elastic/kibana/pull/25828)~~ merged

Adds functional smoke tests for Canvas. 

- Loads and checks the list of workpads
- Loads the first workpad and checks that elements render

This is the simple workpad it's testing

![screenshot 2018-11-19 12 37 07](https://user-images.githubusercontent.com/404731/48730518-da7ee980-ebf7-11e8-9abb-cf294079bb5f.png)
2018-11-21 10:42:03 -07:00
Spencer fad8d0cc3a
[ci][ftr][kbn/test] split up CI jobs (#25838)
* [ci][ftr][kbn/test] split up CI jobs

* [ci] run --assert-none-excluded in ci groups, before builds

* [ftr] improve error message when excluded tests found

* [ci] document other places the ciGroups live
2018-11-20 14:02:06 -08:00
Sonja Krause-Harder 40960f98ab
[Infra UI] Refactor 'capabilites' to 'metadata'. (#25580)
* Refactor 'capabilites' to 'metadata'.

* Better language in inline documentation.
2018-11-20 11:26:29 +01:00
Larry Gregory d8f8a0c26d
Fix anonymous access to status page (#24706)
* fix status.allowAnonymous

* address PR feedback
2018-11-14 16:28:26 -05:00
Brian Gaddis dc2953a8fb Combine common pdf png functions (#25152)
* Create common routines for PDF and PNG report processing

* REmove Blacklisted headers not needed

* Changes for issues with PDF and PNG testing

As per Joel Griffith suggestion I added removal of toast notifications after each click download report.  And removed setting of image density to 300.

* removed uneccesary image compare routine

* Moved server from property on job to passed in parameter.

* consolidated PDF and PNG testing

Moved test code from PDF and PNG index.test.js into a common index.test.js that now tests the common functions.

* Typescripted the common functions and broke out tests to individual test files

* Create a common create mock server function that all new tests call

* Removed unnecessary exception check and removed test include from index.ts
2018-11-14 08:28:07 -05:00
Stacey Gammon 1eaca25472
[Flaky test fix] Turn back on data_shared_attributes test (#25156)
* Turn back on data_shared_attributes test and run 20x

* Add some clean up

* Be more determinism, less refactoring.

* Go back to a single test run
2018-11-12 14:47:24 -05:00
Brandon Kobel 37b921b8a2
Using the new ES Realm syntax for SAML (#25223) 2018-11-08 09:28:53 -08:00
Chris Cowan 4a251b541a [Infra UI] Normalizing CPU usage for waffle map (#25123)
This PR changes the aggregation for calculating the CPU usage for hosts to match the metrics overview calculation by adding both system and user together then dividing it by the number of cores. This PR also includes a fix for the Docker cpu field.
2018-11-06 14:55:28 +01:00
Ryan Scovill 5dbfec7d20 fix typos (#25176) 2018-11-05 17:56:43 -07:00
Stacey Gammon 531424ef17
Disable animations for xpack functional tests too (#25148) 2018-11-05 17:17:53 -05:00
Chris Roberson 25666f8d41
Unskip the mappings test (#24667) 2018-11-05 14:57:44 -05:00
Chris Roberson 25896d625d
Re-enable these tests (#24600) 2018-11-05 14:57:02 -05:00
Stacey Gammon d92cbea5b4
skip png screenshot comparison tests, they will fail on certain jenkins agents (#25028) 2018-11-02 10:09:15 -04:00
Brian Gaddis 8efd352912 Add png output to reports 65 (#24759)
* Changes for new PNG image output for reports

Change PNG button name from Download to Generate

Changes for new PNG image output for reports

Change PNG button name from Download to Generate

Remove compatabilityShim from PNG and move to PDF folders

Changed API parameters to contain only required parameters

Added test cases for PNG reporting and added title back into the PNG API call

Merge of security changes for PNG reporting

Fixed issues with test cases for both PDF and PNG

Updated test snapshots for PNG and PDF test changes

* Adding new security changes made for PDF into new PNG code

* Removed commented out lines that were not needed
2018-11-01 16:28:00 -04:00
Larry Gregory e0b8cdf859
User management - email and name should be optional (#24842)
Fixes #17952
2018-11-01 08:58:01 -04:00
Matt Apperson 9a158c1454
[BeatsCM] Beats without tags should return an empty array via the config API (#24665) 2018-10-28 20:56:11 -04:00
Chris Roberson a0543b1aec
Skip this test until snapshots are updated (#24650) 2018-10-26 11:32:50 -04:00
Josh Dover 27e5406d7a
Upgrade Hapi in legacy platform to v17 (#21707)
* Disable even-better monitoring

* Upgrade to Hapi v15

* Upgrade to Hapi v16

* Handle optional req params correctly

* Update http and kbnServer

* Get mocha tests passing

* Convert `reply` usages [wip]

* Fix Joi and Plugin incompatibilities

* Get server up and running

* Get basic logging working

* Fix optimizer

* Fix recent route handlers

* Various fixes

* Fix recent routes

* Upgrade wreck for async/await

* Fix mocha tests

* Fix joi issues

* Fix xpack jest tests

* Fix recent routes

* Fix tests

* Fix index setup

* Decouple monitoring stats collection from good plugin

* Update reload logging test to work

* Reimplement logging with updated good plugin

* Fix unit tests

* Fix getConnections back

* Make LegacyLoggingServer compatible with Hapi v17

* Update joi types

* Fix x-pack unit tests

* Remove stray debugger

* Remove hapi-compat

* Fix API integrations

* Upgrade boom

* Fix security plugin

* Misc fixes

* bump

* Fix licensePreRoutingFactory

* Fix failing integration tests

* Remove unnecessary test change

* Remove hapi-latest package

* fx

* Various cleanup

* Fix race condition in oppsy events

* Use elastic/good fork

* Fix boom.wrap and hapi-latest changes

* Simplify LegacyLoggingServer updates

* package.json cleanup + test fix

* yarn.lock cleanup

* Change good tag

* Fixes

* Change return err -> throw err in routes

* Fix await returns

* Fix new load_data test

* Make cookie security flags consistent

* tmp doc

* Fix types

* Fix tests

* Upgrade canvas plugin

* Move good package to published @elastic/good one

* Fix SO test

* Fix logging reloading

* Update APM apis

* Fix error logging

* Fix logging test

* Convert spaces plugin

* Add validation error shim

* Remove 7.0 release notes

* Await renderApp

* Fix ccr routes

* Prevent header popovers from scrolling with page content (#23850)

* Fix spaces test

* new yarn.lock-s

* Fix spaces tests

* Remove h2o2-latest

* Fix @types/hapi

* Upgrade InfraOps plugin

* Fix package.json

* Add back isSameSite: false

* Upgrade beats_management plugin

* Update snapshot

* Fix InfraOps

* Upgrade kql_telemetry

* Merge upstream/master

* Upgrade apm and ml

* Put snapshot test back

* Fx beats

* Upgrade rollups

* Update boom usages in new plugins
2018-10-25 16:01:12 -05:00
Chris Roberson af3e62131d
[Monitoring] Rename ccr fields based on changes in ES (#24519)
* Rename ccr fields based on changes in ES

* More renames

* Update archive data

* Update snapshot

* Skip the api integration tests for now
2018-10-25 12:30:58 -04:00
Catherine Liu fb5b2291ba
Enable canvas functional tests (#24450) 2018-10-24 15:59:49 -07:00
Chris Roberson d834f620c1
[Monitoring] Add handles graph for beats (#24265)
* Add handles graph

* Add limits in the UI

* Remove debug

* Update api tests

* Fix tests

* Fix snapshots

* Skip this test for now

* Fix this test and re-enable it
2018-10-24 13:06:38 -04:00
Felix Stürmer c4e7b2f5b5
[Infra UI] Add tests for the log entries and summary api (#24354) 2018-10-24 11:03:57 +02:00
Nicolas Ruflin e8451ad40a
Add latency to index and node Elasticsearch stats (#22625)
Closes https://github.com/elastic/kibana/issues/22503
2018-10-23 19:26:30 +02:00
Sonja Krause-Harder 6b5b4cc33b
[Infra UI] Test sources and capabilities endpoints (#24216)
* Test for capabilities GraphQL endpoint.

* Test for sources GraphQL endpoint.

* Move tests to typescript.

* Renaming infraops to infra.
2018-10-23 09:20:55 +02:00
Chris Roberson c38dbaa678
[Monitoring] Fix broken api integration test (#24076)
* Fix broken api integration test

* Fix other test as well
2018-10-22 20:16:18 -04:00
Felix Stürmer 744edd9c9d
[Infra UI] functional browser test for infraops page (#24248) 2018-10-22 22:17:48 +02:00
Tim Sullivan c4cb8203b3
[Telemetry] Have Telemetry automatically get all the Kibana usage stats (#22336)
* Have Telemetry automatically get all the Kibana usage stats

* simplify

* remove reporting module

* remove unused helper function

* fix tests

* fix integration tests

* --wip-- [skip ci]

* getKibanaStats flattens nested xpack plugin stats into a single level

* fix integration test
2018-10-22 11:28:02 -07:00
Tim Sullivan a239ca2d17
Revert "Core task manager (#23555)" (#24352)
This reverts commit 8b7c513b97.
2018-10-22 11:26:48 -07:00
Chris Davies 8b7c513b97 Core task manager (#23555)
* Initial stab at core task manager logic

* Update task_manager readme

* Update task manager readme

* Add cancelable helper package, OSS, and general purpose, but
will be useful for writing cancelable x-pack tasks.

* Make the cancellable package promise-compliant

* Update task manager readme w/ reference to cancellable

* Change pool from lazy to eager, add support for sub-pools per task type.

* Move cancellable to task_manager, and typescriptify it.

* Working proof of concept for task manager. Still have lots to do:
clean up, tests, comments, validations, assertions, etc.

* Add pagination support to task manager fetch

* Move task manager to OSS

* Remove task manager reference from x-pack

* Make task_manager a valid core plugin

* Modify how task resource allocation works

* Remove the special case 'max' workers occupied value

* Remove x-pack package.json changes

* Make taskDefinitions a part of uiExports

* Make task docs saved-object compliant.

* Add kbnServer to the task context.

* Allow tasks to have a void / undefined return type

* revert x-pack change

* move cancellable to src/utils

* move to src/server

* use afterPluginsInit hook

* task_manager.ts rename

* add a wrapper with a setClient method

* Add tests for task runner

* Break task_pool into smaller, testable pieces

* return raw task doc fields for calling code

* remove todo comment

* helper module for default client
 - setClient takes a callback fn

* fix misidentified field name

* fix rest args warning

* flatten task_pool

* remove cancellable

* return raw task doc fields for calling code

* remove todo comment

* helper module for default client
 - setClient takes a callback fn

* fix rest args warning

* typescript fixes

* roll back setClient takes a callback

* createTaskRunner returns an object with run/cancel functions

* Test task store, tweak task poller tests

* Rename num_workers to max_workers

* Tweak task pool method names

* Fix cancellable test, and ts errors

* Rename doc to _doc

* Fix the doc type in the task manager index mappings

* Make task costs configurable in kibana.yml

* fix a tslint warning

* TaskManager.afterPluginsInit replaces circuitous stuff

* addMiddleware, implement beforeSave

* wip

* comment

* run context stuff

* pretty fix

* comments

* lint/pretty fixes

* safeties in case they don't define both beforeRun and beforeSave

* task runner test constructor opts fix

* Add task_manager integration tests

* FIx readme mistakes, fix schedule signature

* Fix integration tests

* Add blurb about middleware

* make a libs directory for the small things

* test for extractTaskDefinitions

* unit test for middleware

* Comment, refactor, and test task_manager

* Touch up comments

* Make task store throw error if given an unknown task type

* Fix sample task definition in readme

* Make task manager toggle on / off based on Elasticsearch connectivity

* Prevent task manager from crashing Kibana if
elasticsearch plugin is disabled

* Fix task manager signature

* Move the task manager into the task manager mixin,
fix tests. It's an uber integration object anyway, so
it seemed to make sense to keep it in one place.

* Fix task manager integration tests

* Update the task manager index creation to use auto_expand_replicas

* Fix task manager integration tests

* Fix task manager integration tests

* Fix the overzealous deletion of .kibana during tests

* Core task manager

* Allow hardcoded ID passed in

* comments

* don't deconstruct type and task for payload

* remove uiExport support

* move task_manager to x-pack/plugins

* expose as client on the plugin namespace

* fix tests

* move plugin api integration tests

* roll back readme sample task definition example

* fix sample plugin link

* server.taskManager

* sanitizeTaskDefinitions

* fix integration tests

* sanitize rename

* assert unintialized and check for duplicates in registerTaskDefinitions

* Remove unnecessary defaults from task_manager.test.ts

* Remove task manager from OSS

* Remove task manager from src

* Tidy up task_manager unit tests around elasticsearch status changes

* Integration test for specifying ID in scheduling

* Task_manager init -> preInit to allow other plugins to consume
taskManager in their init.

* Remove task manager integration tests from OSS
2018-10-22 11:25:36 -07:00
Larry Gregory 7d8ce7bc01
K7 Login screen (#23512)
This PR implements the K7 Login screen, as described in #20015

@ryankeairns @snide @kobelb 

## Login form
<img width="1310" alt="login" src="https://user-images.githubusercontent.com/3493255/46048123-d9e53d80-c0f5-11e8-9e56-acbe3a8f2b5a.png">

## Invalid credentials
![image](https://user-images.githubusercontent.com/3493255/46147388-621d2d00-c233-11e8-8a75-beba7bb5a2b2.png)


## Session expired
![image](https://user-images.githubusercontent.com/3493255/46147408-6fd2b280-c233-11e8-97c1-8acb7b2e0c06.png)


## No connection to Elasticsearch
![image](https://user-images.githubusercontent.com/3493255/46147515-adcfd680-c233-11e8-8ad4-3a21d2c06b2c.png)


## Insecure connection
![image](https://user-images.githubusercontent.com/3493255/46147433-8416af80-c233-11e8-82dc-6f32a5ec1bd0.png)



Closes #20015
2018-10-22 14:18:17 -04:00
Matt Bargar 4016572ba5
Add telemetry for KQL (#23547)
This PR adds two usage stats to our telemetry for KQL:

* How many times people click the opt in/out toggle in the query bar UI
* Which language Kibana admins have set as the global default in advanced settings
2018-10-22 11:14:54 -04:00
Chris Roberson 27dee7e158
[Monitoring] Add tests to ensure mappings exist on metric fields (#23958)
* Ensure mappings exist

* Add APM

* Remove unnecessary eslint disable comment

* Update snapshots
2018-10-22 10:12:43 -04:00
Matt Apperson a353979ebb
[BeatsCM] Beat config status added and other bug fixes (#24246)
* fix spelling

* Adds config status feature, fixes a number of other bugs

* fix typos and move beat status to OK, ERROR, and UNKNOWN

* tweak security again

* Fix typo

* remove invalid expect

* Removed cruft

* add missing field to template, renamed said field

* tweaks

* Update x-pack/test/api_integration/apis/beats/remove_tags_from_beats.js

Co-Authored-By: mattapperson <me@mattapperson.com>
2018-10-22 09:51:42 -04:00
Josh Dover 3fc8b35da8
Add server OS information to telemetry stats (#23793)
* Add server OS data to monitoring collector and telemetry

* Fixup naming

* Fix functional tests
2018-10-20 10:45:14 -05:00
Spencer 9904bd9a99
[uiSettings] upgrade old config on read (#24108)
* doing config migration during config get if necessary

* fixing issue with writing new config when user does not have write privilege

* [uiSettings] only log about config upgrade on success

* [uiSettings/createOrUpgradeSavedConfig] add onWriteError option

* [uiSettings] return the upgradeAttributes if reader is unable to write upgrade

* [uiSettings] update route tests to cover upgrade on get

* [spaces/integration-tests] add config doc to expected objects

* [uiSettings] avoid shadowed variable name
2018-10-19 20:29:38 -07:00
Chris Cowan 9189c06bd0
[Infra UI] Test for waffle map GraphQL endpoint (#24184)
* [Infra UI] Test for metrics GraphQL endpoint

* Moving apollo-boost to devDeps

* Converting tests to typescript

* Renaming infraops to infra

* Converting to typescript

* renaming from infraops to infra

* Adding waffle tests back in
2018-10-19 13:54:58 -07:00
Chris Cowan 3c15067d32
[Infra UI] Test for metrics GraphQL endpoint (#24179)
* [Infra UI] Test for metrics GraphQL endpoint

* Moving apollo-boost to devDeps

* Converting tests to typescript

* Renaming infraops to infra
2018-10-19 10:39:21 -07:00
Brandon Kobel 49168a9132
Using ES list privileges API to determine the authorization mode (#24211)
* Making it easier and more terse to specify the user for a test

* Using ES list privileges API to determine the authorization mode

This let's us correct use RBAC authorization for the proper users when
security is enabled, and spaces is disabled to detect whether they have
privileges of any kind and if so use RBAC.

* Fixing authorization service test

* Fixing tests referencing wrong expects

* Putting create test back

* Update x-pack/plugins/security/server/lib/authorization/mode.js

* Update x-pack/plugins/security/server/lib/authorization/mode.js
2018-10-18 09:28:18 -07:00
Chris Roberson f382ee2d89
Fixes from the demo (#23922) 2018-10-18 09:05:27 -04:00
Matt Apperson e405993c73
Beats Management (#23819)
* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* [Beats Management] Add Tags List (#21274)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Add TagsTable component and associated search/action bar.

* Rename some variables.

* Add constant after forgetting to save file.

* Fix design mistake in table component.

* Disable delete button when no tags selected.

* Export tags table from index.ts.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Add assignment options to Tags List.

* Remove obsolete code.

* Move tooltips for tag icons to top position.

* Beats/update (#21702)

* [ML] Fixing issue with historical job audit messages (#21718)

* Add proper aria-label for close inspector (#21719)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* add update on client side, expand update on server to allow for partial data, and user auth

* remove double beat lookup

* fix tests

* only return active beats

* disenroll now working

* fig getAll query

* re-enrolling a beat will now work

* fix types

* fix types

* update deps

* update kibana API for version

* [Beats CM] Manage Tags (#21776)

* [ML] Fixing issue with historical job audit messages (#21718)

* Add proper aria-label for close inspector (#21719)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* add update on client side, expand update on server to allow for partial data, and user auth

* remove double beat lookup

* fix tests

* only return active beats

* disenroll now working

* fig getAll query

* re-enrolling a beat will now work

* fix types

* Add create tags view.

* fix types

* update deps

* update kibana API for version

* Added component/config interface for editing/creating tags. Added separate pages for create/edit tags.

* Fixup.

* Beats/beat tags workflow (#21923)

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* add details page, re-configure routes

* move tag crud to new route stuff

* update tag create/edit component api

* tags creation now working

* bunch of stuff I should have split up better…

* fixed perf bug, selected items that are removed are no longer phantom selected

* fix rendering of assignments

* remove assign to beats, the UX was too poor

* Beats/config view (#22177)

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* add details page, re-configure routes

* move tag crud to new route stuff

* update tag create/edit component api

* tags creation now working

* bunch of stuff I should have split up better…

* fixed perf bug, selected items that are removed are no longer phantom selected

* fix rendering of assignments

* remove assign to beats, the UX was too poor

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* Beats/update (#21702)

* [ML] Fixing issue with historical job audit messages (#21718)

* Add proper aria-label for close inspector (#21719)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* add update on client side, expand update on server to allow for partial data, and user auth

* remove double beat lookup

* fix tests

* only return active beats

* disenroll now working

* fig getAll query

* re-enrolling a beat will now work

* fix types

* fix types

* update deps

* update kibana API for version

* progress on config forms

* config view inital input types working

* ts fixes

* fix more ts

* code now errors on invalid yaml

* remove un-needed include

* fix bad rebase

* saving config blocks as yaml to db is now working

* propperly formatted YAML

* loading tags back on edit screen in-progress

* fix types

* vis name validation for tag

* update EUI style

* tweak design

* fixed tag assignments (still has a ui glitch)

* fix form validation on select

* fix deps

* update deps

* attached beats now works in the edit tag screen, edit now disables changing the tag id

* better un-parsing of yaml, some elements now rendering to edit config blocks

* delete config block now works

* fix ability to edit config

* fix deps

* fix another rebase issue

* tweaks and fixes

* fix several bugs

* Beats/security (#22500)

* client side security working

* check license on route

* forgot a file

* [Beats CM] Add beats details pages (#22455)

* Move edits from previous details branch.

* Add tag view to beat details.

* Added notifications for add/remove tag from beat.

* Fix dependencies upgrade/downgrade add/removes.

* Create new page files for each sub-section of details view.

* Move page functionality from dedicated components to pages.

* [Beats CM] move to json for configs (#22693)

* move to json for configs, fix some tests

* tweaks

* add fixes (#22711)

* add fixes

* return only one config

* much improved validation for hosts, no longer require not required fields, no longer have JS in the config form config

* fix condition argument

* [Beats CM] Improve UX for assignment of tag to list of beats (#22687)

* Improve UX for assignment of tag to list of beats.

* Revert a change.

* [Beats CM] Sort beat list tags (#22729)

* Add logic to sort tags by ID when rendering in Beats List.

* Prefer lodash sortBy over inline sort implementation.

* [Beats CM] Remove key warnings from beat list components (#22772)

* Add logic to sort tags by ID when rendering in Beats List.

* Remove key warnings from beats list and associated components.

* Prefer lodash sortBy over inline sort implementation.

* [Beats CM] Add check for BeatsPage component to avoid setState when unmounted (#22836)

* Add check if component is unmounted when loading Beats List page.

* Move call to loadBeats() to componentDidMount lifecycle function.

* Update field name in table type config. (#23228)

* Utilize TagBadge functional component to standardize display of tag names. (#23253)

* [Beats CM] Add beat name to update endpoint (#23291)

* Update beat index template and update endpoints to expect name type. Add test file for update.

* Update enroll script and endpoint to create a 'name' field for beats.

* Add name field to CMBeat domain type.

* Update functional tests to include name field.

* Fix broken tag assignment functional test.

* Edit beats list table config to display most recently-updated tag time. (#23337)

* Update beat detail view info. (#23369)

* Update beat detail view info.

* Add period to end of update field.

* [Beat CM] Show only tags associated with selected beat (#23398)

* Reenable output config.

* Make beat detail tag page only show tags associated with that tag.

* Display beat name instead of ID on details screen. (#23410)

* [Beat CM] Display config name instead of beat type in beat detail view (#23411)

* Update config table in beat detail view to show config type instead of beat type.

* Modify Beat Detail view to display human-friendly names for config block types.

* [Beats CM] Add password input and re-enable output config schema (#23417)

* wip defining controls

* Complete adding formsy password field.

* Re-enable output config schema definition.

* Simplify import/export for formsy components.

* Add full list of current Filebeat & Metricbeat module (#23258)

This change also renames `Metricbeat input` to `Metricbeat module`

* Beats/ui tweaks (#23655)

* add initial breadcrumbs

* prevent errors

* New routing in place for supporting URLState needed for Kuery bar

* beats table kuery bar “working” (but not submitting)

* pulling activity view from current phase’s spec

* setup link now at correct URL

* kuery bar

* autocomplete bar now working

* Add walkthrough (#23785)

* add test system, framework, and example tests

* adding walkthrough

* clicking walkthrough step should take you to that step

* try/catch beats loading to prevent unhandeled error when there are no beats

* fix walkthrough not redirecting to main beats page

* update yarn lock files

* fix prettier

* fix x-pack package.json formatting

* update kbn server creation

* remove types from old table implementation

* move to Boom.boomify

* fix TS errors

* fix type

* rollback dep version

* fix more conflicting dep issues

* deps

* force correct node type resolution

* cleanup and skip tests (kbn test util is broken)

* added formsy and basePath

* update yarn lock file

* add beats management icon

* rename beats management main section

* Tags now called Configuration Tags in the tabs

* tokens must expire at most after 2 weeks

* fix bad auto-import

* beat details now shows the extra data needed

* tweak package.json deps for continuity

* update yarn lock for new yarn version

* [Beats CM] Re-arch table assignment control definitions (#23663)

* Patch changes to latest feature branch.

* Update table controls to offer standard search bar if kuery bar props not provided.

* Tweaked enrollment UI to inlcude beat type selection

* Reduce badge list gutter size, change logic for tag assignment to unassign all if some selected. (#24091)

* dont use genaric search bar

* removed unused import

* fix es-lint error

* fix outputs

* fix types from infra merge

* remove dupe dep

* update lock file

* push another lock file

* Add unfilteredBeats field to beat list state to prevent inappropriate redirect. (#24146)

* fix yarn lock because yarn is dumb

* Fix broken tests
2018-10-17 22:06:43 -04:00
Chris Roberson e79533dec6
Skip these tests (#24085) 2018-10-16 13:01:55 -04:00
Josh Dover 8fe71f888f
Skip failing dashboard reporting test (#24040) 2018-10-15 22:39:39 +01:00
Larry Gregory aba586fb69
Delete objects belonging to removed space (#23640)
* delete objects belonging to removed space

* remove unused parameters
2018-10-15 17:15:23 +01:00
Chris Davies ec2f025312
[WIP] Fix flaky reporting test that is failing due to a CSS animation (#23907)
Add a wait for the reporting flyout menu to animate. This workaround should be removed if we figure out how to disable animations in our test suite.
2018-10-10 09:15:48 -04:00
Brandon Kobel 4246530213
Skipping SAML tests, ES master is throwing NPEs (#23936) 2018-10-10 04:27:15 -07:00
Chris Roberson 0dcef1ed1d
Fix tests for #23013 (#23883) 2018-10-05 13:22:35 -04:00
Chris Roberson 2caf6ecb4f
[Monitoring] CCR UI (#23013)
* Initial version of CCR monitoring UI

* Adding missing files

* Use icons

* Use new column header text

* Update tests

* Basic of shard detail page

* Do these in parallel

* Disable time picker on ccr page

* Remove summary for now

* Remove unnecessary code here

* Fix a few things on the shard page

* Only send down what we need

* update snapshot

* Handle no ccr_stats documents

* Ensure we fetch the latest

* Updates

* Format the time

* Add api integration tests

* Adding pagination and sorting

* Updated query logic

* Change this back

* Add specific information about the follower and leader lag ops

* Update tests

* UI updates

* Address PR issues

* Fix tests

* Update shapshots

* Add timestamp

* Update tests

* Add a few snapshot tests

* Use timezone formatter

* Fix tests

* Fix aligment of shard table

* PR feedback

* Update snapshots

* Update snapshot
2018-10-05 08:46:21 -04:00
Brandon Kobel 2fe176c6b2
Reenable X-Pack Functional Tests (#23836)
* Make saved object client error while Kibana index is migrating

* Tidy up a bit, and refactor the way the `isMigrated` check is accessed

* Remove unused interface declaration

* Remove default migrator from saved objects repository constructor

* Fix repository migrator isComplete check

* Wrap callCluster and delay it until migrations have completed...

* Fix inaccurate comment

* Ensure migrations wait for elasticsearch to go green prior to running

* Reenabling tests

* Add tests for callCluster being wrapped in the repository, fix
the es_archiver's call to migrate index.

* Fixing esArchiver's usage of migrations

* Disabling spaces for the phanton api BWC tests

* don't throw if authorization mode is already initialized

* Adding spaces to the reporting historical archives

* Loading empty_kibana for grok debugger tests

* Enabling reporting tests

* Altering the method in which we logout users to be more fault tolerant

* Actually doing what I said before...

* Skipping Dashboard Preserve Layout, it likes to fail a lot

* Skipping dashboard view mode tests

* Putting logout back how it was, trying to make the security tests run
properly when we don't have dashboard mode tests

* Running subsection of tests that are failing

* Don't bail, run them all

* Disabling canvas, breaks logout

* Fixing spaces create legacy error assertion

* Putting comment about why we're disabling spaces for the functional
tests
2018-10-04 11:55:20 -07:00
Chris Roberson 9ba4c9ac6b
[Monitoring] Ensure we use the provided node id in the query (#23715)
* Ensure we use the right parameter name

* Update test fixture to use second node
2018-10-03 12:26:54 -04:00
Stacey Gammon 4c1c04cb40
Reporting test readme (#23507)
* Reporting test readme

* Use full urls

* more full paths

* Don't use link to session folder, it's not in repo.

* updates

* Consolidate all reporting information into the readme and link from main x-pack readme.

* be consistent with Note: styling

* Add windows steps for downloading the correct packages.
2018-10-02 12:19:28 -04:00
Larry Gregory 1f38026731
Spaces Phase 1 (#21408)
### Review notes
This is generally ready for review. We are awaiting https://github.com/elastic/elasticsearch/issues/32777 to improve handling when users do not have any access to Kibana, but this should not hold up the overall review for this PR.

This PR is massive, there's no denying that. Here's what to focus on:
1) `x-pack/plugins/spaces`: This is, well, the Spaces plugin. Everything in here is brand new. The server code is arguably more important, but feel free to review whatever you see fit.
2) `x-pack/plugins/security`: There are large and significant changes here to allow Spaces to be securable. To save a bit of time, you are free to ignore changes in `x-pack/plugins/security/public`: These are the UI changes for the role management screen, which were previously reviewed by both us and the design team.
3) `x-pack/test/saved_object_api_integration` and `x-pack/test/spaces_api_integration`: These are the API test suites which verify functionality for:
     a) Both security and spaces enabled
     b) Only security enabled
     c) Only spaces enabled

What to ignore:
1) As mentioned above, you are free to ignore changes in `x-pack/plugins/security/public`
2) Changes to `kibana/src/server/*`: These changes are part of a [different PR that we're targeting against master](https://github.com/elastic/kibana/pull/23378) for easier review.

## Saved Objects Client Extensions
A bulk of the changes to the saved objects service are in the namespaces PR, but we have a couple of important changes included here.

### Priority Queue for wrappers
We have implemented a priority queue which allows plugins to specify the order in which their SOC wrapper should be applied: `kibana/src/server/saved_objects/service/lib/priority_collection.ts`. We are leveraging this to ensure that both the security SOC wrapper and the spaces SOC wrapper are applied in the correct order (more details below).

### Spaces SOC Wrapper
This wrapper is very simple, and it is only responsible for two things:
1) Prevent users from interacting with any `space` objects (use the Spaces client instead, described below)
2) Provide a `namespace` to the underlying Saved Objects Client, and ensure that no other wrappers/callers have provided a namespace. In order to accomplish this, the Spaces wrapper uses the priority queue to ensure that it is the last wrapper invoked before calling the underlying client.

### Security SOC Wrapper
This wrapper is responsible for performing authorization checks. It uses the priority queue to ensure that it is the first wrapper invoked. To say another way, if the authorization checks fail, then no other wrappers will be called, and the base client will not be called either. This wrapper authorizes users in one of two ways: RBAC or Legacy. More details on this are below.


### Examples:
`GET /s/marketing/api/saved_objects/index-pattern/foo`

**When both Security and Spaces are enabled:**
1) Saved objects API retrieves an instance of the SOC via `savedObjects.getScopedClient()`, and invokes its `get` function
2) The Security wrapper is invoked.
    a) Authorization checks are performed to ensure user can access this particular saved object at this space.
3) The Spaces wrapper is invoked.
   a) Spaces applies a `namespace` to be used by the underlying client
4) The underlying client/repository are invoked to retrieve the object from ES.

**When only Spaces are enabled:**
1) Saved objects API retrieves an instance of the SOC via `savedObjects.getScopedClient()`, and invokes its `get` function
2) The Spaces wrapper is invoked.
   a) Spaces applies a `namespace` to be used by the underlying client
3) The underlying client/repository are invoked to retrieve the object from ES.

**When only Security is enabled:**
(assume `/s/marketing` is no longer part of the request)
1) Saved objects API retrieves an instance of the SOC via `savedObjects.getScopedClient()`, and invokes its `get` function
2) The Security wrapper is invoked.
   a) Authorization checks are performed to ensure user can access this particular saved object globally.
3) The underlying client/repository are invoked to retrieve the object from ES.

## Authorization
Authorization changes for this project are centered around Saved Objects, and builds on the work introduced in RBAC Phase 1.

### Saved objects client
#### Security without spaces
When security is enabled, but spaces is disabled, then the authorization model behaves the same way as before: If the user is taking advantage of Kibana Privileges, then we check their privileges "globally" before proceeding. A "global" privilege check specifies `resources: ['*']` when calling the [ES _has_privileges api.](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html). Legacy users (non-rbac) will continue to use the underlying index privileges for authorization.

#### Security with spaces
When both plugins are enabled, then the authorization model becomes more fine-tuned. Rather than checking privileges globally, the privileges are checked against a specific resource that matches the user's active space. In order to accomplish this, the Security plugin needs to know if Spaces is enabled, and if so, it needs to ask Spaces for the user's active space. The subsequent call to the `ES _has_privileges api` would use `resources: ['space:marketing']` to verify that the user is authorized at the `marketing` space. Legacy users (non-rbac) will continue to use the underlying index privileges for authorization. **NOTE** The legacy behavior implies that those users will have access to all spaces. The read/write restrictions are still enforced, but there is no way to restrict access to a specific space for legacy auth users.

#### Spaces without security
No authorization performed. Everyone can access everything.

### Spaces client
Spaces, when enabled, prevents saved objects of type `space` from being CRUD'd via the Saved Objects Client. Instead, the only "approved" way to work with these objects is through the new Spaces client (`kibana/x-pack/plugins/spaces/lib/spaces_client.ts`).

When security is enabled, the Spaces client performs its own set of authorization checks before allowing the request to proceed. The Spaces client knows which authorization checks need to happen for a particular request, but it doesn't know _how_ to check privileges. To accomplish this, the spaces client will delegate the check security's authorization service.

#### FAQ: Why oh why can't you used the Saved Objects Client instead!?
That's a great question! We did this primarily to simplify the authorization model (at least for our initial release). Accessing regular saved objects follows a predictible authorization pattern (described above). Spaces themselves inform the authorization model, and this interplay would have greatly increased the complexity. We are brainstorming ideas to obselete the Spaces client in favor of using the Saved Objects Client everywhere, but that's certainly out of scope for this release.



## Test Coverage
### Saved Objects API
A bulk of the changes to enable spaces are centered around saved objects, so we have spent a majority of our time automating tests against the saved objects api.

**`x-pack/test/saved_object_api_integration/`** contains the test suites for the saved objects api. There is a `common/suites` subfolder which contains a bulk of the test logic. The suites defined here are used in the following test configurations:
1) Spaces only: `./spaces_only`
2) Security and spaces: `./security_and_spaces`
3) Security only: `./security_only`

Each of these test configurations will start up ES/Kibana with the appropriate license and plugin set. Each set runs through the entire test suite described in `common/suites`. Each test with in each suite is run multiple times with different inputs, to test the various permutations of authentication, authorization type (legacy vs RBAC), space-level privileges, and the user's active space.  

### Spaces API
Spaces provides an experimental public API.

**`x-pack/test/spaces_api_integration`** contains the test suites for the Spaces API. Similar to the Saved Objects API tests described above, there is a `common/suites` folder which contains a bulk of the test logic. The suites defined here are used in the following test configurations:
1) Spaces only: `./spaces_only`
2) Security and spaces: `./security_and_spaces`


### Role Management UI
We did not provide any new functional UI tests for role management, but the existing suite was updated to accomidate the screen rewrite.

We do have a decent suite of jest unit tests for the various components that make up the new role management screen. They're nested within `kibana/x-pack/plugins/security/public/views/management/edit_role`

### Spaces Management UI
We did not provide any new functional UI tests for spaces management, but the components that make up the screens are well-tested, and can be found within `kibana/x-pack/plugins/spaces/public/views/management/edit_space`

### Spaces Functional UI Tests
There are a couple of UI tests that verify _basic_ functionality. They assert that a user can login, select a space, and then choose a different space once inside: `kibana/x-pack/test/functional/apps/spaces`



## Reference

Notable child PRs are listed below for easier digesting. Note that some of these PRs are built on other PRs, so the deltas in the links below may be outdated. Cross reference with this PR when in doubt.

### UI
- Reactify Role Management Screen: https://github.com/elastic/kibana/pull/19035
- Space Aware Privileges UI: https://github.com/elastic/kibana/pull/21049
- Space Selector (in Kibana Nav): https://github.com/elastic/kibana/pull/19497
- Recently viewed Widget: https://github.com/elastic/kibana/pull/22492
- Support Space rename/delete: https://github.com/elastic/kibana/pull/22586

### Saved Objects Client
- ~~Space Aware Saved Objects: https://github.com/elastic/kibana/pull/18862~~
- ~~Add Space ID to document id: https://github.com/elastic/kibana/pull/21372~~
- Saved object namespaces (supercedes #18862 and #21372):  https://github.com/elastic/kibana/pull/22357
- Securing saved objects: https://github.com/elastic/kibana/pull/21995
- Dedicated Spaces client (w/ security): https://github.com/elastic/kibana/pull/21995

### Other
- Public Spaces API (experimental): https://github.com/elastic/kibana/pull/22501
- Telemetry: https://github.com/elastic/kibana/pull/20581
- Reporting: https://github.com/elastic/kibana/pull/21457
- Spencer's original Spaces work: https://github.com/elastic/kibana/pull/18664
- Expose `spaceId` to "Add Data" tutorials: https://github.com/elastic/kibana/pull/22760

Closes #18948 

"Release Note: Create spaces within Kibana to organize dashboards, visualizations, and other saved objects. Secure access to each space when X-Pack Security is enabled"
2018-10-01 07:09:33 -04:00
Brian Gaddis 16b4f85151 Fix error with reporting urls generated prior to 6.2 (when there was no layout parameter) (#23508)
* removed passing of ID in to creation of layout and added a new test without a layout param

* renamed test constant so it reflects what we are testing and added comment

* Recommended Changes

* removed */ from end of line
2018-09-27 15:28:34 -07:00
Justin Kambic 6bb4355c39
[Logstash Management] Euify pipeline (#22902)
* Begin replacing pipeline editor KUI elements.

* WIP build out EUI rendering of Create Pipeline view.

* Add settings components.

* Add close functionality.

* Add save functionality.

* Add temporary dependency hack for testing purposes until EUI XY Chart replaces jquery-flot.

* Add delete pipeline button/capability.

* Add delete modal.

* Remove TODO comment.

* Added toasts.

* Switch to global toast system.

* Add toast for inactive license and readonly state.

* Remove pipeline edit template.

* Add notify on PUT and DELETE errors.

* Add null check for username prop of securityService return value.

* Add disable save button if invalid ID.

* Remove pipeline id field when editing existing pipeline.

* Remove obsolete code.

* Move PipelineEditor component to dedicated file.

* Add EUI table to pipeline list view.

* Add search to pipelines table.

* Add create/delete pipelines buttons.

* Add pagination stubs. Complete after EUI bug resolved.

* Added unselectable for non-centrally-managed pipelines.

* Add clone button to pipelines list.

* Add min page height. Fix bug with edit pipeline link.

* Remove obsolete pipeline list code.

* Remove obsolete tooltip, edit, list code.

* Disable create pipeline if id is empty.

* Move PipelineList component to dedicated file.

* Add empty state to pipeline list. Add selection messages.

* Update loading message.

* Move methods to more logical positions in component.

* Add info alerts to pipeline list.

* Remove obsolete angular template.

* Remove obsolete imports from pipeline list directive.

* Define UpgradeFailure component.

* Move UpgradeFailure subcomponents to dedicated files. Write tests.

* Move PipelineEditor subcomponents to dedicated files.

* Write tests for pipeline editor subcomponents.

* Move bare strings into constants.

* Move PipelineEditor constant values into constants file.

* Break subcomponents of InfoAlerts component into dedicated files.

* Remove obsolete constants.

* WIP - write tests for PipelineList, break table into separate component, add error empty prompt message.

* Move ConfirmDeleteModal component to dedicated file and test.

* Add TODO comment.

* Add test tags to react components.

* Add 'data-test-subj' prop to fields for func tests. Minor layout update. Run prettier on some files.

* Add data-test-subj prop to button. Disable two tests until pagination is re-added.

* Re-enabled pagination for pipeline list.

* Remove wallaby hack.

* Update pagination options, remove obsolete code.

* Fix bug introduced in refactor to display delete button at appropriate time.

* Handle max_bytes setting correctly. Add theme/mode to code editor.

* Update snapshot for new pagination.

* Remove angular template for UpgradeFailure view.

* Move bare text from Modal functional component to constant file. Update test + snapshot.

* Ran prettier on all changed documents.

* Remove obsolete TODO comments.

* Re-enable disabled functional test. Clean up TODO code.

* Fix unresolved promise in functional tests.

* Pipeline delete button hidden unless enabled, move to left.

* Make filter title more readable.

* Apply width to clone column on Pipeline List.

* Modify pipeline edit view to use 's'-size icons.

* Change pipeline editor delete button to empty button.

* Move pipeline edit actions to bottom left of form.

* Add propTypes for PipelineEditor.

* Update test snapshots.

* Update pipeline list delete button func test.

* Add pipeline edit test. Add heading to pipeline edit page.

* Move constant files to modules where they are consumed.

* Move UPGRADE_FAILURE constants into module that consumes them.

* Remove redundant tests and remove text constant imports from tests.

* Give initial values to id and description text fields to make them controlled components.

* Clean up pipeline ID form regex validation and add tests.
2018-09-27 16:58:23 -04:00
Chris Roberson f2bb7dbf9d
[Monitoring] APM Monitoring UI (#22975)
* Merge in boilerplate branch

* Manually copy over the specific metrics and UIs

* Add api integration tests

* Fix tests

* Remove unused metrics

* Update snapshot

* Fix tests

* Remove types agg

* Use ApmClusterMetric

* provide description for apm-server monitoring metrics (#23331)

* Vis LESS to SASS (cont.) (#23199)

* Tweak migrations integraiton tests to have a stable sort (#23265)

* Fix: plugin api route with security enabled (#23334)

Closes https://github.com/elastic/kibana/issues/23266

This is more of a quick fix than the final solution. The issue was that Canvas tries to check the plugins API without checking to see if the user it logged in. As a result, instead of the plugins response, it gets the HTML from the login page and that causes an error to be thrown when attempting to parse the results.

For now, this PR just disables the auth requirement on the Canvas plugin API endpoint.

* [migrations/tests] sort results before assertion (#23347)

There have been several failures in this test, seemingly caused by a lack of sorting in the results. It makes sense that since both migrations are run simultaneously that sometimes one would succeed and sometimes another would, so I've just sorted the results before checking.

![image](https://user-images.githubusercontent.com/1329312/45791153-44e9cc80-bc3d-11e8-88c4-760d4c7b35bd.png)

cc: @chrisdavies

* [ML] Moves custom URL editor Add button and form to top of flyout (#23326)

* [ML] Moves custom URL editor Add button and form to top of flyout

* [ML] Edits to custom URL editor class name

* Graph LESS to SASS (#23348)

* Developer documentation for integrating with the telemetry service (#23295)

* Developer documentation for integrating with the telemetry service

* open with a bang

* more faqs

* thing about tracking ui interactions

* talk to the plat team

* create and register

* Fix a bug where ES sends a string and migrations expect a boolean (#23313)

* chore: use cheerio in i18n.html.getDirectiveMessages (#23342)

this was only using jsdom to parse html, but cheerio allows parsing html without requiring a dom. cheerio was also already in the dependency list.

* [core/utils] add shareWeakReplay() operator (#23333)

* Chore: fix canvas test runner (#23336)

Blocked by https://github.com/elastic/kibana/pull/23342

This fixes the local test runner in Canvas. It should not affect anything else, including the CI test runner.

- Bumps JSDOM to ^12.0.0
  - I matched Kibana's version on migration, but nothing else in X-Pack uses JSDOM, so we can use the newer version (which has a very different API)
  - I had to match it because of a script that enforces version matching, but #23342 removed jsdom from Kibana, so we no longer have a version to match
- Restores the local `.babelrc` file
  - I thought it was only used for building plugins; I was wrong 😢

* Convert Discover open top nav to EUI flyout (#22971)

* move find logic to SavedObjectFinder component since savedObjectClient is no longer coupled to angular

* implement flyout open saved searches

* remove old open stuff

* add jest test for OpenSearchPanel and simplify panel title

* fix functional tests

* fix _lab_mode functional test

* Migrate save top nav in Discover and Visualize to EUI (#23190)

* extract reusable save component from DashboardSaveModal

* update discover search to use SavedObjectSaveModal

* create generic show_save_model that works for both discover and dashboard

* fix last bits of discover save

* remove old save functionallity

* migrate visualize save to EUI

* fix functional tests

* disable save button if title is empty

* mark title input as invalid when title is not provided

* fix funtional tests

* Moves styleSheetPath to uiExports (#23007)

This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.

* Timelion less to sass (#23339)

* Consistent casing

* Fix snapshot

* Update tests
2018-09-24 12:59:18 -04:00
Rashmi Kulkarni 594d447c0a
user email validation (#23346)
* Added automation for a support-dev-help ticket - user email validation  https://github.com/elastic/support-dev-help/issues/4571
2018-09-24 08:11:43 -07:00
Caroline Horn b73201752d
Graph LESS to SASS (#23348) 2018-09-20 09:35:22 -04:00
Larry Gregory 33acd60f9f
Remove ability to implicitly find across all types (#23198) 2018-09-19 07:22:43 -04:00
Chris Davies c64624ada3
Add saved object index migrations (#20243)
Migrations are the mechanism by which saved object indices are kept up to date with the Kibana codebase. Plugin authors can write their plugins to work with a certain set of mappings. Migrations ensure that the index actually conforms to those expectations.
2018-09-17 14:24:32 -04:00
Caroline Horn 9c83f81f08
Visualize LESS to SASS (#22679) 2018-09-14 13:25:03 -04:00
joe fleming baf4842802 chore: fix RBAC tests with canvas 2018-09-13 15:01:57 -07:00
Nathan Reese 1b6dcabd6c
Migrate reporting top nav to sharing context menu (#22596)
* migrate reporting top nav to sharing menu

* pass share extensions to visualize share menu

* start creating the reporting panel component

* add buttons

* generate report generatation URL

* require save if url changes

* add print layout UI

* putting it all together - generate reports from share context menu

* ensure copy button fills entire menu width

* inject job params functionallity

* refactor print layout out of ReportingContentPanel

* CSV report generation

* disable report generation when app is dirty

* update URL when window is resized

* remove all the old stuff

* clean up CSV report register provider

* fix typescript errors

* fix functional retests

* remove failure_debug folder

* close popover when generate button clicked, more work on functional tests

* set size on button and text, do not use EuiFormRow

* use ReactElement type

* move ShareContextMenuExtensionsRegistryProvider to ui/share and create interfaces for registy

* strictor typing, do not use hard coded object type name

* move registry files to typescript

* remove destructuring in the interface

* convert createReportingJob to async function, remove unneeded comment
2018-09-11 15:16:07 -06:00
Lee Drengenberg 4f26340c28
Fix rbac test (#22912)
* conditionalize Monitoring tests for Cloud testing

* make security_page/login wait

* revert these files from another PR

* revert these files from another PR
2018-09-11 10:46:10 -05:00
Larry Gregory cd5eb594a3
attempt to fix flaky tests (#22852) 2018-09-10 11:43:18 -04:00
Larry Gregory 0a870b2d97
Manage telemetry opt-in via a dedicated document (#22268) 2018-09-10 07:27:50 -04:00
Lee Drengenberg eeee0d800a
x-pack tests should use servers from other config files already loaded (#22739)
* x-pack tests should use servers from other config files already loaded

* Fix es_test_config that was using TEST_KIBANA_USERNAME/PASSWORD
2018-09-05 19:54:38 -05:00
Rashmi Kulkarni d874c21eee
added assertion for the email field. 2018-09-04 14:08:25 -07:00
Marco Vettorello 853d321ea2
Fix possible flakiness of saveVisualization action (#22356)
* Updated saveVisualization to wait for toast instead of global indicator

* Fix RBAC tests.

The saveVisualization now fails directly if the visualization is not correctly saved.

* Change editor to use toast for errors

* Change saveVisualization method to new saveVisualizationExpectSuccess

For RBAC tests used also saveVisualizationExpectFail

* Fix wrong exists method call

* Fix missing exist function
2018-08-30 15:58:31 +02:00
Chris Davies 22aa6caba4
Convert Chromium reports to puppeteer (#21788)
Update Chromium to a recent version compatible with Puppeteer.

Update Chromium build scripts to initialize build environments and work with
recent versions of Chromium.

Modify Chromium reporting logic to be driven mostly by Puppeteer.
2018-08-29 20:16:06 -04:00
Nathan Reese 9d24c00a12
Eui sharing top nav (#21997)
* just getting the popover to open and start laying out the context menu

* pass getUnhashableStates to ShareMenu

* generate original and snapshot ids

* move state into ShareUrlContent

* start working on form

* use radio group

* add input for creating short URL

* display URL in alert until copy functionallity gets migrated to EUI

* allowEmbed prop

* replace share directive with showShareContextMenu

* fix button styling

* add jest test for share_context_menu

* use EuiCopy to copy URL, add jest test for ShareUrlContent component

* clean up

* display short URL create error message in form instead of with toast

* switch option order so disbaled option can not be first

* fix discover share functional tests

* add functions required by reporting

* typescript

* remove empty file

* fix typescript compile error

* move import so jest tests work

* fix Failed prop type: The proptextToCopyis marked as required inEuiCopy, but its value isundefined

* move shortUrl out of react state and into Component object

* getUnhashableStates type from any[] to object[]

* add comment about type change once EUI issue is solved

* add functional test for saved object URL sharing

* remove commit
2018-08-28 11:59:53 -06:00
Chris Roberson db089ea5ce
[Monitoring] Ensure the settings api always return the xpack/default_admin_email (#22220)
* If the settings collector returns nothing, ensure the settings api still returns a null value for default_admin_email

* Update test

* Feedback from PR
2018-08-23 09:04:16 -04:00
Spencer 9209987165
[accessibility] implement no-animation mode, auto enable for functional tests (#21629) 2018-08-20 19:30:24 -07:00
archana cb8c1de733 [Tests] Add http integration test setup (#19261)
* [Tests] Add http integration test setup

* Base path tests

* SSL tests

* Eslint fixes

* Remove env from config schema

* Rename folders so no_rewrite and rewrite match configs/tests

* wip

* Use self-signed cert for SSL test

* Improve basepath tests

* Run base path proxy server in dev mode for now

* Remove env from x-pack reporting config

* Remove redundant base-path tests

* Test SSL with redirectHttpFromPort set

* Test SSL with redirectHttpFromPort set

* Flesh out comments

* Remove some cruft

* Add SSL tests to CI run
2018-08-17 08:36:14 +02:00
Chris Davies a73a928dea
Add a welcome screen for new Kibana instances (#21353)
Add a welcome screen to Kibana home if this is a new Kibana instance.
New is determined by whether or not there are any index patterns
defined. Local storage is used to retain the user's decision to hide
the welcome screen.
2018-08-16 13:05:29 -04:00
Tyler Smalley e726a8d463
Skip flaky Grok syntax highlighting test (#22067)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-16 07:40:59 -07:00
Josh Dover 17af683933
Reverts breaking change for Status API (#21927)
* Unbreak status API

* Update xpack test

* Bump
2018-08-13 17:26:20 -05:00
dave.snider@gmail.com 01f38a3e85
Convert all Less files to Sass in monitoring, use EUI variable scope (#20995)
Converts monitoring to use Sass instead of less.
2018-08-13 08:18:08 -07:00
Chris Roberson 9646850306
Fix test (#21882) 2018-08-10 12:44:06 -04:00
Chris Roberson 871d283ead
[Monitoring] Kibana settings api (#21100)
* Kibana settings api

* Use different version of this utility

* Adding settings api test

* Fix these tests

* Update test
2018-08-07 13:12:51 -04:00
Stacey Gammon 3aa2f6c1f1
Turn reporting snapshot tests back on with new baselines (#21441)
* Turn reporting snapshot tests back on with new baselines

* Use snapshots generated from chromium.  Bump the threshold so phantom comparisons pass

* Increase timeouts because of chromium functional tests.

* remove accidentally checked in session snapshots

* add a better vis baseline, run once through at 0 to check expected threshold

* turn on verbose logs

* Use threshold, turn debug mode on in jenkins

* Wrap both convert pages in the retry

* Update baselines

Preserve layout one got messed up - it was actually a print layout.

* bump threshold even more
2018-08-06 12:29:16 -04:00
Bill McConaghy a7f3cc99ce
accounting for angular delay in disabling input to fix test (#21530) 2018-08-02 08:09:11 -04:00
CJ Cenizal 1b9063b510
Disable flaky Shard Allocation Per Index test. (#21577) 2018-08-01 17:31:59 -07:00
Chris Roberson 3dc1c2d4c2
[Monitoring] Support legacy use cases for passthrough (#21211)
* Support legacy use cases for passthrough

* Support generic case too

* Add legacy flag

* Do not format api field names in legacy mode

* Add basic test for legacy parameter

* Add more tests
2018-07-31 10:33:13 -04:00
Aleh Zasypkin 37d12fad03
Make /api/security/v1/login to return 204 status code if no payload is provided. (#21391) 2018-07-30 15:30:52 +02:00
Stacey Gammon 0078e66f16
Retry the entire screenshotStitcher call (#20770)
* Retry the entire screenshotStitcher call

* Go back to a single run

* Only retry for this specific error.  Post more information including the git issue link
2018-07-28 08:38:39 -04:00
Rashmi Kulkarni 0499205f41
rbac functional ui test (#21188) 2018-07-26 08:56:20 -07:00
Tim Sullivan 72b779c350
[Test] Add Reporting in test on kibana_stats telemetry (#21118) 2018-07-25 16:48:06 -07:00
Nathan Reese d933175297
decouple x-pack security tests from dashboard_mode tests (#21043) 2018-07-25 10:15:23 -06:00
Chris Earle 2f082208f6
[Monitoring] Ignore Duplicate Shards (#21057)
[Monitoring] Ignore Duplicate Shards

This eliminates duplicate shards from the shard table by actively ignoring
them from the response.
2018-07-24 16:04:11 -04:00
Stacey Gammon f471aaadf5
bump reporting timeout (#20833) 2018-07-24 14:36:33 -04:00
Chris Roberson 92dd341f5c
[Monitoring] Use 0 as the default for shard count if the node is not found (#21000)
* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
2018-07-24 12:56:10 -04:00
Brandon Kobel 248b124339
RBAC Phase 1 (#19723)
* partial implementation for OLS Phase 1

* Allow Saved Objects Client to be wrapped

* Add placeholder "kibana.namespace" configuration property

* revert changes to saved objects client

* Remove circular dependency

* Removing namespace setting, we're using xpack.security.rbac.application

* Adding config.getDefault

* Expose SavedObjectsClientProvider on the server for easy plugin consumption

* migrate x-pack changes into kibana

* Beginning to use the ES APIs to insert/check privileges (#18645)

* Beginning to use the ES APIs to insert/check privileges

* Removing todo comment, I think we're good with the current check

* Adding ability to edit kibana application privileges

* Introducing DEFAULT_RESOURCE constant

* Removing unused arguments when performing saved objects auth check

* Performing bulkCreate auth more efficiently

* Throwing error in SavedObjectClient.find if type isn't provided

* Fixing Reporting and removing errant console.log

* Introducing a separate hasPrivileges "service"

* Adding tests and fleshing out the has privileges "service"

* Fixing error message

* You can now edit whatever roles you want

* We're gonna throw the find error in another PR

* Changing conflicting version detection to work when user has no
application privileges

* Throwing correct error when user is forbidden

* Removing unused interceptor

* Adding warning if they're editing a role with application privileges we
can't edit

* Fixing filter...

* Beginning to only update privileges when they need to be

* More tests

* One more test...

* Restricting the rbac application name that can be chosen

* Removing DEFAULT_RESOURCE check

* Supporting 1024 characters for the role name

* Renaming some variables, fixing issue with role w/ no kibana privileges

* Throwing decorated general error when appropriate

* Fixing test description

* Dedent does nothing...

* Renaming some functions

* Adding built-in types and alphabetizing (#19306)

* Filtering out non-default resource Kibana privileges (#19321)

* Removing unused file

* Adding kibana_rbac_dashboard_only_user to dashboard only mode roles (#19511)

* Adding create default roles test (#19505)

* RBAC - SecurityAuditLogger (#19571)

* Manually porting over the AuditLogger for use within the security audit
logger

* HasPrivileges now returns the user from the request

* Has privileges returns username from privilegeCheck

* Adding first eventType to the security audit logger

* Adding authorization success message

* Logging arguments when authorization success

* Fixing test description

* Logging args during audit failures

* RBAC Integration Tests (#19647)

* Porting over the saved objects tests, a bunch are failing, I believe
because security is preventing the requests

* Running saved objects tests with rbac and xsrf disabled

* Adding users

* BulkGet now tests under 3 users

* Adding create tests

* Adding delete tests

* Adding find tests

* Adding get tests

* Adding bulkGet forbidden tests

* Adding not a kibana user tests

* Update tests

* Renaming the actions/privileges to be closer to the functions on the
saved object client itself

* Cleaning up tests and removing without index tests

I'm considering the without index tests to be out of scope for the RBAC
API testing, and we already have unit coverage for these and integration
coverage via the OSS Saved Objects API tests.

* Fixing misspelling

* Fixing "conflicts" after merging master

* Removing some white-space differences

* Deleting files that got left behind in a merge

* Adding the RBAC API Integration Tests

* SavedObjectClient.find filtering (#19708)

* Adding ability to specify filters when calling the repository

* Implementing find filtering

* Revert "Adding ability to specify filters when calling the repository"

This reverts commit 9da30a15db.

* Adding integration tests for find filtering

* Adding forbidden auth logging

* Adding asserts to make sure some audit log isn't used

* Adding more audit log specific tests

* Necessarly is not a work, unfortunately

* Fixing test

* More descriptive name than "result"

* Better unauthorized find message?

* Adding getTypes tests

* Trying to isolate cause of rbac test failures

* Adding .toLowerCase() to work around capitalization issue

* No longer exposing the auditLogger, we don't need it like that right now

* Removing some unused code

* Removing defaultSettings from test that doesn't utilize them

* Fixing misspelling

* Don't need an explicit login privilege when we have them all

* Removing unused code, fixing misspelling, adding comment

* Putting a file back

* No longer creating the roles on start-up (#19799)

* Removing kibana_rbac_dashboard_only_user from dashboard only role
defaults

* Fixing small issue with editing Kibana privileges

* [RBAC Phase 1] - Update application privileges when XPack license changes (#19839)

* Adding start to supporting basic license and switching to plat/gold

* Initialize application privilages on XPack license change

* restore mirror_status_and_initialize

* additional tests and peer review updates

* Introducing watchStatusAndLicenseToInitialize

* Adding some tests

* One more test

* Even better tests

* Removing unused mirrorStatusAndInitialize

* Throwing an error if the wrong status function is called

* RBAC Legacy Fallback (#19818)

* Basic implementation, rather sloppy

* Cleaning stuff up a bit

* Beginning to write tests, going to refactor how we build the privileges

* Making the buildPrivilegesMap no longer return application name as the
main key

* Using real privileges since we need to use them for the legacy fallback

* Adding more tests

* Fixing spelling

* Fixing test description

* Fixing comment description

* Adding similar line breaks in the has privilege calls

* No more settings

* No more rbac enabled setting, we just do RBAC

* Using describe to cleanup the test cases

* Logging deprecations when using the legacy fallback

* Cleaning up a bit...

* Using the privilegeMap for the legacy fallback tests

* Now with even less duplication

* Removing stray `rbacEnabled` from angularjs

* Fixing checkLicenses tests since we added RBAC

* [Flaky Test] - wait for page load to complete (#19895)

@kobelb this seems unrelated to our RBAC Phase 1 work, but I was able to consistently reproduce this on my machine.

* [Flaky Test] Fixes flaky role test (#19899)

Here's a fix for the latest flaky test @kobelb

* Now with even easier repository access

* Sample was including login/version privileges, which was occasionally (#19915)

causing issues that were really hard to replicate

* Dynamic types (#19925)

No more hard-coded types! This will make it so that plugins that register their own mappings just transparently work.

* start to address feedback

* Fix RBAC Phase 1 merge from master (#20226)

This updates RBAC Phase 1 to work against the latest master. Specifically:
1. Removes `xpack_main`'s `registerLicenseChangeCallback`, which we introduced in `security-app-privs`, in favor of `onLicenseInfoChange`, which was recently added to master
2. Updated `x-pack/plugins/security/server/lib/watch_status_and_license_to_initialize.js` to be compliant with rxjs v6

* Retrying initialize 20 times with a scaling backoff (#20297)

* Retrying initialize 20 times with a scaling backoff

* Logging error when we are registering the privileges

* Alternate legacy fallback (#20322)

* Beginning to use alternate callWithRequest fallback

* Only use legacy fallback when user has "some" privileges on index

* Logging useLegacyFallback when there's an authorization failure

* Adding tests, logging failure during find no types fallback

* Switching to using an enum instead of success/useLegacyFallback

* Using _execute to share some of the structure

* Moving comment to where it belongs

* No longer audit logging when we use the legacy fallback

* Setting the status to red on the first error then continually (#20343)

initializing

* Renaming get*Privilege to get*Action

* Adding "instance" to alert about other application privileges

* Revising some of the naming for the edit roles screen

* One more edit role variable renamed

* hasPrivileges is now checkPrivileges

* Revising check_license tests

* Adding 2 more privileges tests

* Moving the other _find method to be near his friend

* Spelling "returning" correctly, whoops

* Adding Privileges tests

* tests for Elasticsearch's privileges APIs

* Switching the hard-coded resource from 'default' to *

* Throw error before we  execute a POST privilege call that won't work

* Resolving issue when initially registering privileges

* Logging legacy fallback deprecation warning on login (#20493)

* Logging legacy fallback deprecation on login

* Consolidation the privileges/authorization folder

* Exposing rudimentary authorization service and fixing authenticate tests

* Moving authorization services configuration to initAuthorization

* Adding "actions" service exposed by the authorization

* Fixing misspelling

* Removing invalid and unused exports

* Adding note about only adding privileges

* Calling it initAuthorizationService

* Throwing explicit validation  error in actions.getSavedObjectAction

* Deep freezing authorization service

* Adding deepFreeze tests

* Checking privileges in one call and cleaning up tests

* Deriving application from Kibana index (#20614)

* Specifying the application on the "authorization service"

* Moving watchStatusAndLicenseToInitialize to be below initAuthorizationService

* Using short-hand propery assignment

* Validate ES has_privileges response before trusting it (#20682)

* validate elasticsearch has_privileges response before trusting it

* address feedback

* Removing unused setting

* Public Role APIs (#20732)

* Beginning to work on external role management APIs

* Refactoring GET tests and adding more permutations

* Adding test for excluding other resources

* Adding get role tests

* Splitting out the endpoints, or else it's gonna get overwhelming

* Splitting out the post and delete actions

* Beginning to work on POST and the tests

* Posting the updated role

* Adding update tests

* Modifying the UI to use the new public APIs

* Removing internal roles API

* Moving the rbac api integration setup tests to use the public role apis

* Testing field_security and query

* Adding create role tests

* We can't update the transient_metadata...

* Removing debugger

* Update and delete tests

* Returning a 204 when POSTing a Role.

* Switching POST to PUT and roles to role

* We don't need the rbacApplication client-side anymore

* Adding delete route tests

* Using not found instead of not acceptable, as that's more likely

* Only allowing us to PUT known Kibana privileges

* Removing transient_metadata

* Removing one letter variable names

* Using PUT instead of POST when saving roles

* Fixing broken tests

* Adding setting to allow the user to turn off the legacy fallback (#20766)

* Pulling the version from the kibana server

* Deleting unused file

* Add API integration tests for roles with index and app privileges (#21033)

* Rbac phase1 functional UI tests (#20949)

* rbac functional tests

*  changes to the test file

* RBAC_functional test

*  incorporating review feedback

* slight modification to the addPriv() to cover all tests

* removed the @ in secure roles and perm file in the describe block  and made it look more relevant

* Fixing role management API from users

* Set a timeout when we try/catch a find, so it doesn't pause a long time

* Changing the way we detect if a user is reserved for the ftr

* Skipping flaky test
2018-07-24 12:40:50 -04:00
CJ Cenizal ab0e2badb7
Convert notify.warning calls to use toastNotifications (#20767)
* Replace notify.warning with toastNotifications in region map, vega, index_pattern, redirect_when_missing, graph, monitoring, and ML
* Link to index patterns from Graph toast.
* Delete RouteBasedNotifier.
* Remove courierNotifier and SearchTimeout and ShardFailure errors.
* Remove warning and custom notifier types.
2018-07-20 15:10:02 -07:00
Tim Sullivan 80833cde95
Remove /api/_xpack/usage and /api/_kibana/v1/stats (#20800)
/api/_xpack/usage was added as a target for 6.4.0 but it will not be
used. Instead, the /api/stats response will include usage info on
everything that gets registered with the usage service in
/src/server/usage

/api/_kibana/v1/stats is a GET API that was added in 6.2, during a point
where we thought providing usage stats through a public API would be OK
for capturing internally, with the benefit of having it be visible.

However, we've pivoted away from that idea because it doesn't line up
too well with the existing flow of data, where usage stats are combined
with the "Kibana stats" such as process uptime and number of requests.
We want to shift how we collect stats from Kibana, but it will be
gradual. It might be a while before we have an architecture that makes
sense for a standalone public API for the usage stats

This endpoint was never documented, and isn't used anywhere in the code.
It does incur a maintenance cost though.

Therefore, instead of waiting for a next major version to remove this
API, I'm removing it for 6.4. It will be marked in the release notes as
a breaking change. Since it was never documented, it should not provide
a problem.
2018-07-19 13:46:52 -07:00
Tim Sullivan f8bdc7d22a
[Test/Cleanup] Remove console.log (#21002) 2018-07-19 13:42:47 -07:00
Bill McConaghy 35dade2d3c
Reactify users roles (#20739)
* partial progress on reactifying users

* progress on EUIfication of users screen

* removing Angular stuff

* adding data-test-subj="passwordConfirmationInput"

* removing data-test-subj="userFormEmailInput" refs from tests

* fixing selector for role assignment

* some functional test fixes

* fixing some functional tests

* fixing last functional test

* removing stray console log

* fixing warnings

* attempting to fix flaky test

* trying again to fix flaky test

* PR feedback

* PR feedback

* fixing issue where form tried to submit

* adding sleep to allow user to load

* Design edits

Mainly adding wrapper EUI page elements, but also shifted around form elements.

* Fixed console error and added responsive prop to table

* addressing PR feedback

* A few more PR feedback

- Fixed alignment of table
- Removed the tooltip from the lock icon and placed the description inline.
- Changed delete button to an empty button

* addressing more PR feedback

* adding email field back in

* adding back username validation

* restoring original error message

* fixing dumb null error
2018-07-19 16:40:12 -04:00
Tim Sullivan 274617de59
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-18 16:37:04 -07:00
Tyler Smalley cca09311c0
Skip flaky Monitoring Shard Allocation Per Node tests (#20138)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-13 08:34:41 -07:00
Stacey Gammon 826758c78c
Turn reporting tests back on (#20634)
* unskip reporting tests

* Focus only on flaky test suite and run 10x

* Revert "Focus only on flaky test suite and run 10x"

This reverts commit a6616b1140c29d8d3f13666d20ae94db9a97267f.
2018-07-12 11:27:18 -04:00
archana c5432f27ba
[Tests] Run es from snapshot locally in xpack (#20585) 2018-07-10 05:25:55 -05:00
Nathan Reese 23d5dd4275
disable flaky reporting tests (#20441) 2018-07-03 16:35:02 -06:00
Tim Sullivan f7070890d4
fix monitoring elasticsearch nodes listing sort and filtering (#20321)
closes https://github.com/elastic/kibana/issues/20132
2018-07-02 10:11:44 -07:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Shaunak Kashyap da2da74a08
EUIFication: Grok Debugger (#20027)
* Move <kbn-dev-tools-app> Angular wrapper directive usage into route template

* Move sole directive into new directives folder

* WIP checkin: basic conversion to React components

* Fix sample custom patterns indentation

* Remove custom CSS

* Wrap button in EuiFormRow + define isSimulateDisabled

* Wire up simulate

* Cleanup

* Ace formatting options

* Better styling

* Adding spacing between custom patterns and simulate button

* Fixing form row widths

* Removing form row around button

* Add indentation/newlines in structured output

* Error handling

* Use constants

* Removing no-longer-used code

* Implement syntax highlighting via custom mode

* Making functional tests pass

* Adding trailing comma back

* Removing fixed heights

* Removing unnecessary styles

* Make Event Output form row full width as well

* Wrapping EuiCodeEditors in EuiPanels

* Adding spacer before callout; making spacing around callout consistent

* Clear out custom patterns from request if field is cleared out

* Clear out simulation results before attempting simulation

* Set state with untrimmed value
2018-06-22 11:51:27 -07:00
Larry Gregory 8e9d776f54
[Flaky Test] - Role Management Screen (#19988)
Fixes a flaky test by waiting for Kibana to finish all pending requests before continuing
2018-06-18 09:54:31 -04:00
CJ Cenizal 2ada1b348a
Replace Watcher's watch-type-select directive with two buttons. (#19782) 2018-06-13 17:08:13 -07:00
Tim Sullivan cbd319f92c
[Monitoring] Fix Node Advanced page (#19740)
* [Monitoring] Fix Node Advanced page

* fix metrics snapshot
2018-06-07 17:05:43 -07:00
Stacey Gammon c639deba73
Move all reporting tests into their own folder and add chromium tests (#19330)
* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
2018-06-05 18:41:23 -04:00
Tim Sullivan 1617da93dd
[X-Pack Usage API] use authentication from request headers (#19613)
* [X-Pack Usage API] use authentication from request headers

* add test for usage api no-auth

* whitespace / syntax nits

* reduce loc changed

* remove a weird looking comment
2018-06-05 10:38:02 -07:00
Justin Kambic 194e427bc8
Remove dirty prompt from Logstash Pipeline Management (#19649)
* Remove dirty prompt from Logstash Pipeline management because of Angular routing issue.

* Remove test for removed feature.
2018-06-05 12:30:11 -04:00
Tim Sullivan 6760a64c3d
[Monitoring/React] Logstash cluster status bars in react (#19433)
* [Monitoring/React] Logstash cluster status bars in react

* not have a prop named children

* simplify conditional metric

* fix functional tests
2018-05-29 14:36:32 -07:00
Stacey Gammon 803d0a61f3
Update dashboard snapshot tests (#19420)
* update snapshot tests

* Update time ranges

* Add sleeps, adjust time, update snapshots

* Skip TSVB until the issue with vertical line placement and x-axis timestamps is fixed

* fix expectations of time range with saved search creation

* remove debug line
2018-05-29 12:58:36 -04:00
Tim Sullivan 6eea4eae0f
[Monitoring] use react components for Kibana directives (#19379)
* kibana cluster status directive use react component

* fix some functional test failures
2018-05-24 18:05:51 -07:00
Stacey Gammon e3ea1a8726
Pluggable panel actions (#18877)
* Allow pluggable panel actions

* Need to register it as being used in kibana

* Some cleanup

* update snapshots to match new EUI versions, set time range

* Use newer panelActions service

* add missing await

* More clean up and fixes

* bring back window reload

* Show actions in view mode too

* delete now unused files

* Use toggle action to determin if context menu is open

* Fix tests that assume the toggle is hidden in view mode.

* Add some debug logs

* Fix up assumptions

* Previous failing test was legit - we don't want to show remove option when panel is expanded

* Embeddable can be empty before the panel is loaded

* Should look for either visualize or discover page

* Address code comments

* address code review comments

* whoops, get rid of childPanelToOpenOnClick entirely
2018-05-24 14:53:42 -04:00
Tim Sullivan d649f02c07
Monitoring/directives use react view elasticsearch (#19362)
* [Monitoring/React] Make Elasticsearch directives use React component internally

* fix more functional tests

* remove TODO

* lessen loc change
2018-05-23 16:57:37 -07:00
Tim Sullivan 77cfc94441
[Monitoring] Summary Status component data-test-subject wrap entire label/value container (#19289)
* [Monitoring] Summary Status component data-test-subject wrap entire label/value container

* update functional tests
2018-05-23 10:22:54 -07:00
Stacey Gammon c14f7a72c4
Reporting API test expansion and clean up (#18986)
* Update & expand reporting API tests

* remove xpack stuff from oss archive

* wrap "it"s so they are in expected order.

* Update expected recent stats

* url was pointing to a visualization not a csv

* Move comment around

* Merging with changes on master renaming stats to usage

* fix reference to old stats file.

* bad merge
2018-05-22 12:48:20 -04:00
Tim Sullivan 744fc0b316
[XpackMain] Add _xpack/usage API (#19232)
* [XpackMain] Add _xpack/usage API

* add xpack usage http api integration test

* comment

* misc test describe fixes

* fix integration test

* fix reply called twice

* enable api test

* enable kibana collection for integration test to work

* throw error comment
2018-05-21 16:55:26 -07:00
archana f63a3df17d
Option to run kibana from build for CI (#19125) (#19225)
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
2018-05-21 08:31:30 -05:00
archana eaa4960981
Revert "Option to run kibana from build for CI" (#19224)
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aae9a.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c6112067fc.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860303.
2018-05-18 14:09:38 -05:00
archana 5969860303
Option to run kibana from build for CI (#19125) 2018-05-18 12:45:53 -05:00
Spencer 0f8a00304b
[x-pack] remove use of resolveKibanaPath from plugin helpers (#18979) 2018-05-11 07:46:44 -07:00
Tim Sullivan 782d4d9804
[Monitoring/React] Render ES Indices Listing with Base Controller / React (#18595)
* [Monitoring/React] Render ES Indices Listing with Base Controller

Refactors the ES Indices Listing to use Base Controller and a React component instead of an Angular directive

* fix functional tests

* fix another test

* better default for summary status component

* nicer code for whitespace after label

* apiFn => apiUrlFn

* Deleted / Closed
2018-05-09 21:37:24 -07:00
Tim Sullivan 011e8b2c28
[Monitoring] reorganize metrics per stack product (#18590)
* [Monitoring/Metrics] clean up metric classes and getMetricFields static helpers

* more pull out

* more to break out

* [Monitoring] reorganize metrics per stack product

This organizes the metrics classes per product as a starting point for adding more functions to the metrics so external logic in the `get_metrics` and `get_series` modules can be simplified.

New structure:
```
plugins/monitoring/server/lib/metrics
├── __test__
│   ├── __snapshots__
│   │   └── metrics.test.js.snap
│   └── metrics.test.js
├── beats
│   ├── __test__
│   │   └── cpu_utilization_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── classes
│   ├── __test__
│   │   ├── latency_metric_calculation.test.js
│   │   └── quota_metric_calculation.test.js
│   ├── cluster_metric.js
│   ├── index.js
│   ├── metric.js
│   └── quota_metric.js
├── elasticsearch
│   ├── __test__
│   │   └── latency_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── index.js
├── kibana
│   ├── classes.js
│   └── metrics.js
├── logstash
│   ├── classes.js
│   └── metrics.js
└── metrics.js
```

* fix strange test failure

* reduce loc change
2018-05-09 18:23:27 -07:00
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Tim Sullivan 3332143d14
[Monitoring/Test] More indices listing tests to prep for refactoring (#18758) 2018-05-03 09:16:31 -07:00
Spencer d35316642d
Fix loading indicator for uiSettingsClient (#18694)
* [ui/chrome/loadingIndicator] expose VanillaJS hooks for gloabl loading indicator

* [ui/uiSettingsClient] increment/decrement loading count while request in progress

* [ui/loadingIndicator] fix HeaderPage.isGlobalLoadingIndicatorHidden()

* [ui/loadingIndicator] remove rxjs, fix tests

* [ui/loadingIndicator] improve docs

* [ui/loadingIndicator] remove needless unmounts

* [ui/loadingCount] correct typo

* [functionalTests/headerPage] awaitGlobalLoadingIndicatorHidden

* [ui/loadingCount] send subscribers the loading count on subscription

* [ui/loadingIndicator] remove error throwing, cleanup render
2018-05-02 16:37:23 -07:00
Tim Sullivan 819b35a53e
[Monitoring/Test] More API Integration tests (#18700) 2018-05-02 10:24:03 -07:00
Shaunak Kashyap bf97342356
[Grok Debugger] Adding syntax highlighting for grok expressions (#18572)
* Adding basic syntax highlighting for grok expressions

* Use EUI color palette

* Handle regex tokens, escaped and unescaped

* Return token for escaped content

* Add functional test

* Using higher-contrast colors

* Removing comment I used for developing the highlight rules

* Using object destructuring

* Removing unnecessary method
2018-04-30 12:31:23 -07:00
Tim Sullivan 9e4d4952b6
[Monitoring] add get_clusters_summary to shrink cluster api response (#18596)
This reduces the output from the clusters API in the data processing stage.

Mainly, it throws away a lot of unused fields in `elasticsearch.cluster_stats` and `elasticsearch.cluster_state`

cc @rasroh
2018-04-30 09:11:01 -07:00
Tim Sullivan 4630548d2c
[Monitoring/React] Render ES Nodes Listing with Base Controller (#18585)
* [Monitoring/React] Render ES Nodes Listing with Base Controller

Refactors the ES Nodes Listing to use Base Controller and a React component instead of an Angular directive

* remove another obsolete file
2018-04-25 17:38:30 -07:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00