* expose ES clients without observables
* expose observable-less api to plugins
* update core api and mocks
* update plugins
* NP SO & legacy use updated API
* update SO tests
* update TSDocs
* update types
* update docs
* document createCluster analog in np
* typo
* Set up our react app in the NP way
* Defines the setup() method for our UI plugin
* Renders the app in the NP way within our setup() method
* Defines a legacy file that invokes the plugin manually
Things seem to be mostly working; the app mounts with no immediate
errors, at least.
* Move files into NP structure
Our plugin function and class are both direct children of siem/public.
The app folder contains both our React app and the function to render
it.
* Register SIEM in the feature catalogue via NP format
Unfortunately, this can't live in the plugin for now because it doesn't
get invoked when we need it. For now, it's going to live in the same
spot, and once we're a real NP plugin we can move it.
* Eliminate usage of timezoneBrowser UI setting
This seems to be redundant with dateFormat:tz except that it always
returns a real timezone, not just a preference. By wrapping that logic
in our own hook, useTimeZone, we can remove this weird usage and stick
to the standard dateFormat and dateFormat:tz.
* Clean up tests for FormattedDate components
Mocks our simpler wrapping hooks rather than the entire UI Settings
module.
* Remove remaining uses of UI Settings mocks
These remaining tests can mock settings directly, or otherwise were
misusing the settings mocks to retrieve assertion values.
* Remove unnecessary intermediate `describe` blocks
They were not adding any information to the tests.
* Remove use of kibana version in client requests
We were previously passing this version all over the place for the sake
of our framework-specific request header. The sole advantage of supplying
such a header is that the client will receive an informative error modal
in the case of a version mismatch between the client and server.
We can successfully perform these requests with the `kbn-xsrf` header
instead. Long-term, we can use core.http.fetch to perform the requests
and auto-populate the version header, but it would be nicer to abstract
those requests to the framework level rather than threading the HTTP
client throughout the application.
* Remove newly added uses of kbnVersion
These happened on master in the meantime.
* Use helper to generate test assertion
Allows us to change the implementation of the empty string without
breaking the test.
* Remove guard from date formatting component
We're always going to get back usable values from these hooks; while the
user can unset the dateFormat in their settings, we'll still get an
empty string which is effectively the same as no formatting (as
evidenced in the tests).
* Remove default from byte formatting component
If the user has deleted this default, they presumably meant to do so and
we shouldn't supersede it.
* Refactor bytes formatting to allow use in our charts
We need a formatting function to use with our charts, so this splits out
a hook from the original react component, allowing our charts to be
formatted as specified in the user's UI settings.
* Refer to our constant for APP_ID
* Explicit return values for some UI Settings hooks
This forces accidental changes to the return value to be explicit.
* Remove use of ui/chrome in request header
This is an unnecessary use: kibana works the same no matter what
contents the `kbn-xsrf` header contains (as long as it's there).
* Mock UI Settings values in our TestProvider
When using our TestProvider components, we were previously relying on
platform's UISettings mocks instead of our own, more comprehensive ones.
This worked for the most part, and when we needed real settings we would
mock the UI Settings client manually.
When we removed some app code that defaulted UI Settings values when the
client did not return a value, tests that used TestProviders but also
relied on those defaults broke. This adds that behavior back,
and obviates the need for manual calls to jest.mock except when we're a)
not using TestProviders but b) overriding the platform mocks.
Also removes some of those unneeded uses.
* Remove unused import
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [DOCS] Moves index pattern doc to Discover
* [DOCS] Improves intro to index patterns doc
* [DOCS] Edits index patterns doc
* [DOCS] Incorporates comments into index patterns doc
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add exclude fields input to df analytics creation form
* rename explain api endpoint to general explainDataFrameAnalytics
* wip: use explain api for exclude fields
* show error message if classification depVar has cardinality of > 2
* update types
* updates after conflict resolution
* prevent creation if more than 2 distinct classes for class job. create form field validation file
* Saving anonymised data to SO
* Add new files
* Hook up usage collector
* Added app start up ui metric tracking
* Only use client side track metrics functionality
* Added comment regarding use of `patterns`, renamed trackMetric -> trackUiMetric
* Fix jest tests
* Slight refactor and fix for functional tests. More defensive tracking logic
* Fix types in test
* Minor refactor to get endpoint description - removed SenseEditor from autocomplete.
Fix bug where cursor at end of line does not get endpoint informaiton
* Send request to es: do not mutate args
Always move cursor to end of line when getting endpoint description
* Create an interface a simple interface to the metrics tracker
Use the new createUiStatsReporter function to create the tracker
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Prefer Kibana core http service to other fetch functions, refactor helper functions to hooks.
* Reintroduce newline deleted in previous commit.
* Clean up obsolete import.
* Clean up effect code in new hook.
* Clean up enum usage in new hook.
* Implement PR feedback on new hook.
* Fix eslint error.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Reporting/Docs] Various Documentation Additions
- Add ECONNREFUSED to troubleshooting page:
- System Requirements for Reporting
- Layout and Sizing
* [DOCS][Reporting] Updates index and troubleshooting pages
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
* Remove task logic. Remove server refs and revise for np. Migrate a few files to ts
* Remove unused reference
* Update mappings
* Test usage collector register
* Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state)
* Update integration test to use stack stats
* Update integration test to look for 'maps-telemetry' instead of 'maps'
* Update jest test to reflect calls to register
* Follow the same pattern as other int tests and test reliable nested attribute
* Back out np-related changes for separate PR
* timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue
* Back out file shuffling for separate PR
* Remove mappings updates (handled in separate PR)
* Review feedback. Move telemetry type constant to constants file
* Consolidate imports
* Linting fix
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>