* Replace uses of chrome.getBasePath and fetch with core.http
While core.http is coming from 'above' these functions, it doesn't make
a lot of sense to pass the client through the entire stack to be able to
call it at the bottom, because longer-term we'll abstract these http calls
with some redux middleware.
In the short term we have a mechanism to refer to core through a
singleton, 'ui/new_platform', which should be around until 8.0 at least.
Ideally, we'll have a more robust architecture in place by then. If not,
we can reproduce the singleton module ourselves.
* Fix index patterns API call
core.http.fetch doesn't like a querystring in the path argument, so we
move it to the query object instead. The 'type' field specifier is
redundant as the type is always returned (and not as an attribute).
* Refactor getIndexPatterns to use the savedObjects client
We lose the updated_at field by using the client, but we weren't
actually using it.
I don't _think_ that the savedObjects client supports request aborts
right now, but when it does we'll get that back for free.
* Pass query params as object to core.http
A request with query params in its path does not properly encode said
params (the '?', at the very least), leading to malformed requests that
result in 404s.
* Remove redundant API logic
This function was originally used to query both an individual rule and a
list of rules, but the former functionality has been moved to
fetchRuleById.
* Allow throwIfNotOk to handle an undefined response
This is also an error for us, and we throw as such..
* Convert new Rules APIs to use core.http
These all occurred on master, this fixes them post-merge.
* Refactor Signals requests expecting custom Errors
These requests package up error responses in custom errors, which
callers are expecting. We should refactor all of these calls to behave
similarly, but for now let's just not break existing ones.
* Remove default credentials specification
The default is credentials: 'same-origin', and so we can omit it.
* Update types in new uses of hook
This savedObject type is slightly modified now that the hook is using
the NP savedObjects client.
* Replace explicit system header with fetch option
The asSystemRequest option accomplishes the same thing without requiring
us to know the implementation. With the addition of this option, setting
this header explicitly causes an error.
This also removes the credentials: same-origin specifier as it is the
default.
* Remove redundant awaits
The response has previously been resolved, and so our body should be
populated, here.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* chore: 🤖 add AppArch plugins to CODEOWNERS
And sort the list alphabetically.
* chore: 🤖 add @kbn/interpreter to AppArch CODEOWNERS
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* refactor: 💡 move state containers to /common folder
* refactor: 💡 remove RecursiveReadonly type in state containers
* fix: 🐛 assume we are in production by default on server-side
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* enable darwin for the node installation in the CI
* refactor: avoid hardcode strings and customise based on the OS flavour
* fix classifier
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* adding meta information to KibanaDatatable
* updating filtering functions to use new information
* moving filter creation to APPLY_FILTER_ACTION
* adding SELECT_RANGE_ACTION and TRIGGER
* making _meta optional
* inlining legacy code for inspector
* fixing jest tests
* keeping apply_filter_action and adding value_click_action and trigger
* utilities for serializing/unserializing aggConfigs
* renaming prop to indexPatternId
* cleanup
* updating interpreter functional baselines
* trying to fix tests
* Fix legend tests
* reverting update to multi metric screenshot
* updating based on review
* updating tests
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR adds an Alerts Details page, linked from the Alerts List.
It includes:
Header containing details about the Alert.
Quick Enable / Mute buttons for the Alert
Disabled buttons to the _Edit Alert+ flyout (waiting on #51545), View in App (waiting on #56298) and Activity Log (waiting on #51548)
* wip
* Expose whether the encryption key is randomly generated for saved-objects
* give feedback to user if encryption key is randomly generated
* remove package distributable
* update msg for no api integration key
* Update x-pack/plugins/encrypted_saved_objects/server/config.ts
Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>
* review II
* fix type
* rename encryptionKeyRandomlyGenerated -> usingEphemeralEncryptionKey
* fix test and mistake
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
* update relative time handling
* fix type
* update logic to handle end date
* fix test
* PR feedback
* refactor code
* refactor interval time
* fix tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Some fixes for #54405.
* Use the `popoverPositionFluid` method of `EuiPopover` to properly position the arrow based on where the popover was opened
* Rearrange the variable declarations and effects in the popover index
* Create a `Contents` component to separate the internals of the popover from the index, where the poisitioning is done
* Add a story to show the contents rendering
* Partial commit - got tests working and `getGapBetweenRuns` working with `from` and `to` being any string (invalid, ISO string, now, now-x).
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Convert parts of Elasticsearch version check to ts
* Move ES version check to NP
* Improve types
* Wait till for compatible ES nodes before SO migrations
* Don't wait for ES compatibility if skipMigrations=true
* Legacy Elasticsearch plugin integration test
* Make ES compatibility check and migrations logging more visible
* Test for isCompatible=false when ES version check throws
* Start pollEsNodesVersion immediately
* Refactor pollEsNodesVersion
* [Maps] disable style forms when they are not applied due to other style settings
* disable label border color when label border is none
* disable symbol style inputs when symbol size is zero
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Moves a majority of our UI lib/component and utils to np shims
* Fixing some slight np differences from legacy
* Mostly shimmed client, save for a few APIs and routing
* Fixing canvas job notifier
* Un-needed typedef file
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Add center button for service map.
The fullscreen button is still there until #56351 is merged.
Add fit and padding to the layout animation.
Make the node labels wider so they aren't cut off.