Commit graph

225 commits

Author SHA1 Message Date
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
Felix Stürmer
24ac3df4b6
Upgrade redux, redux-thunk and react-redux in x-pack (#20267)
This upgrades x-pack dependencies to the following versions:

* `redux@4.0.0` (to support TypeScript in the upcoming infra-ui migration, `redux-observable@1.0.0` in particular)
* `redux-thunk@2.3.0` (to support `redux@4.0.0`)
* `react-redux@^5.0.7` (to support `redux@4.0.0`)
2018-06-28 15:35:29 +02: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
Aleh Zasypkin
18037984da
Upgrade rxjs: 6.1.0 ---> 6.2.1. (#20209) 2018-06-25 20:04:19 +02: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
Spencer
7f0308b700
[plugin-helpers] use execa so that errors include stdout with helpful info (#20110) 2018-06-22 13:17:10 -07:00
Shaunak Kashyap
da2da74a08
EUIFication: Grok Debugger (#20027)
* Move <kbn-dev-tools-app> Angular wrapper directive usage into route template

* Move sole directive into new directives folder

* WIP checkin: basic conversion to React components

* Fix sample custom patterns indentation

* Remove custom CSS

* Wrap button in EuiFormRow + define isSimulateDisabled

* Wire up simulate

* Cleanup

* Ace formatting options

* Better styling

* Adding spacing between custom patterns and simulate button

* Fixing form row widths

* Removing form row around button

* Add indentation/newlines in structured output

* Error handling

* Use constants

* Removing no-longer-used code

* Implement syntax highlighting via custom mode

* Making functional tests pass

* Adding trailing comma back

* Removing fixed heights

* Removing unnecessary styles

* Make Event Output form row full width as well

* Wrapping EuiCodeEditors in EuiPanels

* Adding spacer before callout; making spacing around callout consistent

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

* Clear out simulation results before attempting simulation

* Set state with untrimmed value
2018-06-22 11:51:27 -07:00
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
Shaunak Kashyap
29f7e4c12b
Updating EUI to 0.0.55 (#20126) 2018-06-21 16:21:10 -07: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
Larry Gregory
8e9d776f54
[Flaky Test] - Role Management Screen (#19988)
Fixes a flaky test by waiting for Kibana to finish all pending requests before continuing
2018-06-18 09:54:31 -04:00
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
Bill McConaghy
f5a70272ce
upping xpack version of brace to the latest which should bring us to one version of it in the bundle. (#19897) 2018-06-14 11:00:33 -04: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