Commit graph

1073 commits

Author SHA1 Message Date
Pete Harverson
1a3f0cac4b
[ML] Fixes recognizer job wizard to use dedicated index setting (#25706) 2018-11-15 14:40:41 +00: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
Walter Rafelsberger
b5178f1c4d
[ML] Fix getDerivedStateFromProps in preparation for React upgrade. (#25645)
* [ML] Fix getDerivedStateFromProps in preparation for React upgrade.
* [ML] Fix test by using mount() instead of shallow().
2018-11-15 12:29:08 +01:00
tibmt
fb6be4caed Translate Spaces component (#24411)
* Translate Spaces component

* fix one little error

* update Spaces component

* update translation of Spaces components

* Update snapshots

* update Space translation - intl type

* update Space translation - remove view/views id namespace

* rename ids

* use testing helper functions instead of shallow, render, mount from enzyme

* fix unit tests

* fix ts path for enzyme test helpers

* fix path to enzyme helpers test functions

* Update snapshots

* fix path to enzyme test helpers

* Remove unused dependency.
2018-11-15 11:09:12 +03:00
Larry Gregory
53f5f50b71
fix redirect after logging in (#25546) 2018-11-14 16:48:07 -05:00
Larry Gregory
1343ef1ec2
adds read_ccr and manage_ccr cluster privileges (#25605) 2018-11-14 16:32:50 -05:00
Larry Gregory
d8f8a0c26d
Fix anonymous access to status page (#24706)
* fix status.allowAnonymous

* address PR feedback
2018-11-14 16:28:26 -05:00
Clint Andrew Hall
a0e9a3b901
Revert "Feature/translate canvas plugin src elements (#23755)" (#25662)
This reverts commit f10deb1b8a.
2018-11-14 12:00:13 -06:00
Rashid Khan
ab796859ab
Make gulp canvas:test work (#25492) 2018-11-14 10:02:06 -07:00
Joe Fleming
9971981361
Fix: IE11 compat (#25562)
* fix: switch to new CustomEvent

new Event is not supported in IE11

* fix: skip element.scrollTo when not available

that method doesn't exist on elements in IE11
2018-11-14 09:59:23 -07:00
Caroline Horn
2b3bff34b8
TSVB less to sass - and some UI work (#24250)
Fixes #16483, Fixes #20115, Fixes #17852, Fixes #16768, Fixes #14348, Fixes #17842, closes #15580, closes #14938
2018-11-14 11:10:08 -05: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
Brian Gaddis
dc2953a8fb Combine common pdf png functions (#25152)
* Create common routines for PDF and PNG report processing

* REmove Blacklisted headers not needed

* Changes for issues with PDF and PNG testing

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

* removed uneccesary image compare routine

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

* consolidated PDF and PNG testing

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

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

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

* Removed unnecessary exception check and removed test include from index.ts
2018-11-14 08:28:07 -05:00
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
Matthew Kime
bb250560ec
Fixes index pattern wizard when there are remote clusters but no local indices (#24339)
* don't hide wizard if clusters exist

* catch errors

* add toast notifs if unable to load data
2018-11-13 14:00:27 -06:00
Aleh Zasypkin
ca1d280818
Fix paths to the i18n enzyme helpers in monitoring tests. (#25593) 2018-11-13 20:24:14 +01:00
spalger
5366de4bf1 disable flaky test 2018-11-13 09:26:46 -08: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
Jason Rhodes
6d79657b41
Adds UI notification for dropped spans (#25017)
* Adds icon and tooltip for dropped spans

* Adds callout and style in transaction flyout instead of timeline for dropped spans message

* Review tweaks and linting fixes
2018-11-13 08:14:24 -05:00
Ryan Keairns
ffac06a2a4
[Canvas] Decrease size of tray toggle (#25470)
* decrease size of toggle bar

* change bg colors for toggle
2018-11-12 18:55:18 -06:00
Catherine Liu
c2a24fb238
Fixes duplicate 'Value' options in math function select (#25556) 2018-11-12 17:05:56 -07:00
Spencer
59eff29786
[canvas] Improve plugin pre-build (#25267)
Fixes https://github.com/elastic/kibana/issues/23552

Extends the webpack config used to pre-build `x-pack/plugins/canvas/canvas_plugins_src` so that it does a couple things:
 - use the "browser" and "main" fields when defined by packages, this allows the already transpiled output of packages like `@elastic/eui` to be used rather than rebuilding from source
 - use the `@kbn/babel-preset/webpack_preset` for babel-loader
 - include all errors in the log output when an error occurs
2018-11-12 16:04:36 -08:00
Tiago Costa
ee4a3d2558
fix(NA): recent unconforming licenses. (#25560) 2018-11-12 21:39:06 +00:00
Stacey Gammon
1eaca25472
[Flaky test fix] Turn back on data_shared_attributes test (#25156)
* Turn back on data_shared_attributes test and run 20x

* Add some clean up

* Be more determinism, less refactoring.

* Go back to a single test run
2018-11-12 14:47:24 -05:00
Josh Dover
77522a7bd2
[kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
Joe Fleming
50eb9e6ef4
Fix: Quote the index pattern in SQL input (#25488)
SQL requires that you quote the index name if you are using special characters (like *, with an index pattern). Our default value didn't work since `logstash*` was not quoted.

### Before

![screenshot 2018-11-09 13 03 21](https://user-images.githubusercontent.com/404731/48285446-db599380-e41f-11e8-85cc-320b03a004b0.png)

### After

![screenshot 2018-11-09 13 34 18](https://user-images.githubusercontent.com/404731/48286844-2c6b8680-e424-11e8-9329-435adbe9dc06.png)

...and if you select some valid fields so you don't get an array in the results:

![screenshot 2018-11-09 13 34 48](https://user-images.githubusercontent.com/404731/48286891-49a05500-e424-11e8-8d66-4c9ac208d358.png)
2018-11-09 16:12:23 -07:00
Tiago Costa
dc956a0a79
Fix non-conforming licenses on devDependencies and add the ability to whitelisting devOnly licenses (#23859)
* chore(19834): upgraded yargs dependency to 4.8.1 in order to remove pkg-conf dependency license conflict.

* chore(19834): override xmldom to one of the allowed licenses (MIT).

* chore(19834): added some overrides and whitelistenig for Apache2.

* chore(19834): correct overides for some apache2 licenses.

* chore(NA): updated specific dependency needs.

* chore(19834): added some more info on updated licenses.

* chore(19834): small note on dependencies use versions.

* feat(NA): add the ability to white list licenses only valid for dev only dependencies.

* chore(NA): update yarn lock files to include integrity check.

* fix(NA): yarn lock file for kbn ui framework.

* docs(NA): fix uncompleted comment left on the code.
2018-11-09 02:11:17 +00:00
Joe Fleming
830c195b0d
fix: get correct plugins path (#25448)
we can't check the name of the outer path because it can change, instead, just make sure there's a plugins path there
2018-11-08 17:37:17 -07:00
Søren Louv-Jansen
d181d4dc8e
[APM] Minor cleanup of constants (#25177)
* [APM] Minor cleanup of constants

* Simplify constants test
2018-11-09 00:20:00 +01:00
Søren Louv-Jansen
65ae04a5bd
[APM] Format as microseconds (#24974)
* [APM] Format as microseconds

* Split interface into `value` and `options`

* Update formatters.test.ts
2018-11-09 00:19:20 +01:00
CJ Cenizal
e2079c6373
Wrap long field names in Rollup Job Wizard tables. (#25405) 2018-11-08 14:00:00 -08:00
Pete Harverson
000cac77a9
[ML] Fixes the layout of the cards in the Data Visualizer on IE (#25383) 2018-11-08 21:17:40 +00:00
Pete Harverson
df0d62f6ed
[ML] Updates job type and APM module icon to new designs (#25380)
* [ML] Updates job type and APM module icon to new designs

* [ML] Use self closing tags for icons

* [ML] Removes unnecessary icon from jobs list
2018-11-08 21:13:59 +00:00
Søren Louv-Jansen
051c23915d
[APM] Fix gap in timeline and fallback when traceroot is missing (#25346)
* Fix gap in timeline

* Show fallback when traceroot is unavailable

* Fix test

* Fix rendering issues with styled-components

* Remove `parentTransactionSkew `

* Minor test fixes
2018-11-08 22:08:39 +01:00
Walter Rafelsberger
f2a0b9600c
[ML] angularjs controller initialization tests. (#25382)
* [ML] Confirm Modal Controller Test.

* [ML] Message Bar Controller test.

* [ML] Data Visualizer Controller test.

* [ML] Detector Filter Modal Controller test.

* [ML] Detector Modal Controller test.

* [ML] Save Status Modal Controller test.

* [ML] Multi Metric Create Job Controller test.

* [ML] Population Create Job Controller test.

* [ML] Recognize Create Job Controller test.

* [ML] Single Metric Create Job Controller test.

* [ML] Index Or Search Controller test.

* [ML] Job Type Controller test.

* [ML] Angular Bootstrap Patch Dropdown Controller test.

* [ML] Settings Controller test.

* [ML] Calenders List Controller test.

* [ML] New Event Modal Controller test.

* [ML] New Event Modal Controller test.

* [ML] Create Calendar Controller test.

* [ML] Time Series Explorer Controller test.

* [ML] Fixes typo, clearer test name.

* [ML] Fixes tests by restoring stubs.
2018-11-08 21:21:34 +01:00
Søren Louv-Jansen
d6ad6dfafe [APM] Fix Rison issues (#25377)
* [APM] Fix Rison issues

* Fix CI

* Removed abstractions (and broke tests)

* Slight rework and small bugfix for query param handling

* Removed typo used for visibility testing oops

* Removes unused dep because linting doesnt work apparently
2018-11-08 14:07:18 -05:00
Søren Louv-Jansen
94b2aa4e0d
[APM] Fix missing transaction message (#25353) 2018-11-08 19:25:26 +01:00
Brandon Kobel
37b921b8a2
Using the new ES Realm syntax for SAML (#25223) 2018-11-08 09:28:53 -08: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
Joe Fleming
c79fac22fa
Fix: Asset preservation (#25359)
* fix: proptype error

* fix: correct proptype checking

* fix: add assets placeholder to initial state

* chore: add history formatting function

* fix: load workpad assets when ids change

this causes the correct assets to be used
2018-11-08 09:20:28 -07:00
Clint Andrew Hall
80073b4555
Fix File Upload fatal (#25361)
## Summary (fixes #25342)

There is a fatal when using the File Upload control in the image upload control.  While the fatal appears to originate within the File Upload control, it is actually [coming from](https://github.com/clintandrewhall/kibana/blob/file-upload/x-pack/plugins/canvas/public/components/loading/index.js#L15) `Loading`, which attempts to use `react-redux` to change the `backgroundColor` of the loading indicator based on the page.

I couldn't find an instance where we use this Loading indicator outside of a redux context, so I've opted to simply use the control directly.  @rashidkpc agreed this would be a good fix for the moment.

In addition, I fixed a props error coming from the data-url field that made it read-only, so I fixed that, too, as well as a formatting issue with the Set button.

## Test Plan

Added a `setTimeout` call to simulate load.  Toggled between data url and literal URL.

![screen shot 2018-11-07 at 6 47 32 pm](https://user-images.githubusercontent.com/297604/48171133-20ff4a80-e2c0-11e8-9b9f-71818801744a.png)

- Before
![screen shot 2018-11-07 at 7 11 48 pm](https://user-images.githubusercontent.com/297604/48171320-09749180-e2c1-11e8-8a2a-f87d564944c1.png)
- After
![screen shot 2018-11-07 at 6 57 17 pm](https://user-images.githubusercontent.com/297604/48171134-20ff4a80-e2c0-11e8-9bec-f129cfbfaa18.png)
- Fixed Warning
![screen shot 2018-11-07 at 7 11 57 pm](https://user-images.githubusercontent.com/297604/48171334-142f2680-e2c1-11e8-8ab6-ee06e6231e6b.png)

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

- [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2018-11-08 09:57:51 -06:00
Carlos Pérez-Aradros Herce
c757990be1 Relax hosts validation in Beats central management (#25376)
Current regexp was disallowing schema part of the URL (https://), so
https hosts couldn't be configured.

I opted for fully relaxing the reg exp here, as Beat will check it
anyway, and report errors in case it's wrong.
2018-11-08 07:47:17 -05:00
Matt Apperson
03d1597903
[BeatsCM] Allow for config based override of default user role (#25364)
* Allow for config based override of default user role

* [beats-cm] convert xpack.beats.defaultUserRole to array of roles

* [beats-cm] keep this context in #checkLicense
2018-11-08 07:12:54 -05:00
Lukas Olson
aa61b7a88f Fix Canvas autocomplete to suggest all functions (#25351)
* fix: getFunctionDefinitions to load after the registry has been populated

* fix: use getBrowserRegistries instead of registry itself
2018-11-07 19:01:49 -07:00
Spencer
43ee991b20
[canvas/gulp-scripts] replace script path in argv with gulp path (#25352) 2018-11-07 15:08:43 -08:00
Jen Huang
29d8a9de92
[Rollups] Fix day of month only showing ordinals (#25322)
* Fix day of month only showing ordinals
2018-11-07 13:47:02 -08:00
joe fleming
bb5af6c4b2 fix: restore canvas error dialog 2018-11-07 14:38:32 -07:00
Matt Apperson
f113682c26
[BeatsCM] text update (#25297)
* progress

* add missing text changes

* text tweak

* Update x-pack/plugins/beats_management/public/components/table/assignment_schema.ts
2018-11-07 16:33:56 -05:00
Spencer
cfaa1783c3
[canvas] move yarn scripts to node scripts (#25258)
* [canvas] move yarn scripts to node scripts

* [canvas/eslint] allow scripts to access devDeps

* [canvas/eslint] remove packageDir override

* [x-pack] move babel-register to deps for canvas

* [canvas] rename scripts from : to _

* [canvas] update readme with correct script paths

* [canvas] remove yarn.lock file

* Remove redundant require
2018-11-07 10:53:06 -08:00
Joe Fleming
ac625701f2
Fix: Canvas babel build (#25184)
Closes https://github.com/elastic/kibana/issues/25154

Canvas' threading code uses babel-register for the runtime, much like Kibana does, so we can execute code that uses newer syntax (mostly es modules at this point...). The default configuration of babel-register ignores `node_modules`, and since x-pack is built into `node_modules`, this worked fine in dev mode and not at all in the build.

There was also an issue where Kibana's build step removes all bablerc files, which meant Canvas' threaded runtime also wasn't getting any of the settings.

This PR pulls in the configuration from Kibana, which has an exception for transpiling x-pack code, and allows the runtime to operate correctly in the build.

Huge thanks to @jbudz for helping me sort out the issue!

@spalger ~~know more about babel than I do, if we can just use `@kbn/babel-preset/node_preset` directly instead, that seems less likely to break going forward. I meant to try it but ran out of time yesterday to make another build.~~ Works! PR updated.
2018-11-07 09:56:30 -07:00
Pete Harverson
60bb092aba
[ML] Fixes file data viz file size check and format as bytes (#25295)
* [ML] Fixes file data viz file size check and format as bytes

* [ML] Fix typo in file size error callout
2018-11-07 16:49:05 +00:00
Spencer
5f9337e35b [canvas] unify eslint config in .eslintrc.js (#25260)
Simply remove the remaining eslint config files from canvas and merge with other canvas related overrides in `.eslintrc.js`
2018-11-07 09:33:39 -07:00
Jen Huang
f3cf074ffa
Move call to standard index pattern fields for wildcard from client to server (#25270) 2018-11-07 08:24:59 -08:00
Brandon Kobel
8431348bc0
Updating request to ^2.88 (#25236) 2018-11-07 08:12:26 -08:00
Walter Rafelsberger
e26a59ef7c
[ML] Restore missing job timepicker modal. (#25288)
* [ML] Restore missing job timepicker modal.
* [ML] Added a karma/mocha test to verify dependencies are loaded correctly for new_job_controller.
* [ML] Use consistent import style.
2018-11-07 16:42:25 +01:00
Chris Roberson
1acf855f2d
Use the newly added remote_cluster field for ccr (#25248) 2018-11-07 09:04:28 -05:00
Felix Stürmer
b5012d917d
[Infra UI] Remove duplicate "Overview" in detail page title (#25283)
This removes the duplicate word "Overview" from the title of the container details page.

fixes #24160
2018-11-07 14:52:05 +01:00
Jason Rhodes
0388068c8c
Fixes bug with rison decode on Kibana links (#25214)
* Fixes bug with rison decode vs encode

* Adds and updates tests for kibana link component
2018-11-07 06:38:53 -05:00
Felix Stürmer
2cabf4f5e6
[Infra UI] Work around IE11 flexbox alignment problems (#25224)
This works around some IE11 bugs with flexbox alignment, particularly [Flexbug #4](https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored) and a misinterpretation of the default alignment.

fixes #24758
fixes #24839
fixes #24791
fixes #24757
2018-11-07 11:37:23 +01:00
Søren Louv-Jansen
4d28055821
[APM] Additional clock skew fixes (#25097)
* Refactor service colors

* Calculate duration from full waterfall

* Ensure timeline label is not truncated

* Adjust child if it starts after parent has ended

* Add mark for traceRootDuration instead of xMax

* Fix tests
2018-11-07 10:28:16 +01:00
Pete Harverson
4fc00821a4
[ML] Add user privilege check to Jobs List group selector control (#25225) 2018-11-07 09:18:31 +00:00
Tiago Costa
ae23f16802
Make canvas common lib ready for dependencies static analysis (#24756)
* refact(NA): make canvas common lib ready for static analysis.

* refact(NA): change export named to export all on canvas commmon lib datatable.

* tes(NA): fix isValid http url function name.

* refact(NA): rename parse to parseDataUrl
2018-11-07 03:08:03 +00:00
Matt Apperson
6ed41b35db
[BeatsCM] error on issues dont disable (#25149)
* display error messages for failed checks vs disableing plugin

* update text

* change order of check

* tweak security check

* re-disable on invalid license, update text

* update text

* tweaks

* tweak text
2018-11-06 21:33:07 -05:00
Clint Andrew Hall
06864817b9
Adding beta marker (#25256) 2018-11-06 18:11:42 -06:00
Matt Apperson
dbfc86b39d
dont allow tag creation if id is invalid (#25133) 2018-11-06 18:49:39 -05:00
Matt Apperson
86e11c0e12
[BeatsCM] Rework table controls to use the pattern now found in the rest of Kibana (#25131)
* Rework table controls to use the pattern now found in the rest of Kibana

* Fix TS errors

* better fix TS issue

* uncomment code removed for testing
2018-11-06 18:49:15 -05:00
Søren Louv-Jansen
deae168672
[APM] Show message for missing transaction sample (#25141) 2018-11-07 00:40:25 +01:00
Walter Rafelsberger
3b94e3cece
[ML] Removes deprecated angularjs based jobs list and related code. (#25216) 2018-11-06 20:05:45 +01:00
Melissa Alvarez
493fe14821
[ML] JobList search bar: Show useful error on invalid query (#25153)
* Show error on invalid query

* Additional undefined check for query

* Cleanup undefined check
2018-11-06 17:13:32 +00:00
Chris Cowan
4a251b541a [Infra UI] Normalizing CPU usage for waffle map (#25123)
This PR changes the aggregation for calculating the CPU usage for hosts to match the metrics overview calculation by adding both system and user together then dividing it by the number of cores. This PR also includes a fix for the Docker cpu field.
2018-11-06 14:55:28 +01:00
Leanid Shutau
e9ff201be7
[I18n] Migrate enzyme helpers to TypeScript (#25108)
* [I18n] Migrate enzyme helpers to TypeScript

* Migrate src enzyme helpers

* Remove eslint comments
2018-11-06 15:56:37 +03:00
Melissa Alvarez
830e149787
[ML] MultiMetric/Population Job creation: Allow model plot enablement via checkbox (#24914)
* Add route/api-mapping for validateCardinality

* Create directive for enableModelPlot checkbox

* Ensure model plot enabled prior to cardinality check

* Add callout when cardinality high

* ensure correct cardinality success check

* Population wizard: add enableModelPlot checkbox

* Update with suggested changes from review

* Remove warning when invalid. Add tests.

* Ensure checkbox updated on uncheck
2018-11-06 11:52:26 +00:00
Felix Stürmer
45f4b1bcf3
[Infra UI] Add beta badge with tooltip to the header (#25113)
In accordance with #25008, this adds a "Beta" badge with a corresponding tooltip to the header.
2018-11-06 11:01:02 +01:00
Shaunak Kashyap
1e346b9094
Infra UI: Fixing minor typo (#25005)
Resolves #25007.

Outbound traffic is generally denoted with TX, abbreviation for Transmit, instead of RX, abbreviation of Receive.

This PR fixes this minor typo.
2018-11-06 01:27:19 -08:00
Ryan Scovill
5dbfec7d20 fix typos (#25176) 2018-11-05 17:56:43 -07:00
CJ Cenizal
0709293aac
[Rollups] Improve Rollup Job Wizard error handling (#25092)
* Consistently format errors with showApiWarning and showApiError helpers.
* Use fatalError for unexpected errors.
* Localize errors.
* Surface error in Job List when the jobs can't be loaded.
2018-11-05 14:32:48 -08:00
Stacey Gammon
531424ef17
Disable animations for xpack functional tests too (#25148) 2018-11-05 17:17:53 -05:00
Chris Roberson
25666f8d41
Unskip the mappings test (#24667) 2018-11-05 14:57:44 -05:00
Chris Roberson
25896d625d
Re-enable these tests (#24600) 2018-11-05 14:57:02 -05:00
Felix Stürmer
dfef1c52e2
[Infra UI] Rename InfraOps to Infrastructure (#25135) 2018-11-05 20:33:53 +01:00
Ryan Keairns
7470b632eb
Security - convert LESS to SASS (#25079)
* convert security less to sass

* remove unused less styles from xpack_main
2018-11-05 13:28:18 -06:00
Walter Rafelsberger
e5ebc62b16
[ML] Fixes typo. (#25130)
Fixes "Dectector" Typo.
2018-11-05 18:13:56 +01:00
Chris Roberson
ae6ea6ec10
Ensure we probably init the route for the ccr page (#25050) 2018-11-05 10:01:30 -05:00
Nox911
666a1d752c Feature/translate license management (#24341)
Translate license management
2018-11-05 16:22:45 +03:00
Nox911
f10deb1b8a Feature/translate canvas plugin src elements (#23755)
translate canvas canvas_plugin_src elements
2018-11-05 10:13:27 +03:00
Brian Gaddis
733c9ec4f3 Added sort order to share menu options. (#25058)
* Added sort order to share menu options.

Sorts ascending on sort order first then ascending on name. Any menu item without a sort order gets set to zero.

* Moved new sortOrder property from node_modules

* Had to rerun the snapshot for the share menu with the sortOrder in it.
2018-11-03 08:18:59 -04:00
CJ Cenizal
dac01c81a2
[Rollups] Surface index pattern validation errors in Rollup Job wizard. (#25078)
* Show fatal error for unexpected errors.
2018-11-02 17:42:50 -07:00
Jen Huang
077634c483
Prepend ES endpoint with slash (#25073) 2018-11-02 15:16:06 -07:00
Joe Fleming
1cb1c25d41
Fix: socket setup (#24550)
PR fixes issues with the socket connection.

- handle socket failures 
  - previously would either leave Canvas in an infinite loading state, or load the app even when it wouldn't function
- upgrade socket.io
- add headers to socket connection and modify auth connection
2018-11-02 10:26:52 -07:00
Joe Fleming
f6fd86aa4d
Chore: fix canvas linting (#25024)
This fixes `yarn run lint` from within the Canvas plugin path.

- Point to the correct eslint config file
- Use absolute path for `packageDir`
- Remove extraneous `packageDir` settings
2018-11-02 11:24:11 -06:00
Jonathan Budzenski
fa8237d197
[build] Support version-qualifier flag (#21663)
* [build] Support version-qualifier flag

* add help description

* fix test

* is-release

* temp: re-add alpha1 to package.json

* use version qualifier in build

* fix merge

* Revert "temp: re-add alpha1 to package.json"

This reverts commit a70688542c.

* x-pack

* remove ci build flag

* remove ci build flag

* remove qualifier from canvas

* remove qualifier from infra

* fix x-pack argv

* update comment
2018-11-02 09:39:12 -05:00
Stacey Gammon
d92cbea5b4
skip png screenshot comparison tests, they will fail on certain jenkins agents (#25028) 2018-11-02 10:09:15 -04:00
Brandon Kobel
42b758c567
Adding support for single session cookies appearing in an Array (#24984)
* Adding support for single auth cookies appearing in an Array

* Removing redundant newline
2018-11-02 06:23:54 -07:00
nicknak
69b286b2fc
Show aliases in index details (#24048)
* Adds aliases to details for indicies.

* Lists aliases when there is more than one.

Fixes reload call using duplicate code atm.
Removes unintentional formatting change.

* Silly line ending removed by accident.

* Simplifies fetching aliases to single method/file.

* Adds superfluous logs statement.

* Uses the correct i18n translation variable for the header.

* Sets the translation variable to the correctly spelled variable.

* Simplifies building an array of aliases.

* Does not export fetchAliases as default.

* Makes the code more readable by destructing results.

* Adds test for expected results and no results.
2018-11-02 09:14:23 -04:00
Søren Louv-Jansen
e689afa7b3
[APM] Fix missing parent issue (#25029) 2018-11-02 11:08:47 +01:00
CJ Cenizal
6e63be54ef
Return wrapped unknown errors from rollup CRUD API. (#25032) 2018-11-01 18:35:36 -07:00
Catherine Liu
ffe24a8318
Fixes font picker when using custom fonts (#24937)
* Adds custom font as option in font picker

* Adjusted font sizes in ecommerce sample worpad

* Adjusted font sizes in sample flight workpad

* Adjusted font sizes in smaple web logs workpad
2018-11-01 14:16:26 -07:00
Brian Gaddis
8efd352912 Add png output to reports 65 (#24759)
* Changes for new PNG image output for reports

Change PNG button name from Download to Generate

Changes for new PNG image output for reports

Change PNG button name from Download to Generate

Remove compatabilityShim from PNG and move to PDF folders

Changed API parameters to contain only required parameters

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

Merge of security changes for PNG reporting

Fixed issues with test cases for both PDF and PNG

Updated test snapshots for PNG and PDF test changes

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

* Removed commented out lines that were not needed
2018-11-01 16:28:00 -04:00
CJ Cenizal
2a85ed492d
[Rollups] Disable deletion of started rollup jobs (#24878)
* Disable deletion of started rollup jobs.
* Update empty prompt icon.
* Add isUpdating selector and display a spinner instead of the action button when jobs are being updated.
* Localize Navigation component.
* Add noticeable delay of 300ms show spinner displays and doesn't flicker.
2018-11-01 09:49:14 -07:00
James Gowdy
38e200f11f
[ML] Fix for check for enabled xpack features (#24986) 2018-11-01 16:46:57 +00:00
Larry Gregory
e0b8cdf859
User management - email and name should be optional (#24842)
Fixes #17952
2018-11-01 08:58:01 -04:00
Brandon Kobel
8cbafdf5fe
Adding "Successfully logged out" page (#23890)
* Adding very basic place for the logged out page

* Redirecting to logged_out when we aren't using SLO

* Basing styles on the login styles

* Fixing linting errors

* Responding to PR feedback

* Fixing issue with the basepath and the login link

* Adding proper i18n prefix

* Updating unit tests
2018-11-01 05:33:32 -07:00
Brandon Kobel
70f1a4094e
Using Joi.object when configuring route validation (#24596)
* Using Joi.object when configuring route validation

* Adding forgotten API

* Fixing test
2018-11-01 05:32:12 -07:00
Maryia Lapata
157477a2d7 Fix/react intl testing helper functions (#24527)
update testing helper functions for react-intl

now we use real intl object passed by IntlProvider via context instead of mocking intl object.
so now data(strings, JSX) passed to FormattedMessage component via values are compiled and
are inserted in the output of FormattedMessage component
2018-11-01 13:54:22 +03:00
Søren Louv-Jansen
704cf6182f
[APM] Discover links with quoted values and use default 24h as time range (#24900)
* [APM] Discover links with quoted values

* Use 24h as default time range
2018-11-01 11:25:07 +01:00
Oliver Gupte
f05bb942fa
[APM] Fix divide by 0 bug in percentage duration (#24675)
* [APM] Fixes #40165 by consolidating logic where total duration could be 0 and handling it with a fallback value

* [APM] renamed file from .js to .ts and defined a default value for fallback

* [APM] Add type definitions for apm formatters

* [APM] add basic type definition for imported @elastic/numeral module

* [APM] rename getDurationPercent to asPercent

* [APM] Update tests with the renamed formatter function

* [APM] Pr feedback & typescript cleanup

* [APM] fix bucket & chart point type errors

* Fix typescript issue

* [APM] last minute code cleanup
2018-10-31 23:52:23 -07:00
Jen Huang
8491b2ee8e
[Rollups] Mark beta in rollup index pattern creation (#24805)
* Add beta UI tags to rollup index pattern creation

* Add test, update snapshots

* Address feedback, adjust copy, and localize rollup index pattern creation
2018-10-31 17:53:13 -07:00
Brandon Kobel
6c95237e89
Reverting 22816, upgrading mocha is breaking the custom reporter (#24951) 2018-10-31 17:41:07 -07:00
Ryan Keairns
a55dfd0536
add css grid style to prevent calendar bounce (#24913) 2018-10-31 14:29:37 -05:00
Bhavya RM
dfd4917b3d
Disabling es lint for 3 of the canvas files (#24902)
disabling eslint for Canvas because we are adding in jsx-a11y rules to eslint and adding a missing copyright header
2018-10-31 15:23:38 -04:00
Bhavya RM
21bec215dd
adding alt tag with empty text to fix jsx-a11y errors (#24922) 2018-10-31 15:04:33 -04:00
Jen Huang
9527e0e7c7
[Rollups] Re-enable rollup support (#24888)
* Re-enable rollup support extension points

* [Rollups] Hide rollups consumption behind a feature flag in Advanced Settings. (#24698)
2018-10-31 11:54:37 -07:00
James Gowdy
62f82c96f6
[ML] Fixing issues when trying to import non-timestamp data (#24894)
* [ML] Fixing issues when trying to import non-timestamp data

* making results link time range optional

* small cleanup after fixing merge conflict
2018-10-31 18:06:49 +00:00
James Gowdy
fea42bada6
[ML] Fix for delimited data with whitespace in fields (#24899)
* [ML] Fix for delimted data with whitespace in fields

* rewriting to use papaparse transform function
2018-10-31 17:07:43 +00:00
Walter Rafelsberger
cc89c1ee03
[ML] Fixes bug with category filtering flag for rare/population charts. (#24901)
Fixes a bug where the filtering limit of categories for the rare chart was actually applied to the population chart variant.
2018-10-31 17:16:24 +01:00
Oliver Gupte
a0927f4bea
[APM] fixes #23808 by adding docs links for user/tags transaction apis for the java agent (#24869) 2018-10-31 08:38:12 -07:00
Felix Stürmer
c8b2e673fc
[InfraOps] Preserve time values when navigating from the waffle map to the logs and details pages (#24666)
This adds `time` and `from`/`to` parameters to the metrics and logs links of node context menu in the waffle map.
2018-10-31 15:57:53 +01:00
Walter Rafelsberger
6ac9a2fd23
[ML] Display a ordinal y axis for low cardinality rare charts. (#24852)
Introduces a categorical/ordinal y axis for rare charts with a cardinality of <= 10. This also adds unit tests for the rare/population chart which are the bulk of the PR.
2018-10-31 15:57:27 +01:00
Nox911
f8d0604050 Translations for Dev Tools (#23951)
translate dev-tools-console
2018-10-31 17:54:31 +03:00
Jason Rhodes
e13e47fc4e Fixes APM snapshot for CSS value (#24898) 2018-10-31 13:07:59 +01:00
Walter Rafelsberger
e97b019815
[ML] Set new index pattern as default one if no default index pattern exists yet. (#24337)
This replicates the behaviour of the management UI: If there's no default index pattern, the one created via file visualizer's import will be set as the default index pattern.
2018-10-31 12:04:23 +01:00
Søren Louv-Jansen
8f4b0e9bf8
[APM] Hoist loading of waterfall and flatten it (#24651)
* [APM] Hoist loading of waterfall and flatten it

Remove unused test

Convert to typescript

* Address feedback

* Make `totalDuration` optional

* Renamed rootTransaction to traceRoot

* [APM] Only show relevant service legends

* Adds services label to the service legend

* [APM] Clock skew fix

Only skew child spans from the same service

Take parent skew into account when finding diff

# Conflicts:
#	x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/waterfall_helpers/__snapshots__/waterfall_helpers.test.ts.snap
#	x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.test.ts
#	x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts

* Use switch statement
2018-10-31 10:27:57 +01:00
Jason Rhodes
be34592e68
Design clean-up for 6.5, Part Deux (#24862)
* Fixes active tab state

* Removes beta labels from ML and search bar

* Reverts visual regression with right-to-left timeline fix

* Creates space for agent marks beneath tick marks

* Fixes ordering problem with timeline transaction icons

* Updates string 0 to be an integer instead for CSS bottom value
2018-10-30 22:33:33 -04:00
Oliver Gupte
57d0e1d22a
[APM] fixes #24563 by de-duping the column field id 'sample' (#24690)
* [APM] fixes #24563 by replacing de-duping the twice-used column field id

* [APM] fixed issue with service column not sorting in ManagedTable

* [APM] make render field on ITableColumn optional and allowing it to use EUI's default value
2018-10-30 16:31:30 -07:00
CJ Cenizal
05bf7cd4d4
[Rollups] Fix i18n bugs (#23848)
* Internationalize job details tabs and wrap instances in EuiErrorBoundary to visually localize the error.
* Localize no default index pattern message.
* Localize es interval errors.
* Localize job action menu and confirm delete modal.
* Remove unnecessary use of injectI18n from tabs.
* Localize job status.
* Localize steps.
* Remove template literals from FormattedMessages.
2018-10-30 14:13:08 -07:00
Matt Apperson
8702792673
[BeatsCM] Change Index template name (#24835)
* [BeatsCM] Change Index template name

* Update x-pack/plugins/beats_management/server/management_server.ts

* Update x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/test_contract.ts
2018-10-30 15:35:10 -04:00
CJ Cenizal
04568fcca6
Re-initialize Rollup Management userHasLeftApp state to fix bug with clearing URLjob deep-link when detail panel is closed. (#24841) 2018-10-30 11:06:15 -07:00
Chris Roberson
b80ab1cd83
Add onBrush functionality to APM monitoring ui graphs (#24840) 2018-10-30 12:25:34 -04:00
Walter Rafelsberger
a86998a0fc
[ML] Fixes missing y-axis description for rare chart. (#24823)
Fixes the missing y-axis description for rare charts in the form of y-axis event distribution split by {{fieldName}}. The intention is to briefly clarify that the type of chart is different than the other ones which have a count or metric based y-axis. This text is in addition to the text provided (but hidden without hovering) in the info icon tooltip.
2018-10-30 14:19:19 +01:00
Casper Hübertz
863cfb79ce
[APM] Added line-height to table cell (#24768)
Improved reading of the contents, especially in the Transaction Flyout.
2018-10-30 11:25:38 +01:00
James Gowdy
d400a797d3
[ML] Reducing risk of upload timeouts (#24677)
* [ML] Reducing risk of upload timeouts

* function rename

* removing hardcoded number

* fixing typo

* updating comment
2018-10-30 09:16:40 +00:00
James Gowdy
4201555a1d
[ML] Removing new ML job link in basic license (#24676) 2018-10-30 09:16:18 +00:00
Walter Rafelsberger
8b2ce42f3f
[ML] Fix a call stack size exception triggered by a negative tickInterval. (#24742)
In certain cases tickInterval mistakenly could end up being negative which made getTickValues() run into a call stack size exception. This PR fixes it by a) adding a check to getTickValues() that interval must not be 0 or smaller and b) changing the way the tickInterval is determined in the Anomaly Explorer Charts.
2018-10-30 09:31:15 +01:00
Catherine Liu
0c0444cd6e
Fixes unauthorized error in es datasources (#24624)
* Fixes check for security plugin

* Cleaned up security check logic. Fixed tests for create_handlers. Added TODOs

* Updated comment

* Added tests

* Updated variable names
2018-10-29 20:21:55 -07:00
Jason Rhodes
b7b853abfe
[APM] Removes action menus (#24748)
* Removes infra links and replaces context menu with single discover links for now

* Changes discover links to use empty button style
2018-10-29 23:07:07 -04:00
Spencer
ce0cae64bd
[yarn] bump elasticsearch-js and makelogs (#24767)
In order to support esjs apiVersion 6.5 we need to upgrade to the newly released version of elasticsearch-js. Bumping makelogs allowed us to keep only one version of the elasticsearch module installed.
2018-10-29 18:16:10 -07:00
Jen Huang
fd4e63c5a9
[Rollups] Fix time field not being recognized due to ordering of aggs (#24783)
* Fix time field not being recognized due to ordering of aggs

* Clean up UI whitespace

* Update snapshot
2018-10-29 17:20:37 -07:00
Brandon Kobel
9f1cdac12b
Reporting cookies 2 (#24752)
* Revert "Reporting cookies (#24177)"

This reverts commit 9f4ec18000.

* Take 2

* Adding comment

* Better escaping and encoding for use in eval

* Checking for an empty string also

* Fixing session test
2018-10-29 15:54:45 -07:00
CJ Cenizal
0429a54c28
[Rollups] Copy improvements (#24528) 2018-10-29 15:15:11 -07:00
Josh Dover
69d25d8e50
Return promise in reporting jobs API (#24769) 2018-10-29 17:14:27 -05: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
Sébastien Loix
1018947c3f
refactor(Watcher): Reword translation id for missing property on objects (#24753) 2018-10-29 20:14:24 +01:00
Bill McConaghy
f7782a9722
[Console] Add ccr apis to console autocomplete (#24739)
* fixing issue with doc link paths

* dding ccr API endpoints to autocomplet

* fixing issue with documentation links

* fixing generated specs {indices} -> {index}
2018-10-29 14:04:21 -04:00
Sébastien Loix
adf8830549
fix(watch): Add WatchErrors to capture invalid watches (#23887)
Instead of immediately throwing an error if a watch Action is invalid (an email for example), there is now an `option` object that we can pass to the `fromUpstreamJson()` method and receive back any error that might exist in a Watch.
The Watch has a new "watchErrors" property to display configuration error in the UI.

fixes #20305
fixes #20970
2018-10-29 16:13:16 +01:00
Jason Rhodes
32f3d0f0d7
[APM] Fixes rare cases where KibanaLink is loaded outside of React context (#24705)
* Fixes rare cases where KibanaLink will be loaded outside of React context and requires no redux connect dependency

* Fixes tests for updated Kibana link component

* Removes obsolete snapshot
2018-10-29 09:58:20 -04:00
Ryan Keairns
06b0e74341
center content in fullscreen mode, hide K7 top nav (#24589) 2018-10-29 08:21:52 -05:00
tibmt
cff438faf9 Translate security/users component (#23940)
Translate security/users
2018-10-29 15:59:31 +03:00
Walter Rafelsberger
75ce0c4fa2
[ML] Remove obsolete sentence from info tooltip. (#24716) 2018-10-29 13:49:12 +01:00
Pete Harverson
4cc49be704 [ML] Change file data visualizer JSON format label to NDJSON (#24643)
* [ML] Change file datavisualizer JSON format label to NDJSON
* [ML] Update edit flyout overrides snapshot
2018-10-29 10:07:46 +01:00
Matt Apperson
9a158c1454
[BeatsCM] Beats without tags should return an empty array via the config API (#24665) 2018-10-28 20:56:11 -04:00
Catherine Liu
5df9747f5a
Fixed label position on progress elements (#24623) 2018-10-26 13:24:50 -07:00
Jason Rhodes
3a2db6e38f
Polish 6.5 (#24556)
* Updates waterfall item design for timeline rows

* Adjusts span and tx flyouts and updates tooltips to EUI

* Heading size fixes and clean up

* Updates tooltip snapshots

* Review tweaks and snapshot updates

* Revert experiment :)

Co-Authored-By: jasonrhodes <jason.matthew.rhodes@gmail.com>

* Fixes bug with v1 waterfall state

* Fixes bug with timeline bar height

* Updates snapshot tests

* Updated test so it doesn't mount and rely on EUI makeId() which is non-deterministic per test run
2018-10-26 14:56:20 -04:00
Joe Fleming
b8b0229fd6
Feat/expression threading (#24598)
Replaces https://github.com/elastic/kibana/pull/23301
Closes https://github.com/elastic/kibana/issues/23080

---

This is a minimal threading implementation for Canvas. There's still a lot to be done to make this concept great, but this is a start. 

What it does:
- Creates a server side abstraction on top of the interpreter
- Determines where to send the expression by checking the first function to be run
- Loads common functions in a separate worker thread on the server. 
- Routes to a single forked worker (thread), the main thread (server), or the browser (browser), in that order
- Defers back to the router when a function isn't found. Fails if the function isn't found in any of the above 3 environments
- Times out the worker if it takes too long, and respawns it as needed.
- Simplifies the error dialog to remove the stack. 

What is does not.:
- Round robin a pool of workers
- Queue. If one expression in the threaded env fails then anything sent to it in the meantime will fail. The upstream environment handles managing timeouts. I think this would only make sense todo with a pool.
- Client side. This doesn't implement web workers, but we could use roughly the same architecture. 
- Implement a specific, pluggable `worker` environment on the server. Right now it's just common functions, so plugin authors will always end up in a thread if they put their function in the common directory.

What I don't like:
- The socketProvider code. This was reused across the server & browser, but now that it's only used in the browser there's no good reason for the abstraction
- The serialize/deserialize stuff feels messy. Do we really need serialization?
2018-10-26 09:49:46 -07:00
Chris Roberson
a0543b1aec
Skip this test until snapshots are updated (#24650) 2018-10-26 11:32:50 -04:00
Pete Harverson
afbc9d7476
[ML] Hides File Data Vizualizer field name overrides if empty list (#24576) 2018-10-26 12:08:24 +01:00
James Gowdy
47fb27f0a8
[ML] Fixing results for unknown fields (#24577)
* [Ml] Fixing results for known fields

* renaming known-type to unknown

* correcting comments

* tiny refactor
2018-10-26 11:13:26 +02:00
Catherine Liu
3b0cc4e886
Upgrades Tinymath (#24457)
* Bumped tinymath to v1.0.0

* Bumped tinymath version to 1.1.0
2018-10-25 14:18:15 -07:00
Catherine Liu
f3dc3b6198
Fix: select field updates on change (#24288)
* Replace defaultValue with value

Added default value for size in text_style_picker

Made page_config select compressed

Added default values for props in appearance_form

Switched select to superselect in border_form

Refactored datacolumn

refactored simple_math_function

Fixed page_config

* Added an euispacer to border form
2018-10-25 14:12:14 -07: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
Felix Stürmer
d3e61e6380
[InfraOps] Remove broken links to APM (#24568)
This removes the links from the waffle map to APM, which did not pass the correct filter in most cases.

fixes #24565 for now
2018-10-25 15:28:14 +02:00
Catherine Liu
567576a724 Fixes loading element icon color (#24551)
* Fixed loading element icon color

* Fixed package.json

* Fixed loading component test

* Revert "Fixed package.json"

This reverts commit 033fc8477d.
2018-10-25 12:00:40 +02:00
CJ Cenizal
f74f633920
[Rollups] Rollup support in Kibana, phase 1 (#21117)
Enabled:
- View/Manage/Create rollup jobs

Disabled:
- Create a rollup index pattern
- Create rollup visualizations
- Add rollup visualizations to dashboards
- View raw rollup documents in Discover
2018-10-24 17:41:45 -07:00
Catherine Liu
fb5b2291ba
Enable canvas functional tests (#24450) 2018-10-24 15:59:49 -07:00
Catherine Liu
3ce182c33c
Fixes shape element with NaN viewBox (#24470)
* Fixes shape viewbox calculations

* Fixed border

* Cleaned up viewbox calculations
2018-10-24 15:59:08 -07:00
Pete Harverson
d9ffa07547
[ML] Edits to the text on the Data Visualizer landing pages (#24518) 2018-10-24 23:45:34 +01:00
Josh Dover
3af1b2109f
Disable unused beats_management tests (#24543) 2018-10-24 16:57:14 -05:00
Catherine Liu
35c325230b
Switches to dashed border style (#24538) 2018-10-24 13:49:02 -07:00
Catherine Liu
21d8ec4b45
Clears timeout for done handler (#24471) 2018-10-24 13:14:35 -07:00
James Gowdy
3fed832c8e
[ML] Fix semi structured text last line issue (#24520) 2018-10-24 21:14:20 +01:00
Ryan Keairns
03d7294c47
[WIP] Adds 'upload data from file' to Kibana home page (#24226)
* adds upload file and functionbeat to home

* removes functionbeat, adds ml file upload href

* remove functionbeat callout, add ml file url

* fix tests for basepath

* less caveman sounding

* update code editor snapshot

* make link conditional, copy changes

* update ml link

* move mlEnabled to ml plugin

* copy edits
2018-10-24 14:10:57 -05:00
Felix Stürmer
4077a1b8a4
[InfraOps] Add button to check again for log message if previously exhausted (#24500)
This PR adds a "load again" button to the exhaustion message in the log view.

fixes #23869
2018-10-24 19:22:11 +02:00
Caroline Horn
d114a85d24
Remove wrapper around manage spaces button in menu (#24506)
Fixes #23544
2018-10-24 13:20:58 -04:00
Oliver Gupte
0a602489d3
[APM] Add contextual docs links for PropertiesTable with no data #22755 (#24181)
* [APM] Add contextual docs links for PropertiesTable with no data #22755

* [APM] tweak style of table info header according to PR feedback #22755

* [APM] fix StickeyProperties style regression in ErrorGroupDetails

* [APM] update the layout of the StickeyProperties in ErrorDetails
2018-10-24 10:15:50 -07:00
Chris Roberson
d834f620c1
[Monitoring] Add handles graph for beats (#24265)
* Add handles graph

* Add limits in the UI

* Remove debug

* Update api tests

* Fix tests

* Fix snapshots

* Skip this test for now

* Fix this test and re-enable it
2018-10-24 13:06:38 -04:00
CJ Cenizal
1db075512d
Add repositionOnScroll to popovers within the Inspector and the Index Management detail panel. (#23856) 2018-10-24 09:12:11 -07:00
Walter Rafelsberger
2c7caee273
[ML] Improve sampling and normalization of population chart. (#24402)
This optimizes how contextual data is fetched for the population analysis chart.
2018-10-24 17:37:28 +02:00
Matt Apperson
f53541d0d5
[BeatsCM] Fix bad merge that created dupe UI (#24491) 2018-10-24 11:15:19 -04:00
Jason Rhodes
f6b0d7a714
Adds beta messages to traces overview and timeline (#24447)
* Adds beta messages to traces overview and timeline

* Left over formatting fix

* Fixes bug with inaccurate types for transaction.context.system

* Updates TraceLink to be called TransactionLink more accurately

* Updated learn more about DT link

* Snapshot update for number format change

* Updates to asDecimal to preserve decimal place significance in service list
2018-10-24 11:09:41 -04:00
Tim Sullivan
6084acc8b6
[Reporting] queue.pollEnabled setting adds ability to disable polling for idle jobs (#24295)
* [Reporting] New queue.pollEnabled setting adds ability to disable polling for idle jobs

* add an info log line

* note in docs
2018-10-24 08:03:54 -07:00
Tim Sullivan
5079e3d052
[Reporting/Fix] Improve text of pending status in job listing (#24300)
* [Reporting/Fix] Improve text of pending status in job listing

* status message change from feedback
2018-10-24 08:03:07 -07:00
Pete Harverson
e900879cc3
[ML] Fixes labels in datafeed time range selector modal (#24489) 2018-10-24 15:50:56 +01:00
Caroline Horn
7a90b326b6
Spaces selector screen graphics and other cleanups (#24442) 2018-10-24 10:48:54 -04:00
Pete Harverson
05b5ea7368
[ML] Adds experimental badge labels to the File Data Visualizer (#24485) 2018-10-24 14:10:55 +01:00
Stacey Gammon
08aa4140cb
bump the hacky timeout (#24392) 2018-10-24 08:44:50 -04:00
Matt Apperson
c690e4a0d6
[BeatsCM]This PR adds a role checks (#24405)
* add permissions check to API

* Add UI check to display error when user lacess access privlages

* prettier fix
2018-10-24 05:34:59 -04:00
Felix Stürmer
c4e7b2f5b5
[Infra UI] Add tests for the log entries and summary api (#24354) 2018-10-24 11:03:57 +02:00
Matt Apperson
a5ea1c6de2
[BeatsCM] fix keyed config saving rendering (#24379)
* Fix config issues, move all config formatting to lib, add tests

* remove config transform from config

* add comments
2018-10-23 23:41:40 -04:00
James Gowdy
c240d609f6
[ML] Improving file data visualizer navigation (#24438) 2018-10-24 02:23:33 +01:00
Matt Apperson
f0d6208a94
[BeatsCM] Re-add tag removal, tags default color is now a random EUI vis color (#24443)
* random default tag color

* re-add delete controls to tags table
2018-10-23 20:37:18 -04:00
Joe Fleming
7d96e671c1
Fix: Plugin loading in the build (#24426)
* fix: correctly wait on server plugins

* fix: correctly resolve canvas plugins in build
2018-10-23 17:25:33 -07:00
Joe Fleming
5009efde13
Fix: Canvas socket auth (#24094)
## Summary

Closes https://github.com/elastic/kibana/issues/23303 ~(@cqliu1 can you confirm this too?)~ confirmed

Fixes the way we capture the request info when configuring the socket and providing it to plugins via `callWithRequest`. Instead of exposing a route that returns the info, simply use the request object that comes back from `server.inject`.

Also adds a check in the `elasticsearchClient` handler exposed to plugins to ensure the session is still valid because using `callWithRequest`.

![screenshot 2018-10-16 10 37 56](https://user-images.githubusercontent.com/404731/47036828-32768c00-d132-11e8-81a0-122b5e83c7ef.png)
*Note:* the actual error message is a bit different, but this is how the failure is exposed to the user
2018-10-23 17:19:32 -07:00
kobelb
ee335d86bb Fixing Spaces nav control popover snapshot 2018-10-23 17:17:52 -07:00
Justin Kambic
e08373d93c
Update tag creation page to disallow the creation of tags with multiple uniqueness-enforced configuration blocks. (#24224) 2018-10-23 19:27:08 -04:00
Nathan Reese
60bb49853e
Canvas saved objects for sample data (#24347)
* Canvas saved objects for sample data

* fix line break in MACHINE element

* store canvas saved objects in json files instead of js files to avoid build problems

* remove logging statement

* set canvas-workpad timestamps to current time so they are displayed at top of list when sorted by date
2018-10-23 17:38:33 -04:00
Matt Apperson
b1c7d93152
Add dynamic breadcrumbs components (also fix outputs data, dont remove stuff) (#24364) 2018-10-23 17:25:30 -04:00
Brandon Kobel
8acf04b417
Rendering the space selector in either the header or the globalnav (#23845)
* Rendering the space selector in either the header or the globalnav

* Adding link title

* Doing it the React way

* Updating snapshots

* Adding withTitle prop
2018-10-23 13:36:49 -07:00
Søren Louv-Jansen
3151da280b [APM] Distributed Tracing (#24062)
* Adds traces overview with mock data (#22628)
* Updates service overview snapshots
* Adds tests for ManagedTable and ImpactBar
* Refactored transaction overview to use new managed table component
* Removed jsconfig file in apm
* [APM] Distributed tracing - Trace details (waterfall) (#22763)
* [APM] Add typescript to waterfall (#23635)
* [APM] Migrate get_trace and constants to Typescript (#23634)
* [APM] Add types for setup_request (#23762)
* [APM] Adds trace overview queries and some refactoring (#23605)
* ImpactBar component to align EuiProgress usage for impact bars
* Sharing some logic between transaction and trace queries
* Typescript support
* Quick fix ‘banana’
* [APM] Ensure backwards compatibility for v1 and v2 (#23636)
* Make interfaces versioned
* Rename eventType to docType
* Fixes trace links on traces overview (#24089)
* [APM] use react-redux-request (#24117)
* Updated yarn lockfile for new yarn version
* Updated dependency issues for react-router-dom types
* [APM] Display transaction info on span flyout (#24189)
* [APM] Display transaction info on span flyout
* Brings in real location and url param data for transaction flyout
* Converts flyout to TS
* Adds query param state for flyouts with ts support
* Updates styles and uses EuiTabs for transaction flyout
* [APM] Transaction flyout
* [APM] Minor docs cleanup (#24325)
* [APM] Minor docs cleanup
* [APM] Fix issues with v1 spans (#24332)
* [APM] Add agent marks (#24361)
* [APM] Typescript migration for the transaction endpoints (#24397)
* [APM] DT transaction sample header (#24294)

Transaction sample header completed
* Fixes link target for traces overview to include trans/trace ids as query params
* Converts Transaction index file to TS
* Adds trace link to sample section
* Refactors the trace link and applies it to two usages
* Implements transaction sample action context menu
* Calculates and implements duration percentage
* Re-typed how transaction groups work
* Fixes transaction flyout links and context menu
* Removes unnecessary ms multiplication
* Removes unused commented code
* Finalizes infra links
* Fixes some type shenanigans
2018-10-23 16:34:23 -04:00
James Gowdy
25d35fac27
[ML] Adds File Data Visualizer feature (#24423)
* [ML] File datavisualizer initial commit (#22828)

* [ML] File datavisualizer initial commit

* removing mocked data and adding initial stats

* adding card styling to fields

* Revert "". accidentally added with no commit message

This reverts commit d762d20b706e6a770e631f863b9e7d8879bb7ee6.

* adding date type to timestamp field

* renaming FileStats to FieldsStats

* code clean up

* changes based on review

* changes to error handling

* [ML] Adding file datavisualizer overrides (#23194)

* [ML] Adding file datavisualizer overrides

* improvements to overrides

* removing comment

* small refactor

* removing accidentally added file

* updates based on review

* fixing broken test

* adding missing grok pattern override

* fixing test

* [ML] Refactoring override option lists (#23424)

* [ML] Refactoring override option lists

* moving lists out of class

* updating test snapshot

* [ML] Fixing field editing (#23500)

* [ML] Changes to timestamp formats (#23498)

* [ML] Changes to timestamp formats

* updating test snapshot

* [ML] Allow Datavisualizer use on basic license (#23748)

* [ML] Allow ML use on basic license

* removing timeout change

* adding permission checks

* updating tests

* removing unnecessary checks

* [ML] Adds new page for choosing file or index based data visualizer (#23763)

* [ML] Adding license check to datavisualizer landing page (#23809)

* [ML] Adding license check to datavisualizer landing page

* removing comments

* updating redirect to landing page

* [ML] Adding ability to upload data to elasticsearch from datavisualizer  (#24042)

* [ML] Initial work for delimited file upload

* adding results links cards

* adding nav menu

* removing accidental debugger

* initial work for importing semi structured text

* using ingest pipeline for import

* adding json importer and better error reporting

* better progress steps

* time range added to results links

* first import only creates index and pipeline

* adding status constants

* using status constants

* adding explanation comment

* updating yarn.lock

* changes based on review

* fixing space

* fixing space again, stort it out git

* removing oversized background container causing constant scrollbar

* [ML] Adding basic license check when loading privileges (#24173)

* [ML] Adding basic license check

* missing import

* [ML] Adds an About panel to the file data visualizer landing page (#24260)

* [ML] Adds an About panel to the file data visualizer landing page

* [ML] Remove unnecessary style from file data visualizer scss

* [ML] Adding better error reporting for reading and importing data (#24269)

* [ML] Adding better error reporting for reading and importing data

* changes to endpoint errors

* displaying errors

* step logic refactor

* removing log statements

* [ML] Switch file data visualizer to use Papa Parse for CSV parsing (#24329)

* [ML] Fixes layout of Data Visualizer selector page for IE (#24387)

* [ML] Adding ability to override various settings when importing data (#24346)

* [ML] Adding ability to override various settings when importing data

* second commit with most of the outstanding code

* improving index pattern name validation

* better index pattern matching

* adding comments

* adding empty index pattern check

* changes based on review

* fixing test
2018-10-23 20:58:05 +01:00
Larry Gregory
b981546290
Always enable the login button (#24407)
The login button should always be enabled, to account for password managers that will auto-fill the form fields.
2018-10-23 15:57:03 -04:00
Chris Cowan
3a6a3eadd6
[Infra UI] Adding time ranges to detail links (#24237)
* [Infra UI] Adding time ranges to detail links

- Adds timeranges to hosts, containers, and pods links
- Fixes #24228 - Typos and what not prevented urls from working

* remove argument hard coded formatting

* Cleaning up query arg generation

* Adding missing file

* removing rison hard coded string
2018-10-23 11:39:59 -07: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
Walter Rafelsberger
836b1a16d2
[ML] Fixes check for lower memory limit. (#24323)
- Fixes the job validation for the lower bound of the model memory limit. Previously the check was against zero, now it's again less than 1MB, which is the same as the backend expects.
- If the user entered model memory limit is less than half the value of the estimated model memory limit, a warning type message gets triggered. If the user entered model memory limit is more than half the value but less then the actual value of the estimated model memory limit, then the already existing info type message is shown. The unit tests have been updated to reflect that behavior.
2018-10-23 19:03:04 +02:00
Joe Fleming
f894f0ea62
Fix: Use basepath from state for socket path (#24369)
Closes https://github.com/elastic/kibana/issues/23168

This PR uses the `basePath` constant from Angular to mount the client socket instance, allowing it to connect correctly even in when using a Space.

### Workpad correctly loading in a Space
![screenshot 2018-10-22 15 57 00](https://user-images.githubusercontent.com/404731/47324055-251a3f80-d613-11e8-9fb0-0b0eaa3b974d.png)

### List of workpads restricted to a space
![screenshot 2018-10-22 13 49 54](https://user-images.githubusercontent.com/404731/47319741-50496280-d604-11e8-8966-83ef3a9fb320.png)

### List of workpads restricted to default space
![screenshot 2018-10-22 13 50 37](https://user-images.githubusercontent.com/404731/47319747-593a3400-d604-11e8-960d-385c80c7638a.png)
2018-10-23 09:56:42 -07:00
Chris Cowan
977964dbb2
Add drilldown to waffle map groupings (#24301) 2018-10-23 09:49:53 -07:00
Chris Cowan
bb749754b5
Use metric indices when displaying metrics in the waffle map (#24251) 2018-10-23 09:45:52 -07:00
Pete Harverson
963151b27f
[ML] Fixes font size of headings in anomalies table expanded row (#24390) 2018-10-23 16:19:05 +01: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
Melissa Alvarez
67e9bc4bfd
[ML] Ensure Job list search bar is aligned + prevent job actions from wrapping (#24334)
* display:none when no jobs selected

* Prevent job actions from wrapping

* wrap condition in paren
2018-10-23 14:10:32 +01:00
Melissa Alvarez
4a45224d6a
[ML] Replace EuiComboBox with EuiSuperSelect in Anomalies Table severity control (#24272)
* EuiSuperSelect replaces EuiComboBox in severity control

* Add tests for selectSeverity component
2018-10-23 13:35:42 +01:00
Sonja Krause-Harder
6b5b4cc33b
[Infra UI] Test sources and capabilities endpoints (#24216)
* Test for capabilities GraphQL endpoint.

* Test for sources GraphQL endpoint.

* Move tests to typescript.

* Renaming infraops to infra.
2018-10-23 09:20:55 +02:00
Catherine Liu
bc2803d151
Adds sanity check for uploaded workpad JSON (#24297)
* Extracted upload handler. Added sanity check for uploaded JSON

* Changed file name and error verbiage

* Fixed import

* Added early return for null file

* Cleaned up update_workpad
2018-10-22 21:59:53 -07:00
Catherine Liu
c90e0eb756
Clickable refresh button when loading (#24312)
* clickable refresh button when loading

* Disables manual refresh button in refresh popover when workpad is loading
2018-10-22 21:17:43 -07:00
Chris Roberson
c38dbaa678
[Monitoring] Fix broken api integration test (#24076)
* Fix broken api integration test

* Fix other test as well
2018-10-22 20:16:18 -04:00
Catherine Liu
713ecc1e64
Sets document title in Canvas (#24313) 2018-10-22 15:18:15 -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
Catherine Liu
8fc3d477a7
Set max width of datasource preview to 1000px (#24311) 2018-10-22 14:03:38 -07:00
Catherine Liu
9d424f916b
Read Only Mode in Canvas (#23304)
* Added readOnly to transient state

* Added check that user has permission to edit when loading workpads

* Shows toolbar in readOnly mode

* Disables page controls in read only mode

* Disables add page button when editing disabled

* Added comment to workpad routes

* Cleaned up page manager styles

* Added a comment to es_persist

* Renamed transient.readOnly to transient.readOnlyUser

* Replaced isEditing in transient state with readOnly in workpad state

* Cleaned up workpad_header

* Fixed logic in workpad_header

* Disables workpad controls instead of hiding them and adds tooltips

* Switched eye icon to lock icon in workpad header

* Renamed readOnly and readOnlyUser variables and functions

* Added dispatch to update canUserWrite in create/clone/delete workpads

* Fixed typo

* Removed unnecessary prop from workpad

* Refactored tooltips in workpad_loader

* Added workpad selector tests
2018-10-22 14:01:12 -07:00
Felix Stürmer
744edd9c9d
[Infra UI] functional browser test for infraops page (#24248) 2018-10-22 22:17:48 +02:00
Lukas Olson
914bf52228
feat: add toggle for autocomplete (#24274) 2018-10-22 13:11:55 -07:00
Catherine Liu
30e8553f1b
Autofocuses elements filter when modal opens (#24299) 2018-10-22 12:45:13 -07:00
Joe Fleming
13ab4cddde
Chore: Only load on canvas (#24247)
Closes https://github.com/elastic/kibana/issues/23379

Defer loading Canvas code until the application is used.

- Wait to load the window error override
- Only create socket when the app is ready

Since we need to support deferring loading the application until some async things finish (mostly fetching functions), I opted to handle this in the App component, since it was a convenient async way to hold until ready. I figure we can refactor that later.
2018-10-22 12:15:52 -07:00
Joe Fleming
1b9a1c93ec
Chore: canvas build on bootstrap (#24175)
Closes https://github.com/elastic/kibana/issues/23287

Adds `kbn:bootstrap` script to Canvas that builds the core Canvas plugins. This means users no longer need to run the step manually. This should also fix snapshots.
2018-10-22 12:13:43 -07:00
Tim Sullivan
c4cb8203b3
[Telemetry] Have Telemetry automatically get all the Kibana usage stats (#22336)
* Have Telemetry automatically get all the Kibana usage stats

* simplify

* remove reporting module

* remove unused helper function

* fix tests

* fix integration tests

* --wip-- [skip ci]

* getKibanaStats flattens nested xpack plugin stats into a single level

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

* Update task_manager readme

* Update task manager readme

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

* Make the cancellable package promise-compliant

* Update task manager readme w/ reference to cancellable

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

* Move cancellable to task_manager, and typescriptify it.

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

* Add pagination support to task manager fetch

* Move task manager to OSS

* Remove task manager reference from x-pack

* Make task_manager a valid core plugin

* Modify how task resource allocation works

* Remove the special case 'max' workers occupied value

* Remove x-pack package.json changes

* Make taskDefinitions a part of uiExports

* Make task docs saved-object compliant.

* Add kbnServer to the task context.

* Allow tasks to have a void / undefined return type

* revert x-pack change

* move cancellable to src/utils

* move to src/server

* use afterPluginsInit hook

* task_manager.ts rename

* add a wrapper with a setClient method

* Add tests for task runner

* Break task_pool into smaller, testable pieces

* return raw task doc fields for calling code

* remove todo comment

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

* fix misidentified field name

* fix rest args warning

* flatten task_pool

* remove cancellable

* return raw task doc fields for calling code

* remove todo comment

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

* fix rest args warning

* typescript fixes

* roll back setClient takes a callback

* createTaskRunner returns an object with run/cancel functions

* Test task store, tweak task poller tests

* Rename num_workers to max_workers

* Tweak task pool method names

* Fix cancellable test, and ts errors

* Rename doc to _doc

* Fix the doc type in the task manager index mappings

* Make task costs configurable in kibana.yml

* fix a tslint warning

* TaskManager.afterPluginsInit replaces circuitous stuff

* addMiddleware, implement beforeSave

* wip

* comment

* run context stuff

* pretty fix

* comments

* lint/pretty fixes

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

* task runner test constructor opts fix

* Add task_manager integration tests

* FIx readme mistakes, fix schedule signature

* Fix integration tests

* Add blurb about middleware

* make a libs directory for the small things

* test for extractTaskDefinitions

* unit test for middleware

* Comment, refactor, and test task_manager

* Touch up comments

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

* Fix sample task definition in readme

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

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

* Fix task manager signature

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

* Fix task manager integration tests

* Update the task manager index creation to use auto_expand_replicas

* Fix task manager integration tests

* Fix task manager integration tests

* Fix the overzealous deletion of .kibana during tests

* Core task manager

* Allow hardcoded ID passed in

* comments

* don't deconstruct type and task for payload

* remove uiExport support

* move task_manager to x-pack/plugins

* expose as client on the plugin namespace

* fix tests

* move plugin api integration tests

* roll back readme sample task definition example

* fix sample plugin link

* server.taskManager

* sanitizeTaskDefinitions

* fix integration tests

* sanitize rename

* assert unintialized and check for duplicates in registerTaskDefinitions

* Remove unnecessary defaults from task_manager.test.ts

* Remove task manager from OSS

* Remove task manager from src

* Tidy up task_manager unit tests around elasticsearch status changes

* Integration test for specifying ID in scheduling

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

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

@ryankeairns @snide @kobelb 

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

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


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


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


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



Closes #20015
2018-10-22 14:18:17 -04:00
Chris Cowan
2d5fe0c123
Fixes #24261 - Add unable to render message for data less then 2 points (#24291) 2018-10-22 09:19:54 -07:00
Matt Bargar
4016572ba5
Add telemetry for KQL (#23547)
This PR adds two usage stats to our telemetry for KQL:

* How many times people click the opt in/out toggle in the query bar UI
* Which language Kibana admins have set as the global default in advanced settings
2018-10-22 11:14:54 -04:00
Brandon Kobel
1b2e7f4194
Upgrading mocha to 5.2.0 and gulp-mocha to 6.0.0 (#22816)
* Upgrading mocha to 5.2.0 and gulp-mocha to 6.0.0

* Fixing x-pack yarn.lock

* Switching x-pack to ^5.2.0

* Fixing yarn.lock
2018-10-22 07:37:10 -07:00
Chris Roberson
27dee7e158
[Monitoring] Add tests to ensure mappings exist on metric fields (#23958)
* Ensure mappings exist

* Add APM

* Remove unnecessary eslint disable comment

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

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

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

* tweak security again

* Fix typo

* remove invalid expect

* Removed cruft

* add missing field to template, renamed said field

* tweaks

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

Co-Authored-By: mattapperson <me@mattapperson.com>
2018-10-22 09:51:42 -04:00
Justin Kambic
ee334c4555
[Beats CM] Disallow tag assignment for multiple outputs (#24106)
* [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

* Add logic to gray out tag badges in list.

* Update logic for mapping tags to unassigned state.

* Destructure anonymous function parameters.

* removed unused import

* fix es-lint error

* fix outputs

* fix types from infra merge

* remove dupe dep

* Update tag disable logic to check for uniqueness requirements.

* 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

* Remove unused import.
2018-10-22 08:27:32 -04:00
markharwood
3ca2231549
Remove “step” property which makes values other than 1, 1001, 2001 etc illegal (#23610)
Closes #22054
2018-10-22 09:27:17 +01:00
Maryia Lapata
f6ba6961c3
Fix broken link on Watcher (#24317) 2018-10-21 15:39:15 +03:00
Josh Dover
3fc8b35da8
Add server OS information to telemetry stats (#23793)
* Add server OS data to monitoring collector and telemetry

* Fixup naming

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

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

* [uiSettings] only log about config upgrade on success

* [uiSettings/createOrUpgradeSavedConfig] add onWriteError option

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

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

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

* [uiSettings] avoid shadowed variable name
2018-10-19 20:29:38 -07:00
dave.snider@gmail.com
ab29946740
update eui to 4.5.1 (#24218)
* update eui to 4.5.1

* icons declared for logging / infra

* remove eui types that are now in EUI directly

* clean up duplicated EUI typescript definitions

* Fix EuiSelect usage in beats enrollment
2018-10-19 18:30:06 -07:00
Josh Dover
2fa5ee533f
Add euiIconType for InfraOps and Logs links (#24289) 2018-10-19 17:22:54 -05:00
Chris Cowan
9189c06bd0
[Infra UI] Test for waffle map GraphQL endpoint (#24184)
* [Infra UI] Test for metrics GraphQL endpoint

* Moving apollo-boost to devDeps

* Converting tests to typescript

* Renaming infraops to infra

* Converting to typescript

* renaming from infraops to infra

* Adding waffle tests back in
2018-10-19 13:54:58 -07:00
Nox911
371eca2052 Translations for Advanced Settings (#23881)
* translate kbn.management.advanced_settings

* fix tests and update snapshots

* fix tests

* fix  issues

* fix id in get_category-name.js

* Update unit test snapshot

* update snapshot

* Fix issues
2018-10-19 20:56:50 +03:00
Nox911
a5c28d5c6b Feature/translate watcher(part_3) (#24066)
* translate watcher(part_3)

* fix default message in monitoring_watch.js

* fix issues

* fix issues

* fix issues

* fix issues
2018-10-19 20:49:37 +03:00
Nox911
fa9514355b Feature/translate watcher(part_2) (#24017)
* translate watcher(pad_2)

* fix issues

* fix issues
2018-10-19 20:48:31 +03:00
Nox911
6247189bb6 Feature/translate watcher(part_1) (#23989)
* translate watcher(pad_1)

* fix test

* fix issues

* fix the same id name

* fix default message

* fix issues
2018-10-19 20:47:05 +03:00
Chris Cowan
3c15067d32
[Infra UI] Test for metrics GraphQL endpoint (#24179)
* [Infra UI] Test for metrics GraphQL endpoint

* Moving apollo-boost to devDeps

* Converting tests to typescript

* Renaming infraops to infra
2018-10-19 10:39:21 -07:00
Matt Apperson
a23124e799
[BeatsCM] Fixes and issue where if security is disabled, BeatsCM breaks Kibana (#24249)
* fix spelling

* fix license and security checks

* removed unused vars

* cleanup

* remove security check from route def as it is already managed in-route
2018-10-19 10:17:45 -04:00
Melissa Alvarez
da26fcbcce
[ML] Ensure applying/removing groups menu is keyboard accessible (#24212)
* add group list arrow nav

* up/down moved into own functions

* always prevent default on arrow key press
2018-10-19 09:42:21 +01:00
dave.snider@gmail.com
db905c0da5
remove eui css import from beats/infra (#24245) 2018-10-18 18:12:39 -07:00
Lukas Olson
314d1c478a
Canvas function/argument/value autocomplete (#23200)
* feat: canvas autocomplete

* fix: remove unused files

* autocomplete ui cleanup

* fix: handle stuff inside quotes

* fix: canvas suggestion comparator

* fix: spaces at the beginning of expressions

* fix: move header out of autocomplete component itself

* fix: add tests

* fix: failing test

* fix: pointed to wrong module
2018-10-18 13:37:44 -07:00