* Add inventory metadata api with regions and accounts
* Comment magic number
* Refactor to be compat with new platform
* Fix types
* Use RequiredDataset to get account details. Fix hook decodes
* Remove unused import
* Update x-pack/legacy/plugins/infra/server/routes/inventory_metadata/lib/get_aws_metadata.ts
Co-Authored-By: Chris Cowan <chris@chriscowan.us>
* Rename some things again
* Fix type
* [DOCS] Updates for API usage
* Changes from Larry
* Update docs/api/using-api.asciidoc
Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>
* Comments from Larry
* Comment from Larry
The Slack and Pagerduty actions currently do not do whitelist validation, this PR adds the requirement for the PD and Slack action's respective target URLs to also be whitelisted.
* Use `getTraceURL` for APM trace links
* Fix tests
* Check for the presence of APM links
Since now we use a helper provided by APM it no longer makes sense to
test for the actual URL (because that only tests the function). Instead
just test that the link exists and that it has an `href`.
Adds a `runNow` api to Task Manager, allowing us to force the refresh of a recurring task.
This PR includes a couple of sustainability changes as well as the feature itself.
1. **Declarative query composition.** At the moment the queries in the TaskStore are huge JSON objects that are hard to maintain and understand. This PR introduces a pattern where the different parts of the query are composed out of type-checked functions, making it easier to maintain and to construct dynamically as needs change. _This was included in this PR as the **markAvailableTasksAsClaimed** query needs different query clauses depending on whether there are specific Tasks we wish to claim first.
2. **Refactoring of the Task Poller** As the `runNow` api is introduced we find Task Manager's lifecycle in a weird state where it has both a _pull_ model, where timeouts & callbacks interact without having to responsd to any external requests, and a _push_ model where requests are made to the new `runNow` api. Balancing these two proved error prone, hard to maintain and had the potential of _lossy_ behaviour where requests are dropped accidentally. To address this TaskPoller has been refactored using Rxjs observables, remodelling the existing _pull_ mechanism as a _push_ mechanism so Task Manager can _respond_ to both _polling_ calls and _runNow_ in a similar fashion.
And ofcourse the main feature of this PR:
3. **runNow api** An api on TaskManager that takes a _task ID_ and attempts to run the task. The call returns a promise which resolves with a result which notifies the caller when the task has either completed successfully, or result in an error.
* shimming NP for spaces client-side plugin
* refresh active space in nav control when updated
* fix advanced settings screen
* allow npStart from unauthed routes
* use NP for deriving space management url
* remove security's usage of SpacesManager
* remove usages of ui/capabilities
* fix tests
* implement NP plugin interface
* remove hack in favor of convention in migration guide
* shim feature catalogue registration
* streamline nav control, and handle async loading more gracefully
* adding opaqueId
* fixes from merge
* fix merge from master
* fixing merge from master
* move _active_space route to NP
* moving to the NP feature catalogue registry
* moving setup to setup phase
* optimizing active space retrieval
* reverting test isolation change
* Apply suggestions from code review
Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>
* removing unnecessary PluginInitializerContext
* updating advanced settings subtitle
* using NP anonymousPaths service
* additional nav_control_popover cleanup
* additional cleanup
* testing out onActiveSpaceChange$ property
* make the linter happy
* make the type checker happy
* fixing types
* fix merge from master
* spaces LP init should run on all pages, not just the kibana app
* address nits
* fix infra/logs, and the spaces disabled scenario
* fix typescript errors
* revert changes to infra plugin
* reintroducing activeSpace injected var for legacy plugins
* fixing react deprecation warning and unhandled promise rejection
* restore activeSpace default var
* spaces does not need to check its own enabled status
* fix from merge
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* move cloud dir to plugins from legacy
* create ui_metrics in NP
* migrate first plugin
* ui_metric plugin uses npStart
* sinin mock
* karma mocks
* type check fix
* rename old configs
* fix mocks and use configs
* use fo debug
* ui_metric deprecation configs
* remove commented out code
* remove unused type import
* mock ui_metric in client_integration
* jest.mock ui/new_platform
* fix all failing tests
* platform team code review fixes
* reset interval back to default
* apm cypress config use usageCollection
* revert kibana.yml change
* remove license type from NP def
* undo revert of NP type
* code review fixes
* report schema in a separate dir
* Licensing plugin and XPackInfo uses the same license data (#52507)
* convert xpackinfo to TS
* use NP Licensing plugin in XPackInfo
* update mocks
* put license regresh hack back.
otherwise new license won't be re-fetched when signature changed. was deleted by mistake
* add functional test for legacy xpackmain
* declare setup types on client & server explicitly
* rename mock license --> licensing to match plugin name
* add tests for createLicensePoller
* fix type error
* adopt tests for xpack_info
* createXPackInfo uses new platform API
* put back error mute
* address comments
* fix renamed import
* address comment
* update tests to reduce delays
* deprecate xpack.xpack_main.xpack_api_polling_frequency_millis
* use snake_case in config
* fix wrong import