Commit graph

11491 commits

Author SHA1 Message Date
Brandon Kobel 248b124339
RBAC Phase 1 (#19723)
* partial implementation for OLS Phase 1

* Allow Saved Objects Client to be wrapped

* Add placeholder "kibana.namespace" configuration property

* revert changes to saved objects client

* Remove circular dependency

* Removing namespace setting, we're using xpack.security.rbac.application

* Adding config.getDefault

* Expose SavedObjectsClientProvider on the server for easy plugin consumption

* migrate x-pack changes into kibana

* Beginning to use the ES APIs to insert/check privileges (#18645)

* Beginning to use the ES APIs to insert/check privileges

* Removing todo comment, I think we're good with the current check

* Adding ability to edit kibana application privileges

* Introducing DEFAULT_RESOURCE constant

* Removing unused arguments when performing saved objects auth check

* Performing bulkCreate auth more efficiently

* Throwing error in SavedObjectClient.find if type isn't provided

* Fixing Reporting and removing errant console.log

* Introducing a separate hasPrivileges "service"

* Adding tests and fleshing out the has privileges "service"

* Fixing error message

* You can now edit whatever roles you want

* We're gonna throw the find error in another PR

* Changing conflicting version detection to work when user has no
application privileges

* Throwing correct error when user is forbidden

* Removing unused interceptor

* Adding warning if they're editing a role with application privileges we
can't edit

* Fixing filter...

* Beginning to only update privileges when they need to be

* More tests

* One more test...

* Restricting the rbac application name that can be chosen

* Removing DEFAULT_RESOURCE check

* Supporting 1024 characters for the role name

* Renaming some variables, fixing issue with role w/ no kibana privileges

* Throwing decorated general error when appropriate

* Fixing test description

* Dedent does nothing...

* Renaming some functions

* Adding built-in types and alphabetizing (#19306)

* Filtering out non-default resource Kibana privileges (#19321)

* Removing unused file

* Adding kibana_rbac_dashboard_only_user to dashboard only mode roles (#19511)

* Adding create default roles test (#19505)

* RBAC - SecurityAuditLogger (#19571)

* Manually porting over the AuditLogger for use within the security audit
logger

* HasPrivileges now returns the user from the request

* Has privileges returns username from privilegeCheck

* Adding first eventType to the security audit logger

* Adding authorization success message

* Logging arguments when authorization success

* Fixing test description

* Logging args during audit failures

* RBAC Integration Tests (#19647)

* Porting over the saved objects tests, a bunch are failing, I believe
because security is preventing the requests

* Running saved objects tests with rbac and xsrf disabled

* Adding users

* BulkGet now tests under 3 users

* Adding create tests

* Adding delete tests

* Adding find tests

* Adding get tests

* Adding bulkGet forbidden tests

* Adding not a kibana user tests

* Update tests

* Renaming the actions/privileges to be closer to the functions on the
saved object client itself

* Cleaning up tests and removing without index tests

I'm considering the without index tests to be out of scope for the RBAC
API testing, and we already have unit coverage for these and integration
coverage via the OSS Saved Objects API tests.

* Fixing misspelling

* Fixing "conflicts" after merging master

* Removing some white-space differences

* Deleting files that got left behind in a merge

* Adding the RBAC API Integration Tests

* SavedObjectClient.find filtering (#19708)

* Adding ability to specify filters when calling the repository

* Implementing find filtering

* Revert "Adding ability to specify filters when calling the repository"

This reverts commit 9da30a15db.

* Adding integration tests for find filtering

* Adding forbidden auth logging

* Adding asserts to make sure some audit log isn't used

* Adding more audit log specific tests

* Necessarly is not a work, unfortunately

* Fixing test

* More descriptive name than "result"

* Better unauthorized find message?

* Adding getTypes tests

* Trying to isolate cause of rbac test failures

* Adding .toLowerCase() to work around capitalization issue

* No longer exposing the auditLogger, we don't need it like that right now

* Removing some unused code

* Removing defaultSettings from test that doesn't utilize them

* Fixing misspelling

* Don't need an explicit login privilege when we have them all

* Removing unused code, fixing misspelling, adding comment

* Putting a file back

* No longer creating the roles on start-up (#19799)

* Removing kibana_rbac_dashboard_only_user from dashboard only role
defaults

* Fixing small issue with editing Kibana privileges

* [RBAC Phase 1] - Update application privileges when XPack license changes (#19839)

* Adding start to supporting basic license and switching to plat/gold

* Initialize application privilages on XPack license change

* restore mirror_status_and_initialize

* additional tests and peer review updates

* Introducing watchStatusAndLicenseToInitialize

* Adding some tests

* One more test

* Even better tests

* Removing unused mirrorStatusAndInitialize

* Throwing an error if the wrong status function is called

* RBAC Legacy Fallback (#19818)

* Basic implementation, rather sloppy

* Cleaning stuff up a bit

* Beginning to write tests, going to refactor how we build the privileges

* Making the buildPrivilegesMap no longer return application name as the
main key

* Using real privileges since we need to use them for the legacy fallback

* Adding more tests

* Fixing spelling

* Fixing test description

* Fixing comment description

* Adding similar line breaks in the has privilege calls

* No more settings

* No more rbac enabled setting, we just do RBAC

* Using describe to cleanup the test cases

* Logging deprecations when using the legacy fallback

* Cleaning up a bit...

* Using the privilegeMap for the legacy fallback tests

* Now with even less duplication

* Removing stray `rbacEnabled` from angularjs

* Fixing checkLicenses tests since we added RBAC

* [Flaky Test] - wait for page load to complete (#19895)

@kobelb this seems unrelated to our RBAC Phase 1 work, but I was able to consistently reproduce this on my machine.

* [Flaky Test] Fixes flaky role test (#19899)

Here's a fix for the latest flaky test @kobelb

* Now with even easier repository access

* Sample was including login/version privileges, which was occasionally (#19915)

causing issues that were really hard to replicate

* Dynamic types (#19925)

No more hard-coded types! This will make it so that plugins that register their own mappings just transparently work.

* start to address feedback

* Fix RBAC Phase 1 merge from master (#20226)

This updates RBAC Phase 1 to work against the latest master. Specifically:
1. Removes `xpack_main`'s `registerLicenseChangeCallback`, which we introduced in `security-app-privs`, in favor of `onLicenseInfoChange`, which was recently added to master
2. Updated `x-pack/plugins/security/server/lib/watch_status_and_license_to_initialize.js` to be compliant with rxjs v6

* Retrying initialize 20 times with a scaling backoff (#20297)

* Retrying initialize 20 times with a scaling backoff

* Logging error when we are registering the privileges

* Alternate legacy fallback (#20322)

* Beginning to use alternate callWithRequest fallback

* Only use legacy fallback when user has "some" privileges on index

* Logging useLegacyFallback when there's an authorization failure

* Adding tests, logging failure during find no types fallback

* Switching to using an enum instead of success/useLegacyFallback

* Using _execute to share some of the structure

* Moving comment to where it belongs

* No longer audit logging when we use the legacy fallback

* Setting the status to red on the first error then continually (#20343)

initializing

* Renaming get*Privilege to get*Action

* Adding "instance" to alert about other application privileges

* Revising some of the naming for the edit roles screen

* One more edit role variable renamed

* hasPrivileges is now checkPrivileges

* Revising check_license tests

* Adding 2 more privileges tests

* Moving the other _find method to be near his friend

* Spelling "returning" correctly, whoops

* Adding Privileges tests

* tests for Elasticsearch's privileges APIs

* Switching the hard-coded resource from 'default' to *

* Throw error before we  execute a POST privilege call that won't work

* Resolving issue when initially registering privileges

* Logging legacy fallback deprecation warning on login (#20493)

* Logging legacy fallback deprecation on login

* Consolidation the privileges/authorization folder

* Exposing rudimentary authorization service and fixing authenticate tests

* Moving authorization services configuration to initAuthorization

* Adding "actions" service exposed by the authorization

* Fixing misspelling

* Removing invalid and unused exports

* Adding note about only adding privileges

* Calling it initAuthorizationService

* Throwing explicit validation  error in actions.getSavedObjectAction

* Deep freezing authorization service

* Adding deepFreeze tests

* Checking privileges in one call and cleaning up tests

* Deriving application from Kibana index (#20614)

* Specifying the application on the "authorization service"

* Moving watchStatusAndLicenseToInitialize to be below initAuthorizationService

* Using short-hand propery assignment

* Validate ES has_privileges response before trusting it (#20682)

* validate elasticsearch has_privileges response before trusting it

* address feedback

* Removing unused setting

* Public Role APIs (#20732)

* Beginning to work on external role management APIs

* Refactoring GET tests and adding more permutations

* Adding test for excluding other resources

* Adding get role tests

* Splitting out the endpoints, or else it's gonna get overwhelming

* Splitting out the post and delete actions

* Beginning to work on POST and the tests

* Posting the updated role

* Adding update tests

* Modifying the UI to use the new public APIs

* Removing internal roles API

* Moving the rbac api integration setup tests to use the public role apis

* Testing field_security and query

* Adding create role tests

* We can't update the transient_metadata...

* Removing debugger

* Update and delete tests

* Returning a 204 when POSTing a Role.

* Switching POST to PUT and roles to role

* We don't need the rbacApplication client-side anymore

* Adding delete route tests

* Using not found instead of not acceptable, as that's more likely

* Only allowing us to PUT known Kibana privileges

* Removing transient_metadata

* Removing one letter variable names

* Using PUT instead of POST when saving roles

* Fixing broken tests

* Adding setting to allow the user to turn off the legacy fallback (#20766)

* Pulling the version from the kibana server

* Deleting unused file

* Add API integration tests for roles with index and app privileges (#21033)

* Rbac phase1 functional UI tests (#20949)

* rbac functional tests

*  changes to the test file

* RBAC_functional test

*  incorporating review feedback

* slight modification to the addPriv() to cover all tests

* removed the @ in secure roles and perm file in the describe block  and made it look more relevant

* Fixing role management API from users

* Set a timeout when we try/catch a find, so it doesn't pause a long time

* Changing the way we detect if a user is reserved for the ftr

* Skipping flaky test
2018-07-24 12:40:50 -04:00
Tim Sullivan 5caf9f2baa
Remove xpack usage module (#21099) 2018-07-24 08:52:29 -07:00
Søren Louv-Jansen c8d8b8aa24
[APM] Remove ML docs link (#21137) 2018-07-24 16:44:17 +02:00
James Gowdy b4056bb3b4
[ML] Renaming jobs list directory (#21130)
* [ML] Renaming jobs list new to jobs list

* moving missing files
2018-07-24 15:38:14 +01:00
Chris Roberson ade24f2104
[Monitoring] Remove kibana_stats.requests.status_codes from bulk uploader (#20855)
* Remove `status_codes` from bulk uploader

* Remove more references to `status_codes`
2018-07-24 10:15:26 -04:00
Pete Harverson 49db091fdd
[ML] Adds icon to the Anomalies Table if detector has rules (#21135)
* [ML] Adds icon to the Anomalies Table if detector has rules

* [ML] Edit to tooltip message on anomalies table detetor rule icon
2018-07-24 14:22:28 +01:00
James Gowdy 5cb22806da
[ML] Adding missing default privilege values (#21131) 2018-07-24 13:02:51 +01:00
James Gowdy 33bad59e1c
[ML] Create watch from new jobs list (#21112)
* [ML] [WIP] Create watch from new jobs list

* removing comments

* adding interval calculation

* adding checkbox to start datafeed modal

* adding proptypes check to SelectSeverity

* fixing typo

* changes based on review

* correcting input labels
2018-07-24 11:54:22 +01:00
James Gowdy 770ff205cd
[ML] Adding rules and filters permission checks (#21097)
* [ML] Adding rules and filters permission checks

* fixing disabled link check
2018-07-24 10:38:37 +01:00
Pete Harverson 8464caf2a6
[ML] Converts the custom URL editor to EUI / React (#21094) 2018-07-24 10:14:10 +01:00
Walter Rafelsberger 86a9e46b4a [ML] Fixes an issue with failing job validation when fieldCaps object is malformed. (#21116) 2018-07-23 19:46:19 -07:00
Walter Rafelsberger e05b668f43
[ML] More helpful job validation success messages. (#21079)
This provides more helpful texts for job validation success messages. Previously only a list of checks was shown to the user without any further explanation. This PR addresses this issue in the following way:
- At the bottom of the modal an introductory brief text about job validation including a link to documentation is inserted.
- The success messages in the list now provide a more helpful text including (where applicable) a deep link to documentation
- The messages now support a richer Callout layout including a header and additional text.
2018-07-23 23:28:38 +02:00
Søren Louv-Jansen 7f57bf3e9e
[APM] Add apm_core plugin and query errors, spans, transactions from separate indices (#21022)
* [APM] Change index pattern

* WIP: change how indicies are queried in APM

* Create apm_core plugin

* Update config keys from `xpack.apm` to `apm_core`

* Revert tutorial formatting changes

* Rename to apm_oss
2018-07-23 22:20:05 +02:00
Walter Rafelsberger 3dc5b30f7e
[ML] Job validation uses fieldCaps to check aggregatable fields to avoid triggering Elasticsearch errors. (#21087)
While the output in the UI was fine, certain job configurations containing non-aggregatable fields could trigger errors on the Elasticsearch side.
This PR fixes it by adding an additional query for fieldCaps to check first which fields are actually aggregatable.
2018-07-23 20:35:10 +02:00
Walter Rafelsberger e503b87eb2
[ML] Job validation no longer reports an error when categorization job is properly setup. (#21075)
For categorization jobs, job validation would report that mlcategory isn't an aggregatable field. This fix checks the job configuration and only reports the error if the job config isn't using categorization_field_name and the detector field isn't set to mlcategory.
2018-07-23 14:37:16 +02:00
Søren Louv-Jansen 7266349e33
[APM] Performance marks for RUM agent (#20931)
* [APM] Performance marks for agent

* Fixed formatting and design

* Update snapshot

* Fixed tooltip id
2018-07-23 14:15:59 +02:00
James Gowdy bf6cc70d24
[ML] Adding validation to the edit job flyout (#21041)
* [ML] Adding validation to the edit job flyout

* removing a bit of lodash

* tiny code clean up

* fixing validation check
2018-07-23 12:39:47 +01:00
Walter Rafelsberger d6453fa3ba
[ML] Migrates ml-form-label to EUI/React. (#21059)
- Migrates the ml-form-label directive to use EUI/React.
- Exposes both FormLabel and JsonTooltip as React components from individual files so they can be used in a React context when the wrapping element also has been already ported to React.
- Adds jests based tests for the FormLabel and JsonTooltip components. They try where possible to make the same assertions like the mocha based tests. The mocha based tests are kept in the code for now so the code gets still tested in a angular based context and as a reference to have the same mocha/jest based tests side by side as a reference for migration.
- The FormLabel component is done in a way so it supports transclusion in both cases when used with React alone (using the children prop) and angularjs (using a ref callback and angular's transclude()).
2018-07-23 11:42:36 +02:00
Pete Harverson 465ab78ef7
[ML] Adds editor for configuring detector rules (#20989)
* [ML] Adds editor for configuring detector rules

* [ML] Edits to Rule Editor flyout following review
2018-07-22 14:01:45 +01:00
dave.snider@gmail.com 6ecc990274
Upgrade xpack to eui@3.0.0 (#20930)
* upgrade to eui@3.0.1
2018-07-21 08:02:50 -07:00
James Gowdy cdafa2f092
[ML] Adding filters privileges (#21021) 2018-07-21 11:49:41 +01:00
CJ Cenizal ab0e2badb7
Convert notify.warning calls to use toastNotifications (#20767)
* Replace notify.warning with toastNotifications in region map, vega, index_pattern, redirect_when_missing, graph, monitoring, and ML
* Link to index patterns from Graph toast.
* Delete RouteBasedNotifier.
* Remove courierNotifier and SearchTimeout and ShardFailure errors.
* Remove warning and custom notifier types.
2018-07-20 15:10:02 -07:00
CJ Cenizal 97593b409b
Make 'Change password' button on account page keyboard-accessible. (#20958) 2018-07-20 11:29:16 -07:00
Tim Sullivan 2216b226d6
Monitoring Angular directives to use React components (#19183)
* remove some webpack aliases for jest

* remove status icon angular directive

* fix some component import problems
2018-07-19 14:29:25 -07:00
Tim Sullivan 80833cde95
Remove /api/_xpack/usage and /api/_kibana/v1/stats (#20800)
/api/_xpack/usage was added as a target for 6.4.0 but it will not be
used. Instead, the /api/stats response will include usage info on
everything that gets registered with the usage service in
/src/server/usage

/api/_kibana/v1/stats is a GET API that was added in 6.2, during a point
where we thought providing usage stats through a public API would be OK
for capturing internally, with the benefit of having it be visible.

However, we've pivoted away from that idea because it doesn't line up
too well with the existing flow of data, where usage stats are combined
with the "Kibana stats" such as process uptime and number of requests.
We want to shift how we collect stats from Kibana, but it will be
gradual. It might be a while before we have an architecture that makes
sense for a standalone public API for the usage stats

This endpoint was never documented, and isn't used anywhere in the code.
It does incur a maintenance cost though.

Therefore, instead of waiting for a next major version to remove this
API, I'm removing it for 6.4. It will be marked in the release notes as
a breaking change. Since it was never documented, it should not provide
a problem.
2018-07-19 13:46:52 -07:00
Bill McConaghy 35dade2d3c
Reactify users roles (#20739)
* partial progress on reactifying users

* progress on EUIfication of users screen

* removing Angular stuff

* adding data-test-subj="passwordConfirmationInput"

* removing data-test-subj="userFormEmailInput" refs from tests

* fixing selector for role assignment

* some functional test fixes

* fixing some functional tests

* fixing last functional test

* removing stray console log

* fixing warnings

* attempting to fix flaky test

* trying again to fix flaky test

* PR feedback

* PR feedback

* fixing issue where form tried to submit

* adding sleep to allow user to load

* Design edits

Mainly adding wrapper EUI page elements, but also shifted around form elements.

* Fixed console error and added responsive prop to table

* addressing PR feedback

* A few more PR feedback

- Fixed alignment of table
- Removed the tooltip from the lock icon and placed the description inline.
- Changed delete button to an empty button

* addressing more PR feedback

* adding email field back in

* adding back username validation

* restoring original error message

* fixing dumb null error
2018-07-19 16:40:12 -04:00
James Gowdy d1b667512c
[ML] Better handling of job request timeouts (#20985) 2018-07-19 16:39:54 +01:00
James Gowdy 3d06046295
[ML] Removing _feature and _ignored from detector modal (#20984) 2018-07-19 16:39:42 +01:00
James Gowdy 7a84e7871e
[ML] Changing edit job icon (#20935) 2018-07-19 08:21:10 +01:00
Tim Sullivan 274617de59
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-18 16:37:04 -07:00
James Gowdy 3c74d30bee
[ML] Adding close jobs menu item (#20927)
* [ML] Adding close jobs menu item

* changing icon

* updates based on review

* adding extra check for close failure

* adding extra guard against missing response
2018-07-18 17:47:44 +01:00
Walter Rafelsberger 651013b89c
[ML] Moves tooltip of info icon to top to avoid overlapping with corresponding form fields. (#20874) 2018-07-18 14:20:05 +02:00
CJ Cenizal a36b87ad3e
Add SearchStrategyRegistry and defaultSearchStrategy to support existing search behavior, and integrate it with CallClient. (#20497)
* Add SearchStrategyRegistry and defaultSearchStrategy to support existing search behavior, and integrate it with CallClient.
* Move fetch param logic from CallClient into defaultSearchStrategy.
* Move defaultSearchStrategy configuration into kibana plugin via search uiExport to avoid race conditions with other plugins.
* Add call-out react directive.
* Show error in Discover if user tries to access a rollup index pattern without the right search strategy. Sentence-case copy in field chooser.
* Add tests with multiple searchStrategies and fix errors in logic.
2018-07-17 18:49:46 -07:00
Stacey Gammon e90f652875
Bump eui (#20774)
* bump eui

* Fixed breaking `EuiPage` changes

Mainly adding `EuiPageBody`’s where there were none

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

* bump eui

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

* Update jest snapshots in xpack
2018-07-17 19:28:07 -04:00
Hendrik Muhs a0a22cfc12
[Monitoring/ML] add number of forecasts to monitoring overview (#20758)
Add forecasts (Number of forecasts for an ml jobs) as column to the ML Jobs monitoring page. Related to: elastic/elasticsearch#31647
2018-07-17 16:41:19 +02:00
James Gowdy 492fb01f8c
[ML] Better error notifications in jobs list (#20880)
* [ML] Better error notifications in jobs list

* removing test data
2018-07-17 14:27:28 +01:00
Pete Harverson 6939f5073c
[ML] Adds page to ML Settings for viewing and editing filter lists (#20769)
* [ML] Add page to ML Settings for viewing and editing filter lists

* [ML] Edits to Filter Lists Settings page following review
2018-07-17 09:47:26 +01:00
Tim Sullivan 8ba773a498
Add Beats module and input info to Telemetry (#20648)
* fix metrics field name (stats)

* add state info

* add module name count

* use a set for the unique hosts instead of a map

* fix getting beats_state info

* fix unit test

* processBeatsStatsResults and processBeatsStateResults
2018-07-16 12:57:26 -07:00
James Gowdy 54cf83d360
[ML] Jobs list bug fixes (#20823) 2018-07-16 16:33:59 +01:00
James Gowdy 6ddc9db376
[ML] Removing hardcoded datafeed ID in jobs list (#20815) 2018-07-16 12:44:59 +01:00
Chris Roberson 276f08ccbb
[Monitoring] Capitalize the license type (#20683)
* Capitalize the license type in monitoring

* Revert "Capitalize the license type in monitoring"

This reverts commit 38ad3a516d.

* Pass in the type capitalized

* Revert "Pass in the type capitalized"

This reverts commit 6a05bb12f3.

* Capitalize type in license status directly so consumers do not need to worry about it
2018-07-13 16:24:57 -04:00
Aleh Zasypkin 34a44289aa
[Reporting] Blacklist Transfer-Encoding HTTP header for PDF report generation. (#20755) 2018-07-13 15:51:13 +03:00
Casper Hübertz ecefab55e6
[APM] Add section titles to span detail modal (#20717)
* Adding fontSize from variables

* SectionHeader style added

* Adding section headers

Needed titling for DB statement and Stacktrace on the page

* Pluralization

* Adding fontSize variable

* Creating new header title style

* Moving title into Stacktrace container

* Updated snapshots
2018-07-13 09:15:28 +02:00
Søren Louv-Jansen 423a961a1f
Redux should update after timefilter has changed (not before) (#20719) 2018-07-12 17:17:14 +02:00
James Gowdy da1acd0367
[ML] removing unnecessary privileges provider (#20671) 2018-07-12 09:31:23 +01:00
Walter Rafelsberger 65081ccdce
[ML] Ignore mouse events on pseudo element. (#20668)
The pseudo-element agg-type-select-wrapper::after which represents the dropdown's arrow didn't react to the click element of the dropdown itself. pointer-events: none is now added to the pseudo-elements to let the click pass through to the element intented to react on the click.
2018-07-12 09:58:32 +02:00
Søren Louv-Jansen 32505afd3d
Ensure timefilter updates correctly (#20677) 2018-07-11 21:35:45 +02:00
Walter Rafelsberger 0dbb819563
[ML] Fixes a regression bug which made the progress bar invisible. (#20618)
Fixes a regression introduced by #19794. This PR added a 5px top margin to the affected charts. The hard coded bottom margin of the progress bars wasn't adjusted accordingly so the progress bars ended up being hidden behind the actual chart. This PR fixes the problem by taking the chart's top margin into account for progressBarMarginBottom.
2018-07-11 15:21:39 +02:00
Walter Rafelsberger 8baf89006c
[ML] Migrate ml-info-icon to React/EUI. Fixes related IE11 error. (#20610)
- Migrates the ml-info-icon directive to use React/EUI. This fixes a related error in IE11.
- For now a hard-coded override is used to size the icon because EuiIconTip doesn't pass on the size attribute to the wrapped EuiIcon directive.
- The (simple) React component is kept within the directive's, because previously the directive template also wasn't in a separate file.
- Removes the unused mlJsonTooltipService angular service.
2018-07-11 14:27:30 +02:00
gchaps 739139ec45
[COPYEDIT] Management: Fixes capitalization in Extend your trial (#20627)
* [COPYEDIT] Management:  Fixes capitalization in Extend your trial

* [DOCS] Updated snapshot file
2018-07-10 13:30:50 -07:00
Søren Louv-Jansen bf3aa086c9
[APM] Add kuery to apm ui (#19469)
* Add Kuery to APM UI

* Format bool queries

* Fix test

* Add min-height

* Updated css to vars

* Added loading indicators

* Update breadcrumbs

* Update Discover links

* Add search button

* Fix readcrumb test

* Remove debounce

* Fix “undefined” kuery

* Handle missing index pattern

* Fix race condition in data fetching

* Fix legacy url encoding

* Filter out field-suggestions starting with "span*"

* Convert KuiTable to EuiTable for service overview

* Convert KuiTable to EuiTable for transaction overview

* Convert KuiTable to EuiTable for error overview

* Updated empty state messages

* Bump CI jo

* updated snapshots

* Add beta tooltip and update to EuiSearch

* Fixed issue with focus

* Submit when clicking search button

* Submit when clearing input

* Handle missing index pattern

* Remove query from spans
2018-07-10 21:00:54 +02:00
Nathan Reese 2084842e36
Add _bulk_create endpoint to /api/saved_objects (#20498)
* add _bulk_create rest endpoint

* document bulk_create api

* provide 409 status code when conflicts exist

* add overwrite and version to documenation

* clean up assert statements and 2 places where bulkCreate is getting used with new output

* properly stub bulkCreate return

* remove version of documenation example
2018-07-10 07:38:39 -06:00
Tim Roes cb5ee01c6a
Increase prettier line width to 100 (#20535)
* Increase prettier line width to 100

* Fix packages JS prettier

* Change style guide to 100 width

* Fix line-width in latest master changes
2018-07-09 22:50:37 +02:00
CJ Cenizal 49139d2218
Replace uses of Notifier with toastNotifications in Watcher. (#20538) 2018-07-09 13:29:48 -07:00
James Gowdy 646f1d7f2c
[ML] disabling time range selector on jobs list (#20563) 2018-07-09 18:05:18 +01:00
Tim Sullivan c043788c97
[Telemetry] move x-pack/monitoring collector classes to src/server/usage (#20248)
* [Monitoring/Telemetry] Move Usage service from Monitoring to Kibana core

* fix tests

* fix reporting integration

* roll back more diffs

* roll logger into bulk uploader to remove file duplication

* fix xpack usage api

* subclass constructor is not needed

* collectorSet has factory methods for collector object creation

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

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

* Add tests for PipelineViewer component.

* Test Metric component.

* Test CollapsibleStatement component.

* Test PluginStatement component.

* Test Queue component.

* Test StatementListHeading component.

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

* Test StatementList component.

* Test Statement component.

* Run prettier on edited files.
2018-07-09 11:51:52 -04:00
James Gowdy d44840cd19
[ML] Adding jobs stats bar to top of jobs list (#20527)
* [ML] Adding jobs stats bar to top of jobs list

* unsetting update function

* changing node variable name

* small refactor

* using props copy of `updateJobStats`

* adding proptypes

* adding fixed height
2018-07-09 14:59:10 +01:00
Chris Davies e34dbd0817
Fix issue w/ running chromium headless over http (#20528)
Remove the referrer header from report requests.
2018-07-06 15:30:10 -04:00
CJ Cenizal 8b8e5a0a8d
Convert various uses of notifier to toastNotifications. (#20420)
* Add MarkdownSimple component.
* Replace Context use of notifier with toastNotifications.
* Replace field.js use of notifier with toastNotifications.
* Replace State use of notifier with toastNotifications.
* Replace reporting use of notifier with toastNotifications.
* Convert Logstash to use toastNotifications.
* Convert Security to use toastNotifications.
2018-07-06 08:33:04 -07:00
James Gowdy d9fe439671
[ML] Using kibana's auto-refresh for jobs list (#20496)
* [ML] Using kibana's auto-refresh for jobs list

* better auto refresh management

* fixing typo

* increasing default interval

* variable rename

* kill interval on page change

* updating comment

* adding minimum refresh interval

* correctly clearing the interval
2018-07-06 11:32:49 +01:00
James Gowdy c6ba696127
[ML] Adding permission checks to jobs list (#20487)
* [ML] Adding permission checks to jobs list

* adding comment

* removing horizontal line

* changes based on review
2018-07-06 08:57:54 +01:00
James Gowdy 9d57acc867
[ML] Allow job cloning via wizards (#20227)
* [ML] [WIP] Allow job cloning via wizards

* updating clone link

* removing-created-by-data-when-editing-job

* removing commented out code

* changes based on review
2018-07-04 16:51:23 +01:00
James Gowdy c4756b183f
[ML] Adding filter bar to jobs list (#20415)
* [ML] Adding filter bar to jobs list

* fixing page index when filtering

* refreshing job selection after actions have happened

* adding job counts to groups

* catching multi-select start datafeed errors

* style tweaks

* more style tweaks

* changes based on review

* refactoring search logic
2018-07-04 13:57:25 +01:00
Søren Louv-Jansen 90528194da
[APM] ML integration (#19791) 2018-07-04 14:18:19 +02:00
Pete Harverson ea0395fd1e
[ML] Add endpoints and service for ML filters (#20406)
* [ML] Add endpoints and service for ML filters

* [ML] Replace getFilter(s) with single filters function
2018-07-04 13:00:16 +01:00
CJ Cenizal e024d3dfa1
Refactor SearchSource interface (#20334)
* Removed the dynamically assigned type, query, filter, sort, highlight, highlightAll, aggs, from, searchAfter, size, source, version, and fields methods.
* The accessor interface now consists of getField and setField methods which throw errors if an unrecognized property name is provided, in addition to getFields, setFields, getOwnField, and getId methods.
* Linked-list interface now consists of setParent and getParent.
* Factory interface now consists of create, createCopy, and createChild.
* Removed the unused unused enable, disable, and addFilterPredicate, and the redundant toString (method only used internally) and extend method (superseded by createChild).
* Internally, renamed the _state property to _data and grouped methods by concern.
2018-07-03 16:53:48 -07:00
James Gowdy 93d9baafff
[ML] Rewrite of jobs list using react and eui (#19758)
* [ML] [WIP] New jobs list

* adding JSON tab

* adding datafeed and forecast tabs

* adding action menu functionality

* removing comments

* forcing change in file that is missing

* removing unnecessary change

* rolling back accidental change

* adding job group badges to main list

* adding multi-job action buttons

* adding start/stop actions

* showing start/end modal for multi-jobs

* adding multi-job delete

* changing delete warning

* initial edit job functionality

* adding space for custom url editing

* adding jobs summary endpoints

* fixing job loading for edit flyout

* adding calendars to jobs

* adding group loading endpoint for edit flyout

* adding audit message icons

* icon style change

* adding job messages in expanded job row

* removing log statements

* adding proptypes

* fixing expanded row table cell color

* removing log message

* renaming jobs endpoint provider

* changing case of button label

* renaming closeModal function

* adding missing proptypes

* changes based on review

* adding basic table sorting

* refactoring modal and flyout show/hide functions

* fixing sorting issues

* fixing overflow in groups
2018-07-03 10:36:45 +01:00
Justin Kambic f763c3eb67
[Pipeline Viewer] Refactor collapsible statement component to wrap props.children (#20252)
* Rename config view to PipelineViewer.

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

* Modify function to take params instead of single object.
2018-07-02 13:59:42 -04:00
Tim Sullivan f7070890d4
fix monitoring elasticsearch nodes listing sort and filtering (#20321)
closes https://github.com/elastic/kibana/issues/20132
2018-07-02 10:11:44 -07:00
Felix Stürmer 75309fffd6
Upgrade styled-components to 3.3.3 (#20257)
* Upgrade styled-components to 3.3.3

* Update test style snapshots

The upgrade seems to have affected the order in which the css classes
are serialized in the snapshot. The css rules within these classes look
identical.

* Update Kibana's yarn.lock

* Update kbn-i18n lockfile in anticipation of #20301
2018-07-01 22:58:12 +02:00
Justin Kambic f4d9e08b45
[PipelineViewer] Replace bare img tags with euiicon (#20330)
* Remove direct references to EUI SVG. Remove bare img tag from DetailDrawer.

* Update DetailDrawer test snapshots.
2018-07-01 15:37:19 -04:00
Bill McConaghy 2cce4ff29f
fixing issues with bad error message for low permission users (#20275)
* fixing issues with bad error message for low permission users

* fixing stats, settings, and mappings error message and removing unused file
2018-06-29 13:49:49 -04:00
Bill McConaghy d29e612ec0
improving warnings for delete and force merge (#20264)
* improving warnings for delete and force merge

* PR feedback
2018-06-29 12:08:34 -04:00
Bill McConaghy 3af5ef813b
fix sorting for index management (#20266)
* fix sorting for index management

* PR feedback
2018-06-29 12:07:25 -04:00
Bill McConaghy c5be83bbd6
clearing error message when upload component mounts (#20268)
* clearing error message when upload component mounts

* fixing tests
2018-06-29 12:06:00 -04:00
Stacey Gammon 435eccb3dc
remove unused fn and variable (#20111) 2018-06-28 17:48:31 -04:00
Stacey Gammon db1aad03bb
Remove _behaviors abstraction in Chromium reporting (#20106)
* remove over abstraction.

* delete unused file
2018-06-28 14:03:19 -04:00
CJ Cenizal 3ea4c3e0bc
Simplify Courier interface and organize internals (#20060)
**Interface changes**

There are two goals behind the interface changes:

* Make it clearer which courier modules are meant for public consumption by exporting them from the top level.
* Simplify the courier object by removing responsibilities and focusing its responsibility solely on scheduling search requests via the fetch method and timefilter.refreshInterval Angular event.

I did this by taking the following steps:

* Removing redirectWhenMissing, indexPatterns, SearchSource, and SavedObject from the courier object. I also removed some unused methods from its interface.
* redirectWhenMissing is now a service registered on the kibana/url Angular module.
* indexPatterns is now a service registered on the kibana/index_patterns Angular module.
* SearchSourceProvider and SavedObjectProvider are now top-level exports of ui/courier.
* migrateFilter, decorateQuery, buildQueryFromFilters, and luceneStringToDsl are now top-level exports of ui/courier.

**Internal changes**

I also made some internal changes in an effort to organize the code clearly and reduce unnecessary complexity.

* I refactored the async code in CallClient to appear sync with async/await and encapsulated chunks of logic in helper functions. I also used an isAborted flag instead of overwriting the esPromise var with an enum.
* I combined Looper and SearchLooper into a single class and deleted unused functions.
* I reorganized the courier/fetch/request code into SearchRequest, SegmentedSearchRequest, and serializeFetchParams modules.
* Renamed various other methods and variables to improve clarity.
2018-06-27 16:58:19 -07:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Bill McConaghy 61aa89cb64
adding missing data-test-subj and renaming one (#20238) 2018-06-26 20:05:32 -04:00
Justin Kambic 068c02f1c9
[Pipeline Viewer] [Monitoring] Rename config view to PipelineViewer (#20230)
* Rename config view to PipelineViewer.

* Remove unused className.

* Remove unneeded variable.

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

* replace timefilter service with singleton

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

* remove Private from brush event

* globalState

* fix timefilter jest test

* clean up rebase artifacts

* lint errors

* another lint error

* fix broken functional test _shared_links

* fix broken mocha test doc.js

* fix service load order breaking status page

* remove Provider from change_time_filter

* another round of mocha test updates

* convert create_brush_handler test to jest

* fix kbnGlobalTimepicker toogle mocha test

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

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

* use  so listerners get cleaned up when scope is destroyed

* listen to correct timefilter update event

* update APM to use timefilter singleton

* update angular scope when timefilter changes

* fix APM jest test

* add listenAndDigestAsync to listen.js

* fix apm breadcrumbs jest test

* move diffTime and diffInterval into timefilter

* pass mode to updateFilter to resolve functional test failure

* call registerTimefilterWithGlobalState from APM application

* remove rootScope from kbn_global_timepicker

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

* spalger review changes

* ensure monitoring timefilter callbacks are executed inside evalAsync

* remove unneeded evalAsync calls around setTime
2018-06-26 10:29:41 -06:00
gchaps e05e0bc0bc
[COPYEDIT] Updates to text in force merge modal in index management (#20134) 2018-06-26 08:04:24 -07:00
Justin Kambic 94d99d63f3
[Monitoring] [Pipeline Viewer] Remove obsolete code (#20122)
* Remove PipelineViewer component, replace with Config Viewer as index export.

* Remove tests for obsolete component.

* Remove obsolete code.

* Remove obsolete CSS.

* Remove old SVG class for graph edges.

* Remove more graph rendering code.

* Remove obsolete properties from graph classes.

* Remove unused constants.

* Remove obsolete keys from subtitle props.

* Fix broken unit tests.
2018-06-26 10:49:11 -04:00
Bill McConaghy d8c7970840
simplifying logic for showing extend trial and adjusting tests (#20211)
* simplifying logic for showing extend trial and adjusting tests

* PR feedback
2018-06-25 14:38:44 -04:00
Bill McConaghy 39ac92a1d1
[console] adding generated spec files for xpack endpoints and adjusting code to… (#19928)
* adding generated spec files for xpack endpoints and adjusting code to handle the same override logic

* accounting for non URL documentation values

* fixing issue with incorrect override file

* adding support for unknown parameters in path (assuming they are ids)

* fixing autocomplete for get_categories ml API

* fixing issue with autocomplete for get_overall_buckets

* fixing issue with get_overall_buckets autocomplete

* fixing get_overall_buckets autocomplete issue for reals

* fixing __flag__ in body autocomplete specs

* fixing issue with ml put_datafeed autocomplete

* removing unnecessary overrides for rollup put_job

* fix issue with UrlPatternMatcher

* fixing tests

* fixing typos

* overriding rollup get due to bug in ES specs
2018-06-25 08:44:35 -04:00
Shaunak Kashyap da2da74a08
EUIFication: Grok Debugger (#20027)
* Move <kbn-dev-tools-app> Angular wrapper directive usage into route template

* Move sole directive into new directives folder

* WIP checkin: basic conversion to React components

* Fix sample custom patterns indentation

* Remove custom CSS

* Wrap button in EuiFormRow + define isSimulateDisabled

* Wire up simulate

* Cleanup

* Ace formatting options

* Better styling

* Adding spacing between custom patterns and simulate button

* Fixing form row widths

* Removing form row around button

* Add indentation/newlines in structured output

* Error handling

* Use constants

* Removing no-longer-used code

* Implement syntax highlighting via custom mode

* Making functional tests pass

* Adding trailing comma back

* Removing fixed heights

* Removing unnecessary styles

* Make Event Output form row full width as well

* Wrapping EuiCodeEditors in EuiPanels

* Adding spacer before callout; making spacing around callout consistent

* Clear out custom patterns from request if field is cleared out

* Clear out simulation results before attempting simulation

* Set state with untrimmed value
2018-06-22 11:51:27 -07:00
Stacey Gammon 2c1fcf9604
Typescript-ify screenshot stitcher code in reporting (#20061)
* typescript screenshot stitcher

* Throw an error if the data captured is not of the expected width and height.

* Import babel-core types

* Add babel-core types to x-pack package.json

* Dimensions => Rectangle
2018-06-22 09:18:29 -04:00
Pete Harverson 36d29e4fcc
[ML] Fix link to Single Metric Viewer zoom for sparse data (#20144) 2018-06-22 12:16:17 +01:00
Tim Sullivan d0595fdc4b
Separate bulk upload behavior from CollectorSet (#19691)
* Separate bulk upload behavior from CollectorSet

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

* remove cleanup and fetchAfterInit methods

* test for bulk_uploader class

* improve test for collector_set

* fix reporting

* expose collectorSet if there actually is a collectorSet

* comment for enclosed function

* make collectorSet creation/expose unconditional, bulkUploader more conditional

* fix collector_set tests

* lifecycle events

* stab at collectorSet error logging from the API call

* clean up comments

* clean up comments

* fix BulkUploader mocha test

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

* no singleton timer object

* just log a warning if bulk uploader start called twice

* normal quotes

* check if bulk is enabled inside of the _fetchAndUpload method

* log for stopping bulk stats

* call bulkUploader.start with the collectorSet object

* call bulkUploader.start with the collectorSet object

* roll back change for module scoped variable

* oops I broke init

* init and logging: if / elseif / elseif

* remove unnecessary check/log

* help log

* remove redundant, use data.filter.map

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

* help logging

* fix unit test

* remove handler that stops upload when connection is lost
2018-06-21 13:08:32 -07:00
Justin Kambic 55a43b2805
Fix capitalization typo for className attribute. (#20104) 2018-06-21 10:04:38 -04:00
Pete Harverson a87c376826
[ML] Fix alignment of text in job wizard remove split button (#20118) 2018-06-21 14:09:09 +01:00
Pete Harverson c267b4d9e1
[ML] Add missing aria-label attribute to various components (#20117) 2018-06-21 12:21:03 +01:00
Spencer 103d71556c
[xpack_main/status] update the plugin status anytime the license changes (#20018)
Fixes #20017 

Currently the xpack_main plugin only sets its status when the elasticsearch plugin changes status, which is a fine signal that the plugin should recheck for the license info, but not the only time it can be updated. At some point recently a race condition became more likely to be triggered, which is detailed in https://github.com/elastic/kibana/issues/20017#issuecomment-398209354 and causes the xpack_main plugin to set its status to red and never return it to green, even after the license info is successfully fetched from Elasticsearch.

To fix this the `XpackInfo` class now exposes the `onLicenseInfoChange(handler)` method which will call the handler whenever the xpack info changes. This way the xpack_main plugin can reflect the current state of the license info in its status and doesn't have to wait for the elasticsearch plugin to change status again.

To test this I recommend running kibana with `--elasticsearch.healthCheck.delay=500` or even `250`, and then starting Elasticsearch after Kibana has started. Without this change Kibana is very likely to attempt a healthcheck between the time that Elasticsearch is "started" and the x-pack license info is completely loaded, triggering the race condition. With this change you should see the xpack info plugin (and all other xpack plugins) go red with a more informative message, and then after the first request or 30 second polling timer, the plugins should go green again.

![screen shot 2018-06-18 at 3 25 47 pm](https://user-images.githubusercontent.com/1329312/41565769-ff032dc0-730c-11e8-978e-3e28ced18448.png)
2018-06-20 11:47:26 -07:00
Chris Earle 75125b49e8
Remove Duplicated Close button from Flyout (#20055)
This removes the now-duplicated Close button from the `EuiFlyout` now that
EUI automatically adds a close button.
2018-06-20 14:42:35 -04:00
Bill McConaghy aa4cf42b04
adding data-test-subj to buttons and updating snapshots (#20080)
* adding data-test-subj to buttons and updating snapshots

* PR feedback

* updating snapshots
2018-06-20 14:33:48 -04:00
Tim Roes 2885e871e3
Replace spy panels by Inspector (#16387)
* Add Inspector feature

* So long, and thanks for all the fish, spy panel

* Fix several functional tests

* Fix unit tests

* Fix spy panel button tests

* Replace old spy panel documentation

* Disable test temporarily until we have dashboard triggers

* Enter edit mode for dark theme test

* Fix some more functional tests

* Fix more functional tests

* More test fixing

* Fix more functional tests

* Allow opening the inspector via loader handler

* Refactor InspectorViewChooser, remove unused CSS

* Remove dead code

* Fix data download button style

* Remove redundant code

* Load inspectorViews for dashboard_viewer

* Extract inspector views to custom core_plugin

* Switch API to TypeScript 🎉

* Design changes

* Remove icons from views

* Design changes

* Improve typings of API

* Add typing to all adapters

* Show loading spinner in request selector

* Rewrite InspectorView to TypeScript

* Fix help text for data view

* Remove deprecated React lifecycle methods

* Embed inspector into dashboard panel actions

* Remove temporary inspector trigger

* Remove old CSS

* Fix dashboard trigger for new panel action

* Add tests for InspectorPanel and DataAdapter

* Produce a hierarchical table if the vis is hierarchical

* Remove allowJs option again

* Add missing Apache license headers

* Close inspector on dashboard when navigating away

* Use proper title for dashboard panels

* Fix functional tests

* Skip broken test for now

* Flush view chooser button

* Add request adapter tests

* Skip more tests, broken due to typescript

* Add Request Time description

* Add description for courier request

* Fix tests

* Replace icon by new (not yet released) icon

* Finalize design of inspector

* Remove discover test, that relied on spy panels

* Change API to be properly mockable in tests

* Add aria-live region for request status

* Replace old method in functional tests

* Replace abitrary magic number

* Use object destructuring in vis

* Fix issue with crashing requests view

* Add request time tooltip

* Get request body of correct search source

* Make filter buttons properly keyboard accessible

* Follow Dave's design suggestions

* Remove redundant request from name

* Remove unneeded comments

* WIP raw-formatted values

* Fix filtering issue

* Fix tests and more license headers

* Add data view tests

* Remove search from table

* Fix typos

* Implement review suggestion

* Remove artificial delays for testing

* Fix new panel action structure

* Minor design adjustments

* Fix failing functional test

* Update failing snapshot test

* Implement final wording

* Apply new EUI styling

* Fix closing inspector in tests

* Fix sorting of table

* Align punctuation between tooltips
2018-06-20 11:07:44 +02:00
CJ Cenizal 89e7266853
Remove close buttons from Saved Object relationship and Index Management flyouts. (#20043) 2018-06-19 21:07:18 -07:00
Shaunak Kashyap 64d28b955b
Remove explicit close button (#20044) 2018-06-19 23:43:24 +05:30
Tim Roes 58257c2734
Update EUI to 0.0.53 (#20005)
* Update to EUI 0.0.53

* Remove input vis specific styling

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

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
2018-06-19 17:43:26 +02:00
Pete Harverson eb45fd1bc5
[ML] Fix overflowing content in anomalies table cells (#20029) 2018-06-19 15:30:29 +01:00
Justin Kambic 6f7dfcfff2
[Monitoring] [Logstash] Add Config View (#18597)
* Patch ConfigView changes from x-pack-kibana to OSS Kibana.

* Remove old css.

* Update style for queue statement.

* WIP modifying based on designer feedback.

* Add flatten function and list class.

* Rename functions to be more descriptive.

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

* Finish moving flatten logic into classes, add tests.

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

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Begin adapting components for list.

* Add collapse functionality.

* Add expand functionality.

* Nested collapsed elements remain collapsed on parent expansion.

* Style section headers.

* Update Plugin statement styles.

* Add DetailDrawer support.

* Update statement formatting.

* Add stats to plugin element rows.

* Resolve conflicts.

* Remove obsolete code.

* Reorganize code.

* Remove warnings.

* Add PropTypes. Add keys to arrays and iterables.

* Update color for borders/buttons.

* Add stat class. Clean up code.

* Convert plugin statement component from class to function.

* Update queue metrics message.

* Update style to make view more responsive.

* Change section heading size.

* Remove gutter from metrics group.

* Change name "stat" to "metric".

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

* Add new functional component in place of model class.

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

* Convert stateless classes to functional components.

* Prefer ES6 syntax over bindings for Component methods.

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

* design cleanup for pipeline viewer

* Update CSS to add min-height to page.

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

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

* Update jest snapshots for DetailDrawer.
2018-06-18 23:42:12 -04:00
Spencer 6a429d7fa3
[npm] upgrade to RxJS 6 (#18885)
This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.

```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```
2018-06-18 10:16:38 -07:00
Søren Louv-Jansen bb047a4aaa
[APM] Fix JSON in Watcher assistant (#19987) 2018-06-18 16:17:48 +02:00
Tim Sullivan 5691dcff69
[Monitoring] Improve User Experience of Enabling Monitoring Collection (#19451)
* [Monitoring/No Data] Show a "still waiting" link after 19s

* minor bug fix: spinner if _interval_ updating

* update "we tried"

* some wording changes on activating / trying to activate monitoring

* cancel the setTimeout when component gets unmounted

* more wording tweaks

* update snapshot
2018-06-15 14:28:29 -07:00
James Gowdy 5d7afd996c
[ML] Removing rules from APM module (#19932) 2018-06-15 11:50:08 +01:00
Walter Rafelsberger 06bd2d463e
[ML] Migrates data visualizer card header to EUI/React (#19890)
To get rid of angular's tooltip="..." code in the header of data cards of the data visualizer, this introduces a ml-field-title-bar directive/component.
- The directive replaces the raw template code in field_data_card.html.
- The directive itself wraps a React component which uses EUI's tooltip instead of angular's tooltip attribute.
- The previous angular template logic (about which classes and fieldnames to display) is also move to the React component
2018-06-14 13:16:49 +02:00
Pete Harverson 9d1ec94fac
[ML] Convert anomalies controls to EUI / React (#19856)
* [ML] Convert anomalies controls to EUI / React

* [ML] Edits to anomaly controls following review
2018-06-14 11:25:20 +01:00
CJ Cenizal 2ada1b348a
Replace Watcher's watch-type-select directive with two buttons. (#19782) 2018-06-13 17:08:13 -07:00
CJ Cenizal 0a2ce7d370
Add described-by attribute to duration-selection directive to make children inputs screen reader accessible. (#19779) 2018-06-13 17:05:42 -07:00
CJ Cenizal 9493ac4093
Add aria-label to Indices Management search input. (#19778) 2018-06-13 17:04:50 -07:00
CJ Cenizal 8657a9e61b
Add aria-labelledby to index details flyout to tell screen reader what to announce when the flyout is opened. (#19776) 2018-06-13 17:01:35 -07:00
Walter Rafelsberger 7b4e823d2e
[ML] Fixes agg-type dropdowns size and styling. (#19816)
- Fixes an issue with cut off text within aggregation type dropdowns in the multi-metric and population wizard.
- Fixes the style of the dropdown to be consistent across browsers.
- Fixes 1px vertical offset between dropdown and trash-icon.
2018-06-13 17:31:55 +02:00
CJ Cenizal 647d3366eb
Upgrade EUI to 0.0.52 (#19772)
* Revert "Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)"
This reverts commit c853072ca5, reintroducing EUI 0.0.52.
* Rename visualize page object selectors for manipulating combo box.
2018-06-12 10:47:20 -07:00
Walter Rafelsberger d186aafb46
[ML] Disable cell range selection. (#19795) 2018-06-12 15:07:09 +02:00
Walter Rafelsberger 0d0256796f
[ML] Deprecates jQuery in favour of d3's axis component for the swimlanes axes. Adds support to remove overlapping labels. (#19800)
- Deprecates the use of jQuery to render the swimlanes axis labels and uses d3's axis component instead. We already used d3 features like d3.scale and others to calculate the label positions but the DOM rendering was still done using jQuery.
- Additionally, adds some logic to remove/fix overlapping labels.
2018-06-12 15:05:35 +02:00
Walter Rafelsberger 0b7367137b
[ML] Migrates advanced job wizard page wrapper to EUI. (#19815) 2018-06-12 15:02:23 +02:00
Walter Rafelsberger d2e0aed450
[ML] Fix cosmetic issues with cut off chart overflows. (#19794)
1. Increases the top margin to 5 and the right margin to 1 to avoid cutting off the chart because overflow is hidden for the directives mlEventRateChart and mlMultiMetricJobChart. The top margin gives enough room to avoid cutting off y-axis labels. The right margin is a tweak to not cut off the gray border by 1 pixel to the right.
2. Fixes how the domain for mlEventRateChart is calculated. The domain gets now extended by 1 barsInterval, otherwise the last bar will start at the end of vizWidth and overflow the chart (the overflow is hidden so the visible chart missed one bar).
2018-06-11 17:04:50 +02:00
Pete Harverson af5215fb9f
[ML] Fix Single Metric Viewer for multi week bucket spans (#19759)
* [ML] Fix Single Metric Viewer for multi week bucket spans

* [ML] Edit to comment in ML time buckets calcEsInterval
2018-06-11 09:42:59 +01:00
CJ Cenizal c853072ca5
Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)
This reverts commit a6894c6f62.
2018-06-08 14:04:26 -07:00
Bill McConaghy a6894c6f62
upping eui to 0.0.52 and updating snapshots (#19761)
* upping eui to 0.0.52 and updating snapshots

* fixing yarn.lock
2018-06-08 15:40:03 -04:00
Bill McConaghy 990e454b92
[console] Adding documentation to console (#19715)
* adding documentation links when the endpoint is known

* making doc link reflect version user is using

* adding documentation links for xpack APIs

* fixing missing argument issue

* removing console log

* fixing issue with lingering documentation after text is deleted

* fixing issue with documentation and multiple commands in the editor

* adding $scope.$apply so documentation changes show up in UI

* removing dead code

* adding missing boost param for match_all

* fixing issue with parameterized endpoint completion

* adding keyboard shortcut for opening documentation for current request

* fixing issue with keyboard docs shortcut when you just move the cursor around
2018-06-08 12:47:22 -04:00
Pete Harverson 2462884636
[ML] Use EUI table getRowProps for anomalies table row mouseover (#19755) 2018-06-08 13:24:22 +01:00
Tim Sullivan cbd319f92c
[Monitoring] Fix Node Advanced page (#19740)
* [Monitoring] Fix Node Advanced page

* fix metrics snapshot
2018-06-07 17:05:43 -07:00
Bill McConaghy 831b9f83fd
Console cleanup (#19654)
* refactoring to class style and moving components to own files

* making top level components fetch sensitive to HTTP verb

* fixing issue with _ endpoints getting mistaken as index names for autocomplete possibilities:wq:

* removing stray console log

* removing console log

* PR feedback

* accounting for _all in isNotAnIndexName
2018-06-06 12:00:05 -04:00
James Gowdy aba92631a3
[ML] Removing unnecessary sr-only span (#19697) 2018-06-06 13:02:10 +01:00
Stacey Gammon c639deba73
Move all reporting tests into their own folder and add chromium tests (#19330)
* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
2018-06-05 18:41:23 -04:00
Stacey Gammon 2a715b0034
updateUrl is on scope, not this. (#19687) 2018-06-05 18:40:40 -04:00
Tim Sullivan 1617da93dd
[X-Pack Usage API] use authentication from request headers (#19613)
* [X-Pack Usage API] use authentication from request headers

* add test for usage api no-auth

* whitespace / syntax nits

* reduce loc changed

* remove a weird looking comment
2018-06-05 10:38:02 -07:00
Justin Kambic 194e427bc8
Remove dirty prompt from Logstash Pipeline Management (#19649)
* Remove dirty prompt from Logstash Pipeline management because of Angular routing issue.

* Remove test for removed feature.
2018-06-05 12:30:11 -04:00
Søren Louv-Jansen a4285916dd
[APM] Fix debug param issue (#19676)
* [APM] Fix debug param issue

* [APM] Fix _debug issue and add test
2018-06-05 17:56:01 +02:00
Brandon Kobel c533ac91fe
SavedObjects service and client provider (#19349)
* Renaming client to service

* Implementing the SavedObjects service and client provider

* Making saved objects service lazy instantiated so the test server works

* Fixing import

* Fixing another import

* Fixing reporting's usage of the savedObjectsClientFactory

* No longer passing the callCluster function to the kbnTestServer

* Passing empty request...

* Fixing reporting

* Exposing server.savedObjects without a getter

This required me to remove the kbnTestServer.createServer() method and
change all usages to createServerWithCorePlugins since we're reading the
kibana.index, which is part of the core plugins, when configuring the
saved objects service which is attached to the server.

* Don't need to set kibana.index

* Changing more usages of kbnTestServer.createServer

* Revert "Changing more usages of kbnTestServer.createServer"

This reverts commit 464f73abb2.

* Partially reverting 17d36b3e9a

* Fixing headers

* Improving tests

* Addressing some peer review feedback

* Addressing more peer review feedback

* Adding server.log warning when the saved objects can't initialize

* Getting rid of the savedObjectsClientFactory

* Branches are for trees

* Fixing comment to be proper english

* Fixing fat-fingering method call

* Fixing other usages of getScopedSavedObjectsClient
2018-06-04 17:02:25 -04:00
Søren Louv-Jansen a8fc3fc94a
[APM] Fix missing _debug validator (#19639) 2018-06-03 22:43:29 +02:00
Chris Roberson 9ce082b1f4
Disable the dirty prompt until #19594 is resolved (#19595) 2018-06-01 08:58:43 -04:00
Tim Sullivan a801752e79
[Reporting/Usage] Check monitoring enabled before registering collector (#19581) 2018-05-31 15:18:02 -07:00
Søren Louv-Jansen a1f345e446
[APM] Add debug option (#19587) 2018-05-31 16:55:41 +02:00
Stacey Gammon 8d1629a7a6
It's confusing to see the timestamp of started_at if the status says "completed" (#19551)
fixes https://github.com/elastic/kibana/issues/17912
2018-05-30 19:37:32 -04:00
Court Ewing ac9ed89d6f
license: do not parse expiry date if it does not exist (#19565)
Basic licenses never expire, so they do not have an expiration date at
all according to the Elasticsearch API. When this happens, we should not
attempt to parse the date nor show the expiry date in the log.
2018-05-30 15:25:55 -04:00
Bill McConaghy 7dd14fa480
fixing basic license revert on Firefox (#19566) 2018-05-30 14:37:09 -04:00
Tim Sullivan 1b6c5b1c6c
[Monitoring] use defaulValue instead of filter to make pre-filled text input editable (#19462) 2018-05-29 16:30:43 -07:00
Tim Sullivan 6760a64c3d
[Monitoring/React] Logstash cluster status bars in react (#19433)
* [Monitoring/React] Logstash cluster status bars in react

* not have a prop named children

* simplify conditional metric

* fix functional tests
2018-05-29 14:36:32 -07:00
Justin Kambic aec1904685
Provide events in & out per millisecond for Logstash pipelines (#19446)
* Port changes to dedicated branch to isolate PR.

* Rename variable in test to match function name.
2018-05-25 15:26:02 -04:00
Søren Louv-Jansen b0f71308fb
[APM] Add kuery to APM (#18881) 2018-05-25 17:39:22 +02:00
Pete Harverson ae5a34f4f9
[ML] Clear Anomaly Explorer if swimlane selection is empty (#19403)
* [ML] Clear Anomaly Explorer if swimlane selection is empty

* [ML] Remove unnecessary variable
2018-05-25 11:03:04 +01:00
Tim Sullivan 6eea4eae0f
[Monitoring] use react components for Kibana directives (#19379)
* kibana cluster status directive use react component

* fix some functional test failures
2018-05-24 18:05:51 -07:00
Tim Sullivan ce61ae41a3
[Monitoring/Reporting Stats] Move hardcoded Reporting stats type collection out of monitoring plugin (#18894)
* [Monitoring/Telemetry collection] use `typeCollector.registerType` in Reporting

* a few cleanup changes
2018-05-24 11:14:27 -07:00
Pete Harverson 1365799a06
[ML] Convert anomalies table to EUI / React (#19352)
* [ML] Convert anomalies table to EUI / React

* [ML] Edits to EUI / React anomalies table after review
2018-05-24 15:49:00 +01:00
Casper Hübertz 1683909c3c
[APM] Errors Watcher assistant - Compressed form fields (#19204)
Adding `compressed` to the EuiFormRows for a more compressed looking form.
2018-05-24 10:58:24 +02:00
Søren Louv-Jansen 66739ffdd9
[APM] Upgrade to react-redux-request (#19338) 2018-05-24 02:45:49 +02:00
Tim Sullivan d649f02c07
Monitoring/directives use react view elasticsearch (#19362)
* [Monitoring/React] Make Elasticsearch directives use React component internally

* fix more functional tests

* remove TODO

* lessen loc change
2018-05-23 16:57:37 -07:00
Tim Sullivan 77cfc94441
[Monitoring] Summary Status component data-test-subject wrap entire label/value container (#19289)
* [Monitoring] Summary Status component data-test-subject wrap entire label/value container

* update functional tests
2018-05-23 10:22:54 -07:00
Bill McConaghy 165fc67bd0
fixing issue in edit index settings caused by ace upgrade (#19311)
* fixing issue in edit index settings caused by ace upgrade

* fixing json mode
2018-05-22 19:32:05 -04:00
Chris Earle f2ccf90880
Add Notification Service (#19236)
This adds a notification service to Kibana that can be used to send
asynchronous notifications, such as sending email and Slack messages,
which are intended to be configured via a combination of the
`kibana.yml` and Kibana keystore.

Once configured, the actions are automatically added to the notification
service and can be invoked via the server using the `notificationService`
singleton or HTTP to send it directly. See the included README for more
details.
2018-05-22 19:02:04 -04:00
dave.snider@gmail.com 51592c652a
Fix banner issue in ie11 (#19273)
* fix banner issue in ie11
2018-05-22 13:30:47 -07:00
Justin Kambic b1527d85dc
[PipelineViewer] [Monitoring] Flatten Pipeline Statement Trees (#19084)
* Add flatten function and list class.

* Rename functions to be more descriptive.

* WIP moving flatten logic to classes.

* Finish moving flatten logic into classes, add tests.

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

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Fixed broken test.

* Update classes based on PR feedback.

* Update module exports, remove obsolete file.
2018-05-22 15:48:39 -04:00
Joe Fleming c6bf945f2f
Feat: expose reporting complete notifications (#19283)
This PR is a pretty small change to the Reporting job complete notification service. It converts the actual code to a simple object, instead of a class that needs to be instantiated. This makes the notification service a singleton, and also exports it so it can be used in non-Angular applications.

- Converts `reportingJobCompletionNotifications` factory to a singleton
- Exports the underlying jobCompletionNotifications
  - Allow use in non-angular plugins

Example use:

```js
import { jobCompletionNotifications } from 'plugins/reporting/services/job_completion_notifications';

createReportingJob() // pseudo code function that returns a reporting job id
.then(jobId => jobCompletionNotifications.add(jobId));
```
2018-05-22 12:47:49 -07:00
Aleh Zasypkin 0ab9703287
Upgrade sinon (v1.17.3 --> v5.0.7). (#19074) 2018-05-22 12:13:38 +02:00
James Gowdy 0263d886e4
[ML] Start datafeed from the module setup endpoint (#19254)
* [ML] Start datafeeds from the module setup endpoint

* changes based on review

* correcting use of filter
2018-05-22 10:37:21 +01:00
Tim Sullivan 744fc0b316
[XpackMain] Add _xpack/usage API (#19232)
* [XpackMain] Add _xpack/usage API

* add xpack usage http api integration test

* comment

* misc test describe fixes

* fix integration test

* fix reply called twice

* enable api test

* enable kibana collection for integration test to work

* throw error comment
2018-05-21 16:55:26 -07:00
Tim Sullivan a7c3255665
Add some collector classes for objects that get registered in a CollectorSet (#19098)
* Add some collector classes for objects that get registered in a CollectorSet

* comment cleanup

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

* add a helper logger function so collector has access to logger at construction
2018-05-18 13:02:54 -07:00
Chris Roberson 5edf2c0beb
Ensure we account for cluster level settings when looking for configured actions (#19121) 2018-05-18 15:19:05 -04:00
Chris Roberson a9bfcaab6a
Ensure disabling watcher does not break index management (#19137) 2018-05-18 11:49:50 -04:00
Justin Kambic 8425016e66
[Logstash] [PipelineViewer] Preserve all nested pipeline statements during graph conversion (#19101)
* Ensure all true/false statements are nested in IfStatements.

* Simplify nested vertex diffing.

* Rename get vertices function and test it.

* Update tests, add more tests.

* Update prompted by review feedback.

* Update tests - add required props to provided objects.

* Remove unneeded function/tests.

* PR Cleanup.
2018-05-18 09:32:52 -04:00
Pete Harverson 72f0f5918b
[ML] Don't show time series charts if metric field is script field (#19206) 2018-05-18 13:11:22 +01:00
James Gowdy 8b3052010f
[ML] Adding jsconfig file for better code navigation in vscode (#19203)
* [ML] Adding jsconfig file for better code navigation in vscode

* removing allowSyntheticDefaultImports as it is defaulted to true

* cleaning up paths
2018-05-18 12:52:18 +01:00
Walter Rafelsberger e648269b95
[ML] Improve the field type icon's component structure. (#19200)
This fixes the component structure of the file type icon: The container component no longer needs to be wrapped inside a span element for the tooltip to work by using the recommendation to pass on the props to the first inner element (see elastic/eui#839). Also adapted a jest test which tests the hovering behavior and fails when the props are not passed on.
2018-05-18 10:59:27 +02:00
Walter Rafelsberger 72083c9b0c
[ML] Fixes jest tests for bucket span estimator button. (#19164)
Fixes jest tests for the bucket span estimator button. The tests were not correctly considering the way jest runs tests asynchronously. Now each test is self-contained within the test callback.
2018-05-17 14:04:18 +02:00
Walter Rafelsberger 69b857ca54
[ML] Migrate field-type-icon to EUI/React. (#19159)
Migrates the field-type-icon directive to use EUI/React. Instead of the angular/bootstrap tooltip attribute on the directive's tag, there's now an option tooltip-enabled which when true wraps the component inside EuiToolTip.
2018-05-17 13:21:39 +02:00
Walter Rafelsberger a9d47320d5
[ML] Migrate bucket span estimator button to React/EUI. (#19045)
This migrates the bucket span estimator button to use React/EUI. The existing mlBucketSpanEstimator is refactored to use React without ngReact to have more detailed control in regards to the $scope being transformed to a trimmed down props object with only the information necessary for the React component. This also allows more control in regards to the $scope attributes being watched. Instead of custom styles and classes this now uses the options available for EuiButton. However, there were some minimal overrides necessary to the EUI styles to replicate the narrower height and padding to fit within the input element.
2018-05-17 09:26:01 +02:00
Walter Rafelsberger 13b97ac294
[ML] Migrate ml-info-icon to React/EUI (#19003)
This replaces the angular based tooltip used in the ml-info-icon directive with one based on React/EuiTooltip. It supports transclusion and rendering of angular template snippets inside the tooltip. Because the DOM structure of the EuiTooltips and the angular/bootstrap tooltips is quite different there is a bit more code involved to achieve this, but the result is that for this we don't have to change the markup in the original angular templates where ml-info-icon is used.
2018-05-17 09:21:39 +02:00
Chris Davies 2f9185df63
Fix #18838 incorrect 403 message when generating reports (#19054)
Fix #18838 incorrect 403 message when generating reports
2018-05-16 15:22:12 -04:00
Justin Kambic 748d152354
Add vertex reference to pipeline statement classes. (#19134) 2018-05-16 14:31:18 -04:00
Walter Rafelsberger b620978ca1
[ML] Migrate mlDocumentationHelpLink to React. (#19124) 2018-05-16 17:55:35 +02:00
James Gowdy 329894ff4c
[ML] Initial creation of APM module (#18805)
* [ML] Initial creation of APM module

* updating query

* adding processor.name check to query

* removing processor.name exists check

* updating manifest with suggested changes

* renaming-job-id

* updating job description
2018-05-16 16:41:51 +01:00
Nathan Reese 1e3e834e08
upgrade to EUI 0.0.47 (#19099) 2018-05-16 08:50:00 -06:00
Pete Harverson 25324c1d19
[ML] Create server-side results service (#19044)
* [ML] Create server-side results service

* [ML] Edits to server side results service following review
2018-05-16 09:59:07 +01:00
Walter Rafelsberger 95e14bdebc
[ML] Fix issues with watching the scope of single metric viewer data. (#19029)
This fixes a bug with the single metric viewer not updating correctly and not showing anomaly records.
2018-05-16 10:05:01 +02:00
Søren Louv-Jansen 3bf6c43602
[APM] Fix bug that causes watcher emails to fail (#19071) 2018-05-15 23:03:40 +02:00
Tim Sullivan 0940f5755d
[Monitoring] Rename TypeCollector to CollectorSet for semantics (#18987)
* [Monitoring] Rename TypeCollector to CollectorSet for semantics

* boring test changes

* usage collector renames

* rename initKibanaMonitoring => createCollectorSet

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

* comments

* more comments

* more comment

* undo register => registerType function name change
2018-05-15 09:32:14 -07:00
Bill McConaghy 52a7f4c1b6
[console] 6.0 API and ace refactor (#18930)
* capturing refactoring work in progress

* cleanup

* removing 5.0 API

* updating autocomplete aggregations to supported ones

* adding documentation links to generated specs

* progress on ace upgrade

* further progress

* cleaning up

* adding new minified source for worker

* fixing bug with merging API definitions

* addressing PR feedback

* using raw loader to load worker file

* addressing PR feedback

* fixing bad characters in comments

* removing inadvertent change

* fixing scope links

* fixing a couple of scope links

* adding in exists to query dsl

* adding slop param for match_phrase query

* adding autocomplete support for search params

* Revert "using raw loader to load worker file"

This reverts commit 16d33c189c.

* adding rescore API support for autocomplete

* adding index boost API support for autocomplete

* adding collapse to autocomplete

* adding highlight property support to autocomplete

* fixing issue with highlight

* adding support for common terms query

* adding inner hits support for autocomplete

* adding support for newer match options to match and multi_match

* better solution for worker
2018-05-15 09:13:59 -04:00
Pete Harverson 008701d031
[ML] Fix issues with end time of explorer swimlane selection (#18995) 2018-05-15 12:24:31 +01:00
Søren Louv-Jansen f1380e3ac5
[Kuery] Remove Angular dependencies (#17836)
* [kuery] Remove `byName` dependency

* Remove $http from kuery

* Fix test

* Add request headers

* Replace byName with getFieldByName; add isFilterable

* Replace Angular mock with static mock

* Update index pattern for query bar

* manually attach format.convert method to field

* Use KBN_FIELD_TYPES to determine isFilterable

* Bump yarn.lock file

* Add kfetch (Kibana fetch)

* Moved `getFromLegacyIndexPattern` to static index pattern functions

* Fix tests

* Mock out kfetch

* Move value formatting from getRangeScript to buildRangeFilter

* Remove getFieldByName (over abstraction)

* Split kfetch options into two
2018-05-15 00:10:40 +02:00
Chris Roberson 6528ef0d33
The text property is optional (#19034) 2018-05-14 10:29:29 -04:00
Spencer 0f8a00304b
[x-pack] remove use of resolveKibanaPath from plugin helpers (#18979) 2018-05-11 07:46:44 -07:00
Pete Harverson daf01340ba
[ML] Sort Explorer view by swimlane for selected time (#18955)
* [ML] Sort Explorer view by swimlane for selected time

* [ML] Rename swimlane sort array with clearer name
2018-05-11 09:37:26 +01:00
Jen Huang 45002180a7
Fix ace editor warnings (#18893)
* Fix ace editor warnings
2018-05-10 10:43:49 -07:00
gchaps 7ee5147b26
[COPYEDIT] Fixed capitalization for Basic and Premium licenses (#18969)
* [COPYEDIT] Fixed capitalization for Basic and Premium licenses

* [COPYEDIT] More fixes for upper case in license text, including one code change
2018-05-10 09:31:46 -07:00
Tim Sullivan 782d4d9804
[Monitoring/React] Render ES Indices Listing with Base Controller / React (#18595)
* [Monitoring/React] Render ES Indices Listing with Base Controller

Refactors the ES Indices Listing to use Base Controller and a React component instead of an Angular directive

* fix functional tests

* fix another test

* better default for summary status component

* nicer code for whitespace after label

* apiFn => apiUrlFn

* Deleted / Closed
2018-05-09 21:37:24 -07:00
Tim Sullivan 011e8b2c28
[Monitoring] reorganize metrics per stack product (#18590)
* [Monitoring/Metrics] clean up metric classes and getMetricFields static helpers

* more pull out

* more to break out

* [Monitoring] reorganize metrics per stack product

This organizes the metrics classes per product as a starting point for adding more functions to the metrics so external logic in the `get_metrics` and `get_series` modules can be simplified.

New structure:
```
plugins/monitoring/server/lib/metrics
├── __test__
│   ├── __snapshots__
│   │   └── metrics.test.js.snap
│   └── metrics.test.js
├── beats
│   ├── __test__
│   │   └── cpu_utilization_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── classes
│   ├── __test__
│   │   ├── latency_metric_calculation.test.js
│   │   └── quota_metric_calculation.test.js
│   ├── cluster_metric.js
│   ├── index.js
│   ├── metric.js
│   └── quota_metric.js
├── elasticsearch
│   ├── __test__
│   │   └── latency_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── index.js
├── kibana
│   ├── classes.js
│   └── metrics.js
├── logstash
│   ├── classes.js
│   └── metrics.js
└── metrics.js
```

* fix strange test failure

* reduce loc change
2018-05-09 18:23:27 -07:00
Chris Earle da1ed1a105
Make "Yes" button unfilled (#18960)
This changes the button from looking like it has been pre-clicked, which
is not the case.
2018-05-09 14:53:39 -04:00
Pete Harverson 875a0eb3bc
[ML] Filter top influencer list based on swimlane selection (#18946)
* [ML] Filter top influencer list based on swimlane selection

* [ML] Edits to Influencer List after review and remove animation
2018-05-09 16:56:35 +01:00
Walter Rafelsberger 79c4d4ef09
[ML] Enable cell range selection. (#18920)
This re-enables the feature flag to support selecting a range of cells in the anomaly explorer. Follow-ups to this PR will tackle limiting the allowed cells to select to avoid problems with too wide selections.
2018-05-09 14:39:22 +02:00
James Gowdy 0d3df613de
[ML] Fixing transfer of dedicated index setting (#18945) 2018-05-09 13:22:44 +01:00
Tim Sullivan 698dfa455c
[Monitoring/Beats] Telemetry Data from Beats (#18833)
* [Monitoring/Beats] Telemetry Data from Beats

* filter apm-server

* ignore results payload if hitsLength === 0

* process each payload as stats are saved to clusters object
2018-05-08 09:19:15 -07:00
Walter Rafelsberger 74868ebb2f
[ML] Fixes time series viewer data binding for forecast data. (#18903)
Fixes the data binding of focusForecastData to renderFocusChart(). An update to focusForecastData in MlTimeSeriesExplorerController wasn't correctly picked up by the directive mlTimeseriesChart because the relevant data wasn't being watched.
2018-05-08 14:58:17 +02:00
James Gowdy b1ca716b80
[ML] Correctly transfer dedicated index setting to advanced job page (#18899)
* [ML] Correcly transfer dedicated index setting to advanced job page

* removing accidentally added code
2018-05-08 13:50:00 +01:00
Pete Harverson 59fb742f80
[ML] Hide Top Influencers list if job has no influencers (#18819)
* [ML] Hide Top Influencers list if job has no influencers

* [ML] Add check for undefined job when hiding influencers list
2018-05-08 13:27:57 +01:00
Walter Rafelsberger 9894355490
[ML] Move the hide() function outside the show() function's scope. (#18900)
The mlChartTooltipService's hide() method was inside the show() method scope. If hide() was called before show() was called for the first time this would result in an error. This could have happened in angular directive's which called hide() on some cleanup action without a previous call to show(). This fix moves the hide() method outside the show() method's scope and adds a unit test to check for the correct structure of mlChartTooltipService.
2018-05-08 13:53:22 +02:00
Jen Huang 1259007745
Advanced Settings to React/EUI (#17465) 2018-05-07 12:48:27 -07:00
Justin Kambic 637d90dde0
[Logstash Pipeline Management] Fix bottom border of Pipeline Editor (#18834)
* Change pipeline editor markup so bottom border doesn't hide text on last line.

* Add constants for scroll margin size.

* Add comments to editor constants.

* Add PX units to constant names.
2018-05-07 14:08:05 -04:00
Nathan Reese ce3b69fbe9
remove application icon assets in kibana that ship with EUI (#18570)
* remove assets in kibana that ship with EUI

* update home page tests

* replace logstash pipeline svg with EUI icon type
2018-05-07 10:59:39 -06:00
Søren Louv-Jansen 8627dbad14
[APM] Fix docs link and mock ui/metadata (#18857) 2018-05-07 16:22:54 +02:00
Nathan Reese 6d51db6656
upgrade to eui 0.0.46 (#18827)
* upgrade to eui 0.0.46

* update logoElasticsearch

* update x-pack jest snapshots
2018-05-05 09:08:15 -06:00
Søren Louv-Jansen 14876364c7
Replace api calls with ReduxRequest (#18815) 2018-05-04 20:29:00 +02:00
Justin Kambic 3028a6fd80
Fix suboptimal file org/export structure. (#18820) 2018-05-04 14:27:05 -04:00
Justin Kambic 38fd6066f6
[Grok Debugger] Better editor expansion/Fix border hiding bottom line (#18752)
* Update to grok debugger editors: let them grow taller and stop hiding half of bottom line input.

* Update custom pattern size to 10 LOC.

* Remove unnecessary options, add constants for scroll margin.

* Encapsulate editor options in mutate function.

* Move editor helper file and prefer "function" declaration over ES6 const.

* Add test for new helper function.
2018-05-04 12:20:36 -04:00
Shaunak Kashyap 5722c84b2d
Removing line that's causing an error (#18807) 2018-05-04 06:26:51 -07:00
James Gowdy ed7f6983f9
[ML] Data recognizer UI improvements (#18804)
* [ML] Data recognizer UI improvements

* rolling back accidental change
2018-05-04 14:02:43 +01:00
James Gowdy 511a6b0904
[ML] Fixing data recogniser save success issue (#18803) 2018-05-04 11:18:49 +01:00
Pete Harverson 5de7909350
[ML] Convert Explorer Influencers List to EUI/React (#18773)
* [ML] Convert Explorer Influencers List to EUI/React

* [ML] Remove unused abbreviate_whole_number Angular filter

* [ML] Convert React Influencers List to stateless function
2018-05-04 09:22:59 +01:00
Spencer e1a2fcbd96
[uiExports] migrate uiApp "uses" to explicit imports in apps (#17828)
* [uiExports] migrate uiApp "uses" to explicit imports in apps

* [uiApp] update tests for getModules() method

* [optimize/uiExports] improve naming and comments

* [uiExports] sort imports so they load in the same order as before

* [testHarness] load hacks when testing in the browser

* [x-pack/uiExports] use new uiExports modules

* [testHarness] describe why we import uiExports/hacks

* [optimize] remove needless [].concat()

* [optimize/createUiExportsModule] string.includes > string.indexOf

* [uiExports/createUiExportsModule] remove needless capture of module exports
2018-05-03 12:18:50 -07:00
James Gowdy 708810ab30
[ML] Fixing error reporting in message bar (#18781) 2018-05-03 18:33:22 +01:00
Walter Rafelsberger 9d73c656e8
[ML] Fix Anomaly Table update trigger (#18769)
Fixes an issue with the anomaly table not correctly updating in the anomaly explorer and the anomaly markers not showing up in the time series viewer.
- moves the initialization of scope.anomalyRecords = []; to the controllers of anomaly explorer and time series viewer. having it in the anomaly table directive caused a race condition to overwrite already fetched records.
- use $watchCollection instead of $watch to track anomalyRecords and focusChartData changes.
replaces $timeouts with scope.$evalAsync
- fixes how focusChartData gets updated correctly to fix missing anomaly markers in the time series viewer.
2018-05-03 16:02:32 +02:00
James Gowdy d52729b862
[ML] Converting services to be non-angular imports (#18687)
* [ML] Removing angular from services

* removing commented out code

* fix include path for tests

* adding flag to initPromise

* moving job service for jest tests to pass

* moving initPromise to its own file
2018-05-03 13:11:19 +01:00
James Gowdy a4cfc25e46
[ML] Fixing icon 404 responses in firefox (#18766) 2018-05-03 13:07:19 +01:00
Walter Rafelsberger 0ac0e3dd5d
[ML] Refactor to not rely on broadcast which could result in listeners not picking up changes. (#18717)
Fixes an issue where the anomaly table wouldn't load because a broadcast to renderTable was triggered before the anomaly table directive initialized the corresponding listener. This change replaces the use of broadcast and instead uses $watch to listen on scope changes on the specific attributes relevant to the updates. The updating of code in parent scopes was moved inside the $timeouts instead of the broadcast event.
2018-05-03 10:04:47 +02:00
Tim Sullivan 482953c9b8
[Monitoring/Metrics] clean up metric classes and getMetricFields stat… (#18741)
* [Monitoring/Metrics] clean up metric classes and getMetricFields static helpers

* more pull out

* more to break out

* snapshot update
2018-05-02 17:29:25 -07:00
James Gowdy dc21cf29b9
[ML] Increasing calculated model memory limit (#18723)
* [ML] Increasing calculated model memory limit

* updating comment

* updating tests
2018-05-02 18:12:45 +01:00
Bill McConaghy 411b2455d6
fixing issue with cancel button on revert to basic license modal (#18718) 2018-05-02 12:53:08 -04:00
James Gowdy d77cc5676b
[ML] Fixing MS Edge GET request error (#18713) 2018-05-02 14:25:17 +01:00
Pete Harverson 34cc14f445
[ML] Display typical values for lat_long anomalies (#18715) 2018-05-02 13:21:49 +01:00
James Gowdy af1a9b6a13
[ML] Adding ace editor for JSON (#18692)
* [ML] Adding ace editor for JSON

* removing unnecessary require-keys setting
2018-05-02 11:48:48 +01:00
Walter Rafelsberger 7f48d6e5b6
[ML] Adds an mml check to trigger an error when mml value is invalid. (#18678)
This adds an additional check and corresponding error message to the validation of the model memory limit. If the parsing of the memory model limit results in 0 bytes the message will be triggered. This behaviour catches both correctly formatted but invalid strings (like 0mb) and invalid strings (like asdf).
2018-05-02 12:42:13 +02:00
Pete Harverson a565761b94
[ML] Convert Angular filters to formatter functions (#18681)
* [ML] Convert Angular filters to formatter functions

* [ML] Clean up Angular filter wrappers
2018-05-02 09:47:27 +01:00
Walter Rafelsberger 92f05ee9b3
[ML] Omit mml success message when mml checks are not run. (#18659)
Updates the behaviour of the job validation's model memory limit checks: The success messages success_mml gets only returned if the checks were actually run. This omits the success message for example in the single metric and population wizard.
2018-05-02 10:35:12 +02:00
Walter Rafelsberger d6e2464ff0
[ML] Fixes sync issue where a manipulated AppState wouldn't contain the original attribute anymore. (#18653)
Inconcistencies between AppState and derived custom states for UI components like mlSelectLimit and mlSelectInterval could trigger errors because the parent of a nested object attribute could become undefined. This PR adds additional checks to state_factory.js's get/set/reset methods to reinitialize itself with AppState and fall back to its default state should it not be present within AppState anymore. The original issues were hard to reproduce consistently using the UI only. However the error could be triggered when creating a malformed URL, like replacing the mlSelectInterval:(interval:(display:Auto,val:auto)) part of the URL to something like mlSelectInterval:(undefined). This PR includes additional unit tests which simulate this behaviour and fail without the additional checks provided by this PR.
2018-05-02 08:18:31 +02:00
Jonathan Budzenski 1eef04551d
[console_extensions] disable when console is disabled (#18673)
* [console_extensions] disable when console is disabled

* [console extensions] has console and enabled

* [console_extensions] fix console_extensions.enabled
2018-05-01 10:54:43 -05:00
Shaunak Kashyap 5de204212e
[Logstash Centralized Management] Hide recently-deleted pipelines (follow up PR) (#18683)
* Renaming constant to be more descriptive

* Less kludgy language for better readabilility

* Removing extraneous newlines
2018-05-01 07:16:39 -07:00
Shaunak Kashyap bf97342356
[Grok Debugger] Adding syntax highlighting for grok expressions (#18572)
* Adding basic syntax highlighting for grok expressions

* Use EUI color palette

* Handle regex tokens, escaped and unescaped

* Return token for escaped content

* Add functional test

* Using higher-contrast colors

* Removing comment I used for developing the highlight rules

* Using object destructuring

* Removing unnecessary method
2018-04-30 12:31:23 -07:00
Shaunak Kashyap 5cf042bfde
[Logstash Centralized Management] Hide recently-deleted pipelines (#18644)
* Extracting constant for reuse

* Keep track of recently-deleted pipelines until Monitoring stops reporting them

* Adding explanatory comment for constant
2018-04-30 12:04:39 -07:00
Bill McConaghy 117e4337c5
passing acknowledge=true with start_trial (#18655) 2018-04-30 12:59:00 -04:00
Tim Sullivan 9e4d4952b6
[Monitoring] add get_clusters_summary to shrink cluster api response (#18596)
This reduces the output from the clusters API in the data processing stage.

Mainly, it throws away a lot of unused fields in `elasticsearch.cluster_stats` and `elasticsearch.cluster_state`

cc @rasroh
2018-04-30 09:11:01 -07:00
gchaps e11c7dac17
[UI Text: Security] Edited text in User, Add user, and Edit user pages (#18618) 2018-04-30 08:58:27 -07:00
Nathan Reese 5a4263ad2d
update to eui 0.0.44 (#18606)
* update to eui 0.0.44

* keep eui dependency in x-pack

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

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

* filter field list instead of chaning table size

* update x-pack snapshots
2018-04-27 11:07:15 -06:00
Søren Louv-Jansen fdc24f5b3f
[APM] Minor watcher improvements (#18602)
* [APM] Improve watcher tests

* Update tests
2018-04-26 17:44:31 +02:00
Tim Sullivan 4630548d2c
[Monitoring/React] Render ES Nodes Listing with Base Controller (#18585)
* [Monitoring/React] Render ES Nodes Listing with Base Controller

Refactors the ES Nodes Listing to use Base Controller and a React component instead of an Angular directive

* remove another obsolete file
2018-04-25 17:38:30 -07:00
Tim Sullivan 86d3786d34
[Monitoring/License] copy license LESS instead of reference it (#18591) 2018-04-25 17:29:56 -07:00
Chris Earle 015e94b5fe
[Monitoring] Recognize Write Threadpool (#18147)
This changes the Advanced Node page for Elasticsearch to recognize the
"write" threadpool, while also incorporating the deprecated "index"
threadpool and renamed "bulk" usage (renamed to "write").

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