* 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.
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';
```
* [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
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
- 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.
- 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.
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).
* 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
* 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
* 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.
* [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
* 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
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.
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.
* 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.
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));
```
* [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
* 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
* 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.
* [ML] Adding jsconfig file for better code navigation in vscode
* removing allowSyntheticDefaultImports as it is defaulted to true
* cleaning up paths
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.
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.
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.
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.
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.
* [Monitoring] Add a yellow status phase in the startup lifecycle
* comments
* more comments
* more comment
* undo register => registerType function name change
* 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
* [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
* [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
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.
* [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
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.
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.
* 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.
* 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.
* [ML] Convert Explorer Influencers List to EUI/React
* [ML] Remove unused abbreviate_whole_number Angular filter
* [ML] Convert React Influencers List to stateless function
* [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
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.
* [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
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.
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).
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.
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.
* [console_extensions] disable when console is disabled
* [console extensions] has console and enabled
* [console_extensions] fix console_extensions.enabled
* 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
* Extracting constant for reuse
* Keep track of recently-deleted pipelines until Monitoring stops reporting them
* Adding explanatory comment for constant
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
* 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
* [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
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.