Commit graph

313 commits

Author SHA1 Message Date
Caroline Horn f8c7320277
EUI 6.10.0 & Background color fixes (#30136)
* First foray into turning .application background off

* Hopefully fixing the last few plugins

* Update EUI to 6.9.0

* removing hacks

* last fixes

* Remove a few more `100vh`

* Can I remember to copy & REPLACE

* EUI at 6.10.0
2019-02-05 21:29:30 -05:00
Spencer 0aecd79c17
Remove k7design setting (#29565)
Removes support for the k6 navigation style from master. All but the first commit are targeted at a specific section of Kibana. Please take a look at the areas you're familiar with and check it off the list. We'll plan to merge this right before feature freeze.

- [ ] home
- [ ] discover
- [ ] context
- [ ] visualize
- [ ] dashboard
- [ ] devtools 
- [ ] timelion
- [ ] graph
- [x] monitoring 
- [ ] gis 
- [ ] infra 
- [x] ml 
- [ ] security 
- [ ] uptime
- [x] beatscm

@elastic/kibana-app @elastic/kibana-security @elastic/ml-ui @elastic/infrastructure-ui @elastic/kibana-gis @elastic/stack-monitoring @elastic/es-ui
2019-02-05 12:57:13 -06:00
Chris Roberson cdf3266f23
Ensure we are showing the cluster name in the breadcrumbs (#30087) 2019-02-05 12:37:35 -05:00
Shaunak Kashyap 7b68b89ef1
Removing deprecated xpack.monitoring.report_stats setting (#30017)
* Removing deprecated xpack.monitoring.report_stats setting

* Remove from docs

* Update check in xpack_main plugin to not look at monitoring settings any more
2019-02-04 19:37:32 -08:00
Chris Roberson 4dab26ab58
[Monitoring] Add flag to enable/disable CCR monitoring UI (#28840)
* Add flag to enable/disable CCR monitoring UI

* Use the cluster setting instead of a new config

* Remove debug

* Update based on PR feedback

* Ensure the CCR tab shows up on the CCR page

* Rework this so we remove the janky UX

* Update tests

* Handle both string and boolean

* Remove debug

* Fix tests

* Refactor this to use the stack_stats part of the cluster_stats document

* Update the api integration tests

* Fix this test

* Remove debug
2019-02-04 16:15:14 -05:00
Chris Roberson fba727b2c0
[Monitoring] Address some UI regressions with shard allocation (#29757)
* Address some UI regressions with shard allocation

* Renable the shard tests, and a couple others that are disabled

* PR feedback
2019-02-04 15:15:09 -05:00
Chris Roberson b10540f06f
[Monitoring] Add default search fields for each table (#29748)
* Add default search fields for each table

* Remove custom schema

* We don't need it here

* Add ccr tables

* Fix tests
2019-02-04 14:11:46 -05:00
Aleh Zasypkin d05437703d
Introduce I18nService core service and I18nContext. (#29379) 2019-02-04 13:38:00 +01:00
Ryan Keairns de92f9b1b7
Monitoring design touchup (#29479)
* UI design touchup for 7.0

* clean up chart titles and beta icon

* Make shard list wrap on IE11

* wrap table cells with much content

* fix title height above graphs on ie11

* update tests and snapshots

* update functional test for node detail

* fixing more functional tests
2019-01-31 14:32:04 -06:00
Chris Roberson c443fee919
[Monitoring] Refactor index patterns from configurable to constants (#29528)
* Move away from index patterns as configs and move them into constants

* Refactor more usages of the index patterns

* Remove debug

* Update comment

* Fix mocha tests

* PR feedback
2019-01-30 15:21:06 -05:00
Chris Roberson 6eeccb89b6
Update title to stack monitoring (#29638) 2019-01-30 14:40:04 -05:00
Chris Roberson 15f95e8b8e
Fix issue where the date format isn't passed in properly (#29637) 2019-01-30 14:25:32 -05:00
Aleh Zasypkin 86a17bfeea
Remove previously deprecated elasticsearch.* and xpack.monitoring.elasticsearch.* settings. (#29496) 2019-01-30 16:21:06 +01:00
Chris Roberson eec327b1fe
[Monitoring] Fix issues with the localization effort (#29372)
* Fix issues with the localization effort, mainly due to two ongoing refactors in the same code

* Apply suggestions from code review

Co-Authored-By: chrisronline <chrisronline@gmail.com>

* PR feedback
2019-01-30 09:04:18 -05:00
Jonathan Budzenski e9f0006890
Remove es _xpack endpoint usage (#29465)
* _xpack/rollup -> _rollup

* _xpack/sql -> _sql

* _xpack/license -> _license

* _xpack/migration -> _migration

* _xpack/watcher -> _watcher

* _xpack/monitoring -> _monitoring

* _xpack/security -> _security

* [console_extensions] regenerate

* [console_extensions] update ml overrides

* [console_extensions] update security overrides

* [console_extensions] update rollup overrides

* Revert "[console_extensions] update rollup overrides"

This reverts commit bb3742570d.

* Revert "[console_extensions] update security overrides"

This reverts commit 5c0263b35e.

* Revert "[console_extensions] update ml overrides"

This reverts commit e8254d5671.

* Revert "[console_extensions] regenerate"

This reverts commit 91b754e956.
2019-01-29 13:28:32 -06:00
Chris Roberson 5b9f2baf98
[Monitoring] Await promise properly (#29001)
* Await this promise

* Add one additional log message and a test around that
2019-01-29 09:26:36 -05:00
Chris Roberson 8756d5cfc8
[Monitoring] Use EUITooltips instead of pivotal ui (#29295)
* Use EUITooltips

* Remove the tooltip component and replace usage with EuiTooltip directly
2019-01-28 11:00:57 -05: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
Jason Rhodes a11e471420
Updates React et al to 16.6 (#24707)
* Updates react to 16.6 (latest)

* Updated fragment-based snapshots for Kibana root unit tests

* Updated fragment-based snapshots for x-pack unit tests

* Removed xpack yarn.lock file bc it is no longer needed, it was reintroduced by accident during a rebase in this branch

* React 16.6 snapshot updates, round 2 (mostly Fragment snapshot diffs)

* Updated last round of React 16.6 snapshots

* Fixes query bar issue with 16.4 gDSFP lifecycle

* Updated yarn lock (arraybuffer.slice updated)

* Updates snapshots where executeQueryOptions prop appears
2019-01-23 13:46:09 -05:00
Chris Roberson c37cf1eab2
[Monitoring] Get ready for hits total format change (#26442)
* Update the specific places we care about hits.total

* PR feedback

* Fix test
2019-01-22 12:35:26 -05: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
Chris Roberson dd0ce0f7f3
[Monitoring] Move os info into OSS collection (#28605)
* Move os info into OSS collection so the stats api can access it

* Fix tests

* copy this back for now

* Use server decorate to share from OSS to x-pack/plugins
2019-01-17 12:23:45 -05:00
Nathan Reese f26bf4ac56
Upgrade to EUI 6.3.1 (#28707)
* Upgrade to EUI 6.3.0

* use ToolTipPositions instead of EuiToolTipPosition to avoid typescript problems

* update @types/react and @types/prop-types to match EUI versions

* upgraded to EUI 6.3.1 to avoid typescript version issues
2019-01-15 11:35:41 -07:00
nicknak 7cc7147cd5
Testing x pack jest integration (#26825)
* progress

* progress

* cleanup and elastic configs

* make upgrades to support adding aditional users, with

* use defaultDeep to ensure settings pass correctly

* move needed configs to start servers into kbn_server (except x-pack plugin paths and users)

* move xpack config to an export

* add more time

* diff rollbacks

* roll back prettier diff

* revert setupUsers signature

* remove more bluebird

* update bluebird for fixes with jest compatability

* fix ts errors

* dont allow jest to keep going making errors confising

* Separates configs for jest integration core/x-pack.

* Pass nested kbn config parameters.

* Adds example x-pack integration test using live es.

* Cloud detectors should be configurable for tests.

* Cloud detectors should use native promises only.

* No erroneous comments...

* Util is only for promisify, duh!

* New tests should have docuementation to help those looking to utilize them.

* Doc section headings should be consistent with each other.

* With git there is no need to commit commented code.
2019-01-10 14:31:12 -05:00
Chris Roberson 1e9bd95626
[Monitoring] Fixing issue with EUI table filtering in monitoring UI (#27504)
* Ensure the schema is set

* Flatten certain table data lists to ensure the default field filtering works

* Fix issue with tests

* Fix issue with sort key name

* Readd localization that was removed
2019-01-09 11:00:24 -05:00
Chris Roberson fedd867f20
Update the title in the left nav (#28102) 2019-01-07 12:28:07 -05:00
Chris Roberson 877395b354
Ensure all monitoring charts respond to onBrush (#28098) 2019-01-07 08:28:38 -05: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
Shaunak Kashyap eace67bbf6
Removing old index patterns that are not expected in 7.0.0 onwards (#27915)
A monitoring cluster running Elasticsearch 7.0.0+ should never see `.monitoring-*-2-*` indices being created by the production cluster writing to it. So the Kibana Monitoring UI doesn't need to search against these indices any more.
2019-01-02 13:56:17 -08:00
Søren Louv-Jansen b034e9ceaf
Revert changes to Monitoring accidentally introduced in #27591 (#27830) 2018-12-28 12:21:09 +01:00
Chris Roberson 81511dd8ff
[Monitoring] Do not use the normalized derivative value (#27416)
* Use the non normalized value

* Update keys used in tests
2018-12-21 10:57:35 -05:00
Søren Louv-Jansen c7bd296ac4
[APM] Add missing trace_id to transaction histogram (#27591)
* [APM] Add missing trace_id to transaction histogram

* Handle 404 properly

* Fix `unhandled` issue

* Fix tests
2018-12-21 14:21:07 +01:00
Pete Harverson 9b4a5a07d8
[ML] Handle removal of backend ml.enabled node attribute (#27604) 2018-12-21 09:13:30 +00:00
Spencer b807b09f04
[uiExports/styleSheetPaths] avoid string concatenation for paths (#27471) 2018-12-20 14:58:13 -08:00
Chris Roberson 48384bb4c5
[Monitoring] Resolve some logstash UI regressions (#27530)
* Resolve some logstash UI regressions

* Re-run the setup function when attributes change
2018-12-20 10:17:36 -05:00
Chris Roberson 8283ea5c30
[Monitoring] Update missed logstash pages to EUI (#27258)
* Update logstash to EUI pages

* Adding missed functionality

* Ensure columns are sortable and update the nodes view to use the right base controller methods
2018-12-19 13:14:46 -05:00
Jonathan Budzenski b5b64f4706
Support for multiple Elasticsearch nodes and sniffing (#21928)
* Node sniffing

* update monitoring

* cleaning

* remove tests

* rewrite tests using the proxy

* fix monitoring mocha tests

* fix payload

* return full error

* default interval false

* add sniff settings to monitoring

* add docs for sniff settings

* re-add index search integration test

* catch parse error

* capital

* fix merge

* hapi upgrade

* return

* pass by prefix

* rm empty test fille

* split error handling

* fix merge

* update recent elasticsearch.url references

* prettier vs eslint

* transport.request, include query params

* mega comment

* revert elasticsearchUrl

* safe hosts

* more docs es.url references

* remove unused ml/esServerUrl

* log if both set
2018-12-18 13:22:43 -06:00
dave.snider@gmail.com a94fd11a3e
EUI 5.8.1 comes with a brand color refresh. Also removes lots of KUI (#27009)
EUI 5.7.0 had a color refresh which switched around our palette to better match branding guidelines. Hex colors are still hard coded in large parts of Kibana so most of the changes not in kbn/ui-framework are simple shifts to match that styling.
2018-12-18 10:59:31 -08: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
Leanid Shutau eefde19a7f
[I18n] Update locale data for IntlRelativeFormat and IntlMessageFormat (#26468)
* [I18n] Update locale data for IntlRelativeFormat and IntlMessageFormat

* Update locales

* Add default relative formats

* Fix en locale formats

* Update readme

* Make setFormats public

* Update snapshots

* Resolve comments

* Update locales list

* Update snapshots

* Add locale data for pseudo-locale
2018-12-18 13:25:16 +03:00
Leanid Shutau 3f9c1eebcb [I18n] Translate monitoring - uiExports (#27195)
* [I18n] Translate monitoring - uiExports

* Fix message id collision
2018-12-17 22:50:15 +03: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 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
Gil Raphaelli ab47228729
add missing apm-server response error monitor (#26570) 2018-12-10 15:14:48 -05:00
Sébastien Loix 3717ff89f0
[Typescript]: Move elastic/eui typings to single file
* [Typescript]: Move elastic/eui typings to single file

* [Typescript]: Add typings folder to copyTask when building distributable
2018-11-23 16:36:12 +01:00
Nox911 d58addc47f Feature/translate monitoring apm and chart (#25063)
* Translate monitoring - apm

* Translate monitoring - chart

* Fix issues with apm

* Fix issues with chart

* Update snapshots
2018-11-23 12:44:37 +03:00
Nox911 f19945a7df Feature/translate monitoring server(part_2) (#25402)
* Translate monitoring -> server -> metrics

* Add monitooring path to i18nrx.json file

* Fix issues

* Remove eslint rule disabling
2018-11-23 12:39:05 +03:00
Maryia Lapata a3602f62bd
[i18n] Translations for Monitoring: Beats (#24976)
* Beats translations

* Fix unit tests

* Remove colon from translated label
2018-11-21 14:55:07 +03:00
Nox911 ef4fa62f51 Feature/translate monitoring server (#25195)
* Translate monitoring server(without metrics folder)

* Fix issue

* Fix issues

* Fix issues

* Remove eslint rule disabling
2018-11-21 12:51:15 +03:00
Spencer 88af88ccdb
[chrome/breadcrumbs] migrate to the new platform (#25914)
* [chrome/breadcrumbs] migrate to the new platform

* expand some comments

* typo

* [apm] fix breadcrumbs tests
2018-11-20 13:54:59 -08:00
Nox911 43fdd0f51a Feature/translate monitoring elasticsearch and kibana (part_ 1) (#24717)
* Translate monitoring-elasticsearch

* Fix eslint errors

* Fix errors and add provider

* Fix issues

* Fix issues

* Add empty line at the end of the file

* Update tests and enzyme_helpers

* Update snapshots

* Fix issues

* Change FormattedMessage to intl.formatMessage for title attributes

* Fix issues

* Fix unit test
2018-11-19 13:50:56 +03:00
Maryia Lapata 11cda77d82
[i18n] Translations for Monitoring: Cluster and Alerts (#24736)
* Translations for Cluster and Alerts

* Translations for cluster and alerts

* Translations for cluster and alerts

* Fix typos

* Update id

* Update Notification snapshot

* Translate lastEvent label

* Revert changes for untranslated label.
2018-11-16 15:03:17 +03:00
Nox911 359c852c76 Feature/translate monitoring elasticsearch part 2 (#24734)
* Translate monitoring -> view -> elasticsearch

* Fix issues

* Translate monitoring - view -  elasticsearch and kibana

* Fix issues

* Fix issues

* Fix issues

* Fix placeholder value
2018-11-16 09:04:46 +03:00
Nox911 bdf420627a Feature/translate monitoring access denied (#24985)
* Translate monitoring - access_denied

* Translate monitoring - lib, services

* Translate monitoring - common

* Fix issues

* Fix issue
2018-11-15 15:50:55 +03:00
Nox911 8143d58ea4 Feature/translate monitoring license (#24826)
* Translate monitoring -> license

* Translate monitoring -> page_loading

* Translate monitoring -> no_data

* Fix issues

* Update unit tests

* Fix eslint
2018-11-14 17:17:49 +03:00
Nox911 aca3fe3a15 Feature/translate monitoring table (#24973)
* Translate monitoring -> summary_status, table, main.html in directives

* Fix issues

* Fix tests

* Add disable eslint for unused var  intl
2018-11-14 12:39:28 +03:00
Aleh Zasypkin ca1d280818
Fix paths to the i18n enzyme helpers in monitoring tests. (#25593) 2018-11-13 20:24:14 +01:00
Maryia Lapata 7a31758061
[i18n] Translations for Monitoring: Logstash (#24897)
* Translate Monitoring logstash

* Fix a typo

* Update unit tests
2018-11-13 17:56:02 +03:00
Chandler Prall a62252ce40
Update EUI to v5.0.0 (#25316)
* update EUI to v5.0.0

* update snapshots

* revert snapshot change

* revert snapshot change (2)
2018-11-08 10:16:44 -07:00
Chris Roberson 1acf855f2d
Use the newly added remote_cluster field for ccr (#25248) 2018-11-07 09:04:28 -05:00
Chris Roberson ae6ea6ec10
Ensure we probably init the route for the ccr page (#25050) 2018-11-05 10:01:30 -05:00
Chris Roberson b80ab1cd83
Add onBrush functionality to APM monitoring ui graphs (#24840) 2018-10-30 12:25:34 -04:00
Chris Roberson 460a297bc9
[Monitoring] Use the cluster name from metadata if it exists (#24495)
* Use the cluster name from metadata if it exists

* PR comments
2018-10-29 15:41:03 -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
Alex Seriachenko ab776d4577 Fixes #23641 (#24197) 2018-10-25 12:44:38 -04: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
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
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
Brandon Kobel 9e86a04f21
Adding option to always present the certificate when connecting to ES (#24304)
* Adding option to always present the certificate when connecting to ES

* Updating docs

* Adding some more tests

* Adding alwaysPresentCertificate option to monitoring
2018-10-23 07:12:27 -07:00
Chris Roberson df3b74bf60
[Monitoring] Preserve ccs state (#24331)
* Ensure we do not lose the ccr state in this marshalling method

* Update snapshots to capture ccs
2018-10-22 17:21:44 -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
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
Justin Kambic 2b6cd21604
[Logstash] [Pipeline Viewer] Improve LS monitoring accessibility (#24169)
* Update test data shape to conform to component proptypes.

* Add aria-labels for pipeline viewer buttons.
2018-10-18 12:43:52 -04: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 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
dave.snider@gmail.com 57b1a6ce71
Management core Less to Sass (#23596)
Converts management's less to sass. Makes minor adjustments to those pages for some design cleanup.
2018-10-04 22:33:49 -07:00
dave.snider@gmail.com 37bed9b51b
Eui 4.4.1 (#23790)
Updates EUI to 4.4.1 and includes some minor homepage changes around icons.
2018-10-04 09:35:29 -07:00
Shaunak Kashyap 84d4b0dc73
Relax check to account for metricbeat-indexed doc format (#23730)
With Metricbeat shipping Elasticsearch monitoring data (instead of internal collection by Elasticsearch), there are some subtle changes to the format of monitoring docs that are indexed into `.monitoring-es-6-*`. One such change is that metricbeat won't index fields with `null` values; instead it simply doesn't index such fields at all.

As a result, in the context of Elasticsearch monitoring docs, when it comes to docs with `type` = `shards` representing unassigned shards, the `shard.node` field was being indexed as `null` by internal Elasticearch collection, whereas the field was absent when the doc was indexed by Metricbeat.

Since both cases represent the same case — the shard being unassigned — this PR relaxes the check in the UI code to look for either case.

### Sample `shards` document indexed by internal ES collection

```js
{
   "_index":".monitoring-es-6-2018.10.02",
   "_type":"doc",
   "_id":"WUf_htOeSXOJQmiesyF5Bw:_na:metricbeat-7.0.0-alpha1-2018.10.01:0:r",
   "_source":{
      "cluster_uuid":"zXO1GjA6SJGsrPnCPkOoyA",
      "timestamp":"2018-10-02T03:54:43.364Z",
      "interval_ms":10000,
      "type":"shards",
      "source_node":null,
      "state_uuid":"WUf_htOeSXOJQmiesyF5Bw",
      "shard":{
         "state":"UNASSIGNED",
         "primary":false,
         "node":null,
         "relocating_node":null,
         "shard":0,
         "index":"metricbeat-7.0.0-alpha1-2018.10.01"
      }
   }
}
```

### Sample `shards` document indexed by Metricbeat collection

```js
{
   "_index":".monitoring-es-6-mb-2018.10.02",
   "_type":"doc",
   "_id":"FhDRTPjkQJqsgawYbxjQzw:_na:metricbeat-7.0.0-alpha1-2018.10.01:0:r",
   "_source":{
      "@timestamp":"2018-10-02T04:00:03.361Z",
      "interval_ms":10000,
      "shard":{
         "state":"UNASSIGNED",
         "primary":false,
         "index":"metricbeat-7.0.0-alpha1-2018.10.01",
         "shard":0
      },
      "state_uuid":"FhDRTPjkQJqsgawYbxjQzw",
      "beat":{
         "hostname":"Shaunaks-MBP-2",
         "version":"7.0.0-alpha1",
         "name":"Shaunaks-MBP-2"
      },
      "timestamp":"2018-10-02T04:00:03.375Z",
      "type":"shards",
      "metricset":{
         "name":"shard",
         "module":"elasticsearch",
         "host":"localhost:9200",
         "rtt":14254,
         "namespace":"elasticsearch.shard"
      },
      "host":{
         "name":"Shaunaks-MBP-2"
      },
      "cluster_uuid":"zXO1GjA6SJGsrPnCPkOoyA"
   }
}
```
2018-10-03 11:49:38 -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
Josh Dover 49798bc8ad
Add K7 header navigation (#23300)
* Add basic support for new K7 navigation

* Make visibility and app title work

* Allow nav controls on right side of navbar

* Use render callback w/ el

* Add support for multiple sides

* Remove fake spaces nav control

* Breadcrumb support

* Hide breadcrumbs in plugins when k7design is enabled:

* Fix units

* Rename k7 -> header

* Add tests

* Fix tests

* Fix loading indicator

* PR comments

* Move ts-ignore

* Use canvasApp icon type
2018-10-02 14:09:47 -05: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
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
Tyler Smalley 0e5fd324b1
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.
2018-09-20 19:01:06 -07:00
Jiří Programagor e2b304a344 [Monitoring] Properly Deduplicate Replica shards (#23183)
Issue #23179 was caused by ignoring multiple replicas of the same shard, even if they are on different nodes. This commit fixes that.
2018-09-14 12:40:11 -04:00
Nathan Reese 5f6a9a628e
bump EUI to 3.11.0 (#22745)
* bump EUI to 3.9.0

* add @types/react-virtualized

* remove react-virtualized from x-pack package.json

* bump to 3.11.0
2018-09-13 06:20:01 -06:00
Larry Gregory d021f71f6f
Only log deprecation warning if xpack:defaultAdminEmail is actually set (#22774)
This PR fixes the logic for logging the deprecation warning introduced with https://github.com/elastic/kibana/pull/22765. Previously Kibana would log the warning if the new `xpack.monitoring.cluster_alerts.email_notifications.email_address` setting was not defined, regardless of `xpack:defaultAdminEmail`'s setting.

Now, we will only log the deprecation warning if all of the following are true:
1) `xpack.monitoring.cluster_alerts.email_notifications.email_address` is not set.
2) `xpack:defaultAdminEmail` is set. (**<-- this is the new part**)
3) We haven't already logged the deprecation warning
2018-09-07 10:06:35 -04:00
Larry Gregory 5f96c903f3
Deprecate xpack:defaultAdminEmail for monitoring alerts (#22195) 2018-09-06 10:26:05 -04:00
Tim Roes 5f4a1c58e8
Move timezone settings into autoload file (#22623)
* Move timezone settings into autoload file

* Remove applying setting from timelion

* Remove manual set from ML

* Remove manual set from monitoring

* Remove now obsolete code from embedding test plugin
2018-09-05 08:55:39 +02:00
Tim Sullivan 10e88ab6b3
[Monitoring] Fix logging when Monitoring reinitializes with HUP signal (#22464) 2018-08-29 11:33:27 -07:00
Tyler Smalley f9c902f6ba
[build] Include X-Pack plugins and use aliases (#22325)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-26 14:34:08 -07: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
Tim Sullivan 8718d1ee4d
Retrofit the Bulk Uploader types combiner [ch2198] (#22030)
* Retrofit the Bulk Uploader types combiner [ch2198]

fix usage collector, add comments to formatForBulk

remove unnecessary customizations

* override default format for bulk upload for usage type collectors

* rename to ignoreForInternalUploader

* collectors -> collectorSet

* use constant for kibana_stats type

* example of data formatting for bulk in function comment
2018-08-21 12:29:04 -07:00
Tim Sullivan 108d59cb91
Allow kibana_settings collector to return nothing (#22091)
* Fix kibana_settings collector to return nothing when no settings data is found

* make code more clear
2018-08-17 11:41:02 -07:00
dave.snider@gmail.com 4ecdad2ec7
Replace deprecated breakpoint in pipelines (#22046) 2018-08-16 09:02:55 -07:00
dave.snider@gmail.com a9b3a44110
update gitignore and remove monitoring css file (#21962) 2018-08-14 10:56:40 -07:00
Jen Huang 1e6fb80be2
Upgrade to EUI 3.4.0 (#21870)
* Upgrade to EUI 3.4.0
* Update snapshots
2018-08-14 08:42:24 -07: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 dd40ac3dc2
[Monitoring] Address multiple accessibility issues (#20619)
* Add screen reader only text for monitoring charts

* Add aria label for completed recoveries

* Ensure we have aria label coverage for monitoring chart tooltips

* Ensure table rows are tabbable and include the number of results at the top

* Use EuiScreenReaderOnly

* Updated copy

* Use EUI

* Remove kui usage

* Use an id instead of aria-label

* Show results in the table footer

* Revert "Show results in the table footer"

This reverts commit d622eb7eb4.

* Show total row count within the monitoring table

* PR feedback

* PR feedback

* Ensure all charts show an interval in the tooltip

* Fix padding issue with the cluster status
2018-08-08 10:35:10 -04:00
Chris Roberson 94be31981d
Use empty strings to avoid EUI warnings (#21726) 2018-08-07 13:37:35 -04:00
Chris Roberson 2f4dd53dd7
[Monitoring] Convert info button to EUI (#20828)
* Convert info button and the rest of the page to EUI

* Update other overview pages

* Use Page directive

* Give the tooltip some more space

* Add page body to a couple places

* PR feedback
2018-08-07 11:25:09 -04:00
Chris Roberson 0d8c9d3577
[Monitoring] Convert beats overview page to use EUI components (#20765)
* Convert beats overview page to use EUI components

* More UI components for beats overview

* Set background color to white

* Update snapshots

* Add PageBody wrapper

* Update snapshots

* Use panels

* PR feedback

* Update snapshots
2018-08-06 15:51:01 -04:00
Nathan Reese f256748eaa
set pause to 'true' when refresh interval is zero (#21498)
* set pause to 'true' when refresh interval is zero

* keep original assertion

* fix expect message in functional tests now that pause is set to true

* fix executorProvider mocha test
2018-08-01 09:00:41 -06:00
Chris Roberson bacbf153fc
[Monitoring] Ensure we pass down the expiry_date for the license (#21354)
* Ensure we pass down the expiry_date for the license

* Update tests

* Update fixtues

* Update fixture

* Revert "Update fixture"

This reverts commit 0a1e7a5b29.

* Revert "Update fixtues"

This reverts commit b0c0e70200.

* Revert "Update tests"

This reverts commit 6a4421bb4e.

* Revert "Ensure we pass down the expiry_date for the license"

This reverts commit 2562395a78.

* Use expiry_date_in_millis value instead of expiry_date
2018-07-31 09:44:50 -04:00
Nathan Reese 9846120752
bump EUI to 3.2.1 (#21425)
* bump EUI to 3.2.1

* use restrictWidth instead of custom CSS
2018-07-30 16:17:05 -06:00
Chris Earle 30d4e70507
[Monitoring] Remove node_resolver Setting (#21181)
This is a breaking change that removes the
`xpack.monitoring.node_resolver` setting. This setting was deprecated in
5.6, and in 6.1 the setting was limited to `uuid` explicitly. Beginning in
7.0, after this is merged, the setting will no longer exist.
2018-07-27 17:42:21 -04:00
dave.snider@gmail.com 787c7a246a
EUI@3.0.3 (#21363) 2018-07-27 11:10:02 -07: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
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
Chris Roberson ade24f2104
[Monitoring] Remove kibana_stats.requests.status_codes from bulk uploader (#20855)
* Remove `status_codes` from bulk uploader

* Remove more references to `status_codes`
2018-07-24 10:15:26 -04:00
dave.snider@gmail.com 6ecc990274
Upgrade xpack to eui@3.0.0 (#20930)
* upgrade to eui@3.0.1
2018-07-21 08:02:50 -07: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 2216b226d6
Monitoring Angular directives to use React components (#19183)
* remove some webpack aliases for jest

* remove status icon angular directive

* fix some component import problems
2018-07-19 14:29:25 -07: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
Stacey Gammon e90f652875
Bump eui (#20774)
* bump eui

* Fixed breaking `EuiPage` changes

Mainly adding `EuiPageBody`’s where there were none

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* bump eui

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* Update jest snapshots in xpack
2018-07-17 19:28:07 -04:00
Hendrik Muhs a0a22cfc12
[Monitoring/ML] add number of forecasts to monitoring overview (#20758)
Add forecasts (Number of forecasts for an ml jobs) as column to the ML Jobs monitoring page. Related to: elastic/elasticsearch#31647
2018-07-17 16:41:19 +02:00
Tim Sullivan c043788c97
[Telemetry] move x-pack/monitoring collector classes to src/server/usage (#20248)
* [Monitoring/Telemetry] Move Usage service from Monitoring to Kibana core

* fix tests

* fix reporting integration

* roll back more diffs

* roll logger into bulk uploader to remove file duplication

* fix xpack usage api

* subclass constructor is not needed

* collectorSet has factory methods for collector object creation

* fix reporting usage jest test
2018-07-09 09:32:02 -07:00
Justin Kambic d4d5fe1368
[PipelineViewer] Test PipelineViewer sub-components (#20329)
* Rename config view to PipelineViewer.

* Decouple CollapsibleStatement from if/else using props.children.

* Add tests for PipelineViewer component.

* Test Metric component.

* Test CollapsibleStatement component.

* Test PluginStatement component.

* Test Queue component.

* Test StatementListHeading component.

* Test StatementSection component. Move StatementList component to dedicated file.

* Test StatementList component.

* Test Statement component.

* Run prettier on edited files.
2018-07-09 11:51:52 -04:00
Justin Kambic f763c3eb67
[Pipeline Viewer] Refactor collapsible statement component to wrap props.children (#20252)
* Rename config view to PipelineViewer.

* Decouple CollapsibleStatement from if/else using props.children.

* Modify function to take params instead of single object.
2018-07-02 13:59:42 -04: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
Justin Kambic f4d9e08b45
[PipelineViewer] Replace bare img tags with euiicon (#20330)
* Remove direct references to EUI SVG. Remove bare img tag from DetailDrawer.

* Update DetailDrawer test snapshots.
2018-07-01 15:37:19 -04:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Justin Kambic 068c02f1c9
[Pipeline Viewer] [Monitoring] Rename config view to PipelineViewer (#20230)
* Rename config view to PipelineViewer.

* Remove unused className.

* Remove unneeded variable.

* Format file with prettier.
2018-06-26 18:59:18 -04:00
Nathan Reese 2341661cd8
Replace timefilter angular service with singleton (#19852)
* use uiSettingsClient instead of angular config service

* replace timefilter service with singleton

* remove all other uses of timefilter service, get timefilter singleton working

* remove Private from brush event

* globalState

* fix timefilter jest test

* clean up rebase artifacts

* lint errors

* another lint error

* fix broken functional test _shared_links

* fix broken mocha test doc.js

* fix service load order breaking status page

* remove Provider from change_time_filter

* another round of mocha test updates

* convert create_brush_handler test to jest

* fix kbnGlobalTimepicker toogle mocha test

* remove _root_search_source - removed in another PR and somehow I added it back during rebase

* better comments around Object.assign and proper js-docs format

* use  so listerners get cleaned up when scope is destroyed

* listen to correct timefilter update event

* update APM to use timefilter singleton

* update angular scope when timefilter changes

* fix APM jest test

* add listenAndDigestAsync to listen.js

* fix apm breadcrumbs jest test

* move diffTime and diffInterval into timefilter

* pass mode to updateFilter to resolve functional test failure

* call registerTimefilterWithGlobalState from APM application

* remove rootScope from kbn_global_timepicker

* use  to subscribe to timefilter in cases where results need to happen in digest async

* spalger review changes

* ensure monitoring timefilter callbacks are executed inside evalAsync

* remove unneeded evalAsync calls around setTime
2018-06-26 10:29:41 -06:00
Justin Kambic 94d99d63f3
[Monitoring] [Pipeline Viewer] Remove obsolete code (#20122)
* Remove PipelineViewer component, replace with Config Viewer as index export.

* Remove tests for obsolete component.

* Remove obsolete code.

* Remove obsolete CSS.

* Remove old SVG class for graph edges.

* Remove more graph rendering code.

* Remove obsolete properties from graph classes.

* Remove unused constants.

* Remove obsolete keys from subtitle props.

* Fix broken unit tests.
2018-06-26 10:49:11 -04:00
Tim Sullivan d0595fdc4b
Separate bulk upload behavior from CollectorSet (#19691)
* Separate bulk upload behavior from CollectorSet

 - takes out a lot of behavior from CollectorSet and moves it to a class called BulkUploader
 - simplifies kibana monitoring init by taking out the indirection that startCollectorSet / createCollectorSet had
 - removes start() method from CollectorSet and calls the collector objects' init() functions from CollectorSet.register()
 - removes cleanup method from collectorSet since that was doing work for bulk uploading

* remove cleanup and fetchAfterInit methods

* test for bulk_uploader class

* improve test for collector_set

* fix reporting

* expose collectorSet if there actually is a collectorSet

* comment for enclosed function

* make collectorSet creation/expose unconditional, bulkUploader more conditional

* fix collector_set tests

* lifecycle events

* stab at collectorSet error logging from the API call

* clean up comments

* clean up comments

* fix BulkUploader mocha test

* check kibanaCollectionEnabled config before registering bulk upload and the plugin status listeners

* no singleton timer object

* just log a warning if bulk uploader start called twice

* normal quotes

* check if bulk is enabled inside of the _fetchAndUpload method

* log for stopping bulk stats

* call bulkUploader.start with the collectorSet object

* call bulkUploader.start with the collectorSet object

* roll back change for module scoped variable

* oops I broke init

* init and logging: if / elseif / elseif

* remove unnecessary check/log

* help log

* remove redundant, use data.filter.map

* use xpackInfo.onLicenseInfoChange not xpackMainPlugin.status.on('green')

* help logging

* fix unit test

* remove handler that stops upload when connection is lost
2018-06-21 13:08:32 -07:00
Justin Kambic 55a43b2805
Fix capitalization typo for className attribute. (#20104) 2018-06-21 10:04:38 -04:00
Shaunak Kashyap 64d28b955b
Remove explicit close button (#20044) 2018-06-19 23:43:24 +05:30
Tim Roes 58257c2734
Update EUI to 0.0.53 (#20005)
* Update to EUI 0.0.53

* Remove input vis specific styling

* remove double close button in dashboard add panel flyout (#2)

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
2018-06-19 17:43:26 +02:00
Justin Kambic 6f7dfcfff2
[Monitoring] [Logstash] Add Config View (#18597)
* Patch ConfigView changes from x-pack-kibana to OSS Kibana.

* Remove old css.

* Update style for queue statement.

* WIP modifying based on designer feedback.

* Add flatten function and list class.

* Rename functions to be more descriptive.

* WIP checkin. Modify components to handle flattened object list.

* Finish moving flatten logic into classes, add tests.

* Simplify flattening, remove non-native dependency. Add more tests.

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Begin adapting components for list.

* Add collapse functionality.

* Add expand functionality.

* Nested collapsed elements remain collapsed on parent expansion.

* Style section headers.

* Update Plugin statement styles.

* Add DetailDrawer support.

* Update statement formatting.

* Add stats to plugin element rows.

* Resolve conflicts.

* Remove obsolete code.

* Reorganize code.

* Remove warnings.

* Add PropTypes. Add keys to arrays and iterables.

* Update color for borders/buttons.

* Add stat class. Clean up code.

* Convert plugin statement component from class to function.

* Update queue metrics message.

* Update style to make view more responsive.

* Change section heading size.

* Remove gutter from metrics group.

* Change name "stat" to "metric".

* Remove obsolete export line, simplify declaration, based on PR feedback.

* Add new functional component in place of model class.

* Add PropTypes to several components. Rename a function. Add keys to metrics.

* Convert stateless classes to functional components.

* Prefer ES6 syntax over bindings for Component methods.

* Do not render statement section if there are no statements.

* design cleanup for pipeline viewer

* Update CSS to add min-height to page.

* Rename "elements" to "statements". Delete unused LESS variables.

* Revert naming of "statements" to "elements" for StatementList component.

* Update jest snapshots for DetailDrawer.
2018-06-18 23:42:12 -04:00
Tim Sullivan 5691dcff69
[Monitoring] Improve User Experience of Enabling Monitoring Collection (#19451)
* [Monitoring/No Data] Show a "still waiting" link after 19s

* minor bug fix: spinner if _interval_ updating

* update "we tried"

* some wording changes on activating / trying to activate monitoring

* cancel the setTimeout when component gets unmounted

* more wording tweaks

* update snapshot
2018-06-15 14:28:29 -07:00
CJ Cenizal 647d3366eb
Upgrade EUI to 0.0.52 (#19772)
* Revert "Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)"
This reverts commit c853072ca5, reintroducing EUI 0.0.52.
* Rename visualize page object selectors for manipulating combo box.
2018-06-12 10:47:20 -07:00
CJ Cenizal c853072ca5
Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)
This reverts commit a6894c6f62.
2018-06-08 14:04:26 -07:00
Bill McConaghy a6894c6f62
upping eui to 0.0.52 and updating snapshots (#19761)
* upping eui to 0.0.52 and updating snapshots

* fixing yarn.lock
2018-06-08 15:40:03 -04: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
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
Tim Sullivan 1b6c5b1c6c
[Monitoring] use defaulValue instead of filter to make pre-filled text input editable (#19462) 2018-05-29 16:30:43 -07: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
Justin Kambic aec1904685
Provide events in & out per millisecond for Logstash pipelines (#19446)
* Port changes to dedicated branch to isolate PR.

* Rename variable in test to match function name.
2018-05-25 15:26:02 -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
Tim Sullivan ce61ae41a3
[Monitoring/Reporting Stats] Move hardcoded Reporting stats type collection out of monitoring plugin (#18894)
* [Monitoring/Telemetry collection] use `typeCollector.registerType` in Reporting

* a few cleanup changes
2018-05-24 11:14:27 -07: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
dave.snider@gmail.com 51592c652a
Fix banner issue in ie11 (#19273)
* fix banner issue in ie11
2018-05-22 13:30:47 -07:00
Justin Kambic b1527d85dc
[PipelineViewer] [Monitoring] Flatten Pipeline Statement Trees (#19084)
* Add flatten function and list class.

* Rename functions to be more descriptive.

* WIP moving flatten logic to classes.

* Finish moving flatten logic into classes, add tests.

* Simplify flattening, remove non-native dependency. Add more tests.

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Fixed broken test.

* Update classes based on PR feedback.

* Update module exports, remove obsolete file.
2018-05-22 15:48:39 -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
Tim Sullivan a7c3255665
Add some collector classes for objects that get registered in a CollectorSet (#19098)
* Add some collector classes for objects that get registered in a CollectorSet

* comment cleanup

* don't pass an inline-defined logger to collectorSet

* add a helper logger function so collector has access to logger at construction
2018-05-18 13:02:54 -07:00
Justin Kambic 8425016e66
[Logstash] [PipelineViewer] Preserve all nested pipeline statements during graph conversion (#19101)
* Ensure all true/false statements are nested in IfStatements.

* Simplify nested vertex diffing.

* Rename get vertices function and test it.

* Update tests, add more tests.

* Update prompted by review feedback.

* Update tests - add required props to provided objects.

* Remove unneeded function/tests.

* PR Cleanup.
2018-05-18 09:32:52 -04:00
Justin Kambic 748d152354
Add vertex reference to pipeline statement classes. (#19134) 2018-05-16 14:31:18 -04:00
Nathan Reese 1e3e834e08
upgrade to EUI 0.0.47 (#19099) 2018-05-16 08:50:00 -06:00
Tim Sullivan 0940f5755d
[Monitoring] Rename TypeCollector to CollectorSet for semantics (#18987)
* [Monitoring] Rename TypeCollector to CollectorSet for semantics

* boring test changes

* usage collector renames

* rename initKibanaMonitoring => createCollectorSet

* fix lint
2018-05-15 13:46:20 -07:00
Tim Sullivan 9e0a6e2a31
[Monitoring] Add a yellow status phase in plugin init (#18939)
* [Monitoring] Add a yellow status phase in the startup lifecycle

* comments

* more comments

* more comment

* undo register => registerType function name change
2018-05-15 09:32:14 -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
Nathan Reese ce3b69fbe9
remove application icon assets in kibana that ship with EUI (#18570)
* remove assets in kibana that ship with EUI

* update home page tests

* replace logstash pipeline svg with EUI icon type
2018-05-07 10:59:39 -06:00
Nathan Reese 6d51db6656
upgrade to eui 0.0.46 (#18827)
* upgrade to eui 0.0.46

* update logoElasticsearch

* update x-pack jest snapshots
2018-05-05 09:08:15 -06:00
Tim Sullivan 482953c9b8
[Monitoring/Metrics] clean up metric classes and getMetricFields stat… (#18741)
* [Monitoring/Metrics] clean up metric classes and getMetricFields static helpers

* more pull out

* more to break out

* snapshot update
2018-05-02 17:29:25 -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
Nathan Reese 5a4263ad2d
update to eui 0.0.44 (#18606)
* update to eui 0.0.44

* keep eui dependency in x-pack

* wrap EuiBasic table column in span to avoid className prop from getting overridden

* remove brittle functional tests that are no longer needed with EUI components

* filter field list instead of chaning table size

* update x-pack snapshots
2018-04-27 11:07:15 -06: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
Tim Sullivan 86d3786d34
[Monitoring/License] copy license LESS instead of reference it (#18591) 2018-04-25 17:29:56 -07:00
Chris Earle 015e94b5fe
[Monitoring] Recognize Write Threadpool (#18147)
This changes the Advanced Node page for Elasticsearch to recognize the
"write" threadpool, while also incorporating the deprecated "index"
threadpool and renamed "bulk" usage (renamed to "write").

This sums the three writing threadpools together and displays it as a
unified view.
2018-04-24 19:26:50 -04:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00