* refact(NA): use default telemetry obj in the set loop
* chore(NA): fix typecheck
* fix(NA): test run with lodash has
* chore(NA): fix older lodash has
* chore(NA): remove lodash has usage
* x-pack/watcher: use Elasticsearch from CoreStart
* x-pack/upgrade_assistant: use Elasticsearch from CoreStart
* x-pack/actions: use Elasticsearch from CoreStart
* x-pack/alerting: use Elasticsearch from CoreStart
* x-pack/lens: use Elasticsearch from CoreStart
* expressions: use Elasticsearch from CoreStart
* x-pack/remote_clusters: remove unused Elasticsearch dependency on CoreSetup
* x-pack/oss_telemetry: use Elasticsearch from CoreStart
* Cleanup after #59886
* x-pack/watcher: create custom client only once
* Revert "x-pack/watcher: create custom client only once"
This reverts commit 78fc4d2e93.
* Revert "x-pack/watcher: use Elasticsearch from CoreStart"
This reverts commit b621af9388.
* x-pack/task_manager: use Elasticsearch from CoreStart
* x-pack/event_log: use Elasticsearch from CoreStart
* x-pack/alerting: use Elasticsearch from CoreStart
* x-pack/apm: use Elasticsearch from CoreStart
* x-pack/actions: use Elasticsearch from CoreStart
* PR Feedback
* APM review nits
* Remove unused variable
* Remove unused variable
* x-pack/apm: better typesafety
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Addded worker padding to save some CPU
* Updated comments
* Update worker scheduler and add a new util
The worker scheduler should only sleep when it cannot process any
in progress operations. Additionally, logic has been added
for handling of queue operations that have been in the queue for
a long time and may be viewed as still in small window of time
by wokers that do not have the credentials to process those
reindex operations.
* res 👉🏻resolve
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fix edge case where reindex op is can falsely be seen as stale
This is for multiple Kibana workers, to ensure that an item just
coming off the queue is seen as "new" we set a "startedAt" field
which will update the reindex op and give it the full timeout
window.
* Update tests to use new api too
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Refactor: Move checking of closed index to single point
We should rather only check if an index is currently closed the
moment before starting to reindex. We still store a flag to
indicate that we opened an index that was closed, but this
should not be set from the reindex handlers because the reindex
task may only start some time later in which case the closed
index could have been opened and our reindex job will open it
and close it again.
* Added debug log
* Added comment
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Exclude disallowed, private setting at index creation
* Remove intl from tabs component
* Added logic for checking the current index status
* Added ES contract integration test
Using _cluster/state is considered internal. This adds an integration
test for checking the contract in CI.
* Add the client side notification for closed indices
* First version of end-to-end functionality working
* Clean up unused, incorrect type information
* Fix type issues and added a comment about the new reindex options
* Fixed server side tests, added comments and logic updates
Updated the handling of reindexOptions to make it more
backwards compatible (treat it as if it could be undefined).
Also update the logic for checking for open or closed indices.
No optional chaining! It should break if the response does not
exactly match.
* Clean up unused code
* Improved idempotency of test and check explicitly for "close".
Rather check for the specific value we want, as this is what is
also gauranteed by the tests. In this way, the information we
send back to the client is also more accurate regarding the index
status. If, in future, more index states are introduced this will
need to be revisited if it affects the ability for an index to be
re-indexed.
* Update client-side tests
* Fix types
* Handle a case where the index name provided may be an alias
* Fix types
* merge-conflict: finish merge conflict resolution
* Update x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/closed_warning_icon.tsx
Co-Authored-By: Alison Goryachev <alisonmllr20@gmail.com>
* merge-conflict: Remove duplicate import
VSCode does not auto-save as expected :sigh:
* ui: Revisit the UI
Moved the warning icon to inside of the button and tooltip to
on the button.
Added a callout to the reindex flyout for when an index is closed.
* logic: slight update to when the index closed callout is shown
We only show the index closed callout in the flyout when the
reindex operation is not considered "completed"
* tests: fix jest tests
* refactor: remove "openAndClose" from reindex endpoints
"openAndClose" should just happen automatically. The user should
not have to pass the flag in, that would be a weird API. We just
need to warn the user about that reindexing a closed index will
take more resources
* test: update upgrade assistant integration test
* fix: types
* copy: use sentence case
* refactor: use the in scope declaration of reindex op
* test: Clean up tests
Reindexing test was generating index name, could just get it from
server response. Also removed openAndClose from all integration
tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
* Added server side logic for handling batch reindex
* Remove literal string interpolation from translation
* Refactor return value of batch endpoint
"sucesses" does not communicate accurately what has happened.
"started" more closely reflects what has happened.
* First iteration of batch queues
* Single queue
Changed the batchqueues implementation to only using a single queue
- since there is only one ES that it is interacting with.
Before continuing with this work, just making sure that these pre-
cautions are necessary!
* Clean up old batch queue implementation
* Slight refactor
* Revert batch queues implementation
* Introduction of QueueSettings
Queue settings can be set on a reindex operation and set a
timemstamp value on the reindex operation for the scheduler
to use down the line for ordering operations and running them
in series
* Updated worker logic to handle items in queue in series
* Refactor /batch endpoint response to "enqueued" not "started"
* Fixed jest tests
* Refactor worker refresh operations for readability
Created a new file op_utils where logic repsonsible for sorting
and ordering reindex operation saved objects is.
* Add batch API integration test
Also assert that reindexing is happening in the expected order
* Added a new endpoint: GET batch/queue
This allows users of the API to see what the current queue state
is for visibility. Using the queue endpoint int he API integration
tests for batch too.
* Reset the queuedAt timestamp on resume
If a reindexOperation is being resumed and put in a queue we
also need to reset the queuedAt timestamp to respect the new
batch queue ordering.
* Fix jest test
Added 'undefined' as the second optional param to
resumeIndexOperation call.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Removed Boom from reindex-service
The reindex service had logic inside it for mapping errors
to HTTP. This has been moved to the route handlers and also
removed Boom.
There is one more instance of Boom use inside of reindex-actions
but that comes from Saved Objects which should probably be removed
at a later stage.
* Fix import path
Specify the full relative import path to the kibana's core
server folder
* Remove unnecessary if statement
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Create x-pack/plugins skeleton for upgrade assistant
* Move public folder contents
Move the public folder of Upgrade Assistant and migrate public to use HttpSetup (remove axios)
* Include stylesheets in public
* Move server side out of legacy
Begin migration of Reindex worker to new platform
Move imports around so that it satsifies new platform constraints like not importing
server side code (even types) in client.
* Updated the routes with new dependencies and removed server shim
* Fix router unit tests
* Fix server lib tests
After changing function signatures for the reindex server factory (and others) all
of the tests needed to be revisited and brought in line with the new APIs.
Also used core/server mocks where appropriate
* Clean up types issues
* Fix setting credentials on request header
* Removed the security plugin from Upgrade Assistant
The security plugin is a potential future consumer of the Upgrade Assistant's deprecation feature
and we would therefore not want to create a circular depedency here. We pull in the licensing plugin
rather (as it is less likely that we will depend on that) and use it to determine whether security
is available and enabled.
* Migrate to config to new platform config
xpack.upgrade_assistant.enabled
* Remove unused types
* Fix import issue
* Move upgrade assistant back to Elasticsearch management section
* Update dotfiles
Added elasticsearch ui team as upgrade assistant code owner
Updated i18nrc.json path
* Alphabetical ordering in xpack/i18nrc.json
* Implemented PR feedback
Renamed callCluster -> callAsUser to be more consistent
with platform naming.
Added comment about why we are not using security plugin
directly inside of Upgrade Assistant.
Fixed long path imports and use 'src/core/..' throughout.
Fixed import ordering.
Renamed variables inside of telemetry lib.
* Revert to longer import path
In plugin.ts importing from 'kibana/server' or 'src/core/server'
results in a module not found error.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects
* Fix SavedObject import references after moving files to core
* First pass at SavedObjects api docs
* Expose and import all saved object types through core/server
* Don't expose SavedObjectsManagement from core and fix imports
* Improve typings for SavedObject error helpers
* Fix type errors after master merge
* Fix SavedObjectErrorHelpers tests
* Always mock metadata/chrome in OSS
* Enable jest env in jest mocks
* Exclude jest mocks in karma bundles
* Use setupFilesAfterEnv in config
* Remove chrome/metadata mock from x-pack
* Remove kuery mock
* Add missing mock to SIEM test
* Fix typo in mock import
* Remove top level capabilities x-pack mock
* Move kfetch mock to ui/public
* Move moment-timezone to mocks file
* Unmock kfetch in kfetch specific tests
* Make kfetch mock manual
* Removed unnecessary jest.mock
* Remove kfetch unmocks
* Convert simple files to TS
* Fix jest tests
* Rename saved_objects_client{.js => .ts}
* WIP saved_objects_client
* saved_objects repository{.js => .ts}
* includedFields support string[] for type paramater
* Repository/saved_objects_client -> TS
* Fix tests and dependencies
* Fix saved objects type errors and simplify
* saved_objects/index saved_objects/service/index -> ts
* Fix saved objects export test after switching to typed mock
* Workaround type error
* Revert "Workaround type error"
This reverts commit de3252267eb2e6bf56a5584d271b55a7afdc1c53.
* Correctly type Server.savedObjects.SaveObjectsClient constructor
* saved_objects/service/lib/index.{js -> ts}
* saved_objects/service/lib/scoped_client_provider{js -> ts}
* Typescriptify scoped_client_provider
* Fix x-pack jest imports
* Add lodash/internal/toPath typings to xpath
* Introduce SavedObjectsClientContract
We need a way to specify that injected dependencies should adhere to the
SavedObjectsClient "contract". We can't use the SavedObjectsClient class
itself since it contains the private _repository property which in TS is
included in the type signature of a class.
* Cleanup and simplify types
* Fix repository#delete should return {}
* Add SavedObjects repository test for uncovered bug
Test for a bug in our previous js implementation that can lead to data
corruption and data loss.
If a bulkGet request is made where one of the objects to fetch is of a type
that isn't allowed, the returned result will include documents which have the
incorrect id and type assigned. E.g. the data of an object with id '1' is
returned with id '2'. Saving '2' will incorrectly override it's data with that
of the data of object '1'.
* SavedObject.updated_at: string and unify saved_object / serializer types
* Cleanup
* Address code review feedback
* Don't mock errors helpers in SavedObjectsClient Mock
* Address CR feedback
* CR Feedback #2
* Add kibana-platform as code owners of Saved Objects
* Better typings for SavedObjectsClient.errors
* Use unknown as default for generic type request paramater
* Bump @types/elasticsearch
* Fix types for isForbiddenError
* Bump x-pack @types/elasticsearch
* Initial code to force collectors to indicate when they are ready
* Add and fix tests
* Remove debug
* Add ready check in api call
* Fix prettier complaints
* Return 503 if not all collectors are ready
* PR feedback
* Add retry logic for usage collection in the reporting tests
* Fix incorrect boomify usage
* Fix more issues with the tests
* Just add debug I guess
* More debug
* Try and handle this exception
* Try and make the tests more defensive and remove console logs
* Retry logic here too
* Debug for the reporting tests failure
* I don't like this, but lets see if it works
* Move the retry logic into the collector set directly
* Add support for this new collector
* Localize this
* This shouldn't be static on the class, but rather static for the entire runtime
* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.
* chore(NA): patch babel register to load typescrit
* chore(NA): first working version with babel 7 replacing typescript compiler.
* fix(NA): common preset declaration in order to make it work with babel-loader.
* chore(na): organizing babel preset env package json.
* chore(NA): mocha tests enabled.
* fix(NA): typo on importing
* test(NA): majority of x-pack tests ported to use babel-jest
* fix(NA): report info button test with babel-jest.
* fix(NA): polling service tests.
* test(na): fix server plugins plugin tests.
* test(NA): batch of test fixs for jest tests under babel-jest hoisting.
* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.
* chore(NA): update yarn.lock file.
* chore(NA): tests passing.
* chore(NA): remove wrong dep
* chore(NA): fix tsconfig
* chore(NA): skip babel for ts-jest.
* chore(NA): selectively apply the plugin to strip off namespace from ts files.
* chore(NA): remove not needed changes from ts tests
* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.
* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.
* chore(NA): merge and solve conflicts with master.
* chore(NA): fix problems reported by eslint
* chore(NA): fix license ovveride for babel-plugin-mock-imports
* chore(NA): update jest integration tests for kbn pm
* chore(NA): update babel jest integration tests for kbn pm.
* test(NA): update jest integration snapshot for kbn pm.
* chore(NA): apply changes according to the pull request reviews.
* chore(NA): apply changes according to the pull request reviews.
* refact(NA): migrate jest tests to the new pattern.
* fix(NA): babel 7 polyfill in the tests bundle.
* chore(NA): restore needed step in order to compile x-pack with typescript.
* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7
* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"
This reverts commit 2707d538f5.
* fix(NA): import paths for tabConfigConst
* chore(NA): fix transpiling error on browser tests
* chore(NA): simplify kbn babel preset package.
* chore(NA): migrate build to use babel transpiler for typescript excluding xpack.
* fix(NA): introduced error on test quick task.
* fix(NA): fix preset for client side code on build.
* fix(NA): build with babel
* fix(NA): negated patterns in the end.
* fix(NA): kbn_tp_sample_panel_action creation.
* fix(NA): babel typescript transform plugin workaround when exporting interface name.
* refact(NA): remove not needed type cast to any on jest test.
* docs(NA): add developement documentation about jest mocks test pattern.
* chore(NA): missing unmerged path.
* chore(NA): fix jest tests for template.
* [CCR] Client integration tests (table lists) (#33525)
* Force user to re-authenticate if token refresh fails with `400` status code. (#33774)
* Improve performance of the Logstash Pipeline Viewer (#33793)
Resolves#27513.
_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._
Summary of changes, taken from #31293:
## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.
Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.
## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.
## Gains, by the numbers
Based on a simple, 1-input, 1-filter, and 1-output pipeline.
* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.
* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.
* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.
* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.
* [Maps] split settings into layer and source panels (#33788)
* [Maps] split settings into layer and source panels
* fix SCSS import
* [env] exit if starting as root (#21563)
* [env] exit if starting as root
* fix windows
* s/--allow-root
* Typescript sample panel action (#33602)
* Typescript sample panel action
* Update EUI version to match main cabana version
* update yarn.lock
* add back typings include
* use correct relative path
* Home page "recent links" should communicate saved object type #21896 (#33694)
* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx
Co-Authored-By: rockfield <philipp.b@ya.ru>
* Fixed a simple argument bug and removed infra date picker EUI types
* Fixes for EUI date picker types
* eui_8.0.0
* fix type errors in query_bar
* Small changes for EUI types
* Updates EUI to 9.0.0 and removes @types/react-datepicker as it now ships with EUI
* Updates to EUI 9.0.1 and removes duplicate types in infra eui.d.ts
* ts-ignore applied to ongoing type error with styled components and EUI
* Changes EuiProgress props to avoid TS errors
* Updates EUI 9.0 snapshots
* Updates kibana root snapshots for EUI 9.0 upgrade
* Update detail_panel.test.js for EUI changes
* Updated functioanl and unit tests to properly inspect EuiTableRowCell rendered values
* Fix docs_level_security_roles.js func tests
* Update EUI to 9.0.2
* Fixed failing snapshot for EUI icon default prop
* udpate jest, jest-cli, @types/jest to v24
* fix type error in kibana-i18n package
* return serivce explicitly to fix typings
* add explicit never
* suppress typings errors
* update jest versions in x-pack
* make tests in x-pack more robust and fix incompatibility
* suppress CallCluster mock typings
Mock interface doesn't match CallCluster. Requires
additional work
* x-pack. resolve other typing conflicts
* remove unused types/jest
* fix snapshots
* restore mocks after jest.spyOn
* remove outdated definitions for jest
* cleanup x-pack package.json and update @types/jest
* fix tests merged from master
* updated yarn.lock and log errors for scripts/type_check
* This commit fixes error in TS, which failed on parsing the file.
* suppress type errors from master
* jest-cli is devDep
* [UA] Support previously re-indexed ML/Watcher indices
Previously we were comparing the start of the indices to determine if ML/Watcher
should be stopped before re-indexing. Since we are now pre-pending the index
name we should compare the index names without the re-indexed portion.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
**Removes APM reindexing**: Since indices created in 6.x will be required to
re-index in 7.x there is no longer a need to support migrating APM indices to
the ECS format since ECS is shipped starting in 7.0
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Similar to what is done in the Index Lifecycle Management, we prepend as to
avoid possible issues with conflicts in index patterns, templates, etc.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* First foray into turning .application background off
* Hopefully fixing the last few plugins
* Update EUI to 6.9.0
* removing hacks
* last fixes
* Remove a few more `100vh`
* Can I remember to copy & REPLACE
* EUI at 6.10.0
See https://github.com/elastic/elasticsearch/pull/38254
Using the `version` parameter to implement optimistic concurrency is not going to be supported in 7.0, so we need to replace our usage of document version with the new `_seq_no` and `_primary_term` parameters. These fields are returned in the same way that `_version` was returned on all read/write requests except for search, where it needs to be requested by sending `seq_no_primary_term: true` in the body of the search request. These parameters are sent back to Elasticsearch on write requests with the `if_seq_no` and `if_primary_term` parameters, and are functionally equivalent to sending a `version` in a write request before elastic/elasticsearch#38254.
To make these updates I searched the code base for uses of a `version` and `_version`, then triaged each usage, so I'm fairly confident that I got everything but it's possible something slipped through the cracks, so if you know of any usage of the document version field please help me out by double checking that I converted it.
- [x] **Saved Objects**: @elastic/kibana-platform, @elastic/es-security - for BWC and ergonomics the `version` provided by the Saved Objects client/API was not removed, it was converted from a number to a string whose value is `base64(json([_seq_no, _primary_term]))`. This allows the Saved Objects API and its consumers to remain mostly unmodified, as long as the underlying value in the version field is irrelevant. This was the case for all usages in Kibana, only thing that needed updating was tests and TS types.
- [x] **Reporting/esqueue**: @joelgriffith, @tsullivan - the version parameter was used here specifically for implementing optimistic concurrency, and since its usage was contained within the esqueue module I just updated it to use the new `_seq_no` and `_primary_term` fields.
- [x] **Task Manager**: @tsullivan @njd5475 - Like esqueue this module uses version for optimistic concurrency but the usage is contained with the module so I just updated it to use, store, and request the `_seq_no` and `_primary_term` fields.
- [ ] **ML**: @elastic/ml-ui - Best I could tell the only "version" in the ML code refers to the stack version, 077245fed8
- [ ] **Beats CM**: @elastic/beats - Looks like the references to `_version` in the code is only in the types but not in the code itself. I updated the types to use `_seq_no` and `_primary_term`, and their camelCase equivalents where appropriate. I did find a method that used one of the types referencing version but when investigating its usage it seemed the only consumer of that method was itself so i removed it. 52d890fed7
- [x] **Spaces (tests)**: @elastic/kibana-security - The spaces test helpers use saved objects with versions in a number of places, so I updated them to use the new string versions where the version was predictable, and removed the assertion on version where it wasn't. We test the version in the saved objects code so this should be fine.
* feat(NA): very first version with telemetry working for the upgrade assistant.
* refact(NA): import all types from a file and rewrite first version code.
* chore(NA): missing types for register and makeCollector functions.
* test(NA): tests for upgrade assistant telemetry routes.
* refact(NA): extra spaces on imports and imports order.
* test(NA): for ui_open saved objects on upgrade assistant telemetry.
* test(NA): for usage_collector functions.
* chore(NA): change the return object into the upgrade assistant telemetry.
* chore(NA): fix type imports.
* fix(NA): importing saved objects client types.
* refact(NA): simplify saved objects schema for upgrade assistant telemetry.
* feat(NA): only send upgrade assistant metrics after we have data. Never send telemetry info about a clicked tab if it is the current selected one.
* fix(NA): typo on word
* feat(NA): add telemetry schema support for for ui_reindex.
* test(NA): update integration test fixture to include new telemetry stats.
* chore(NA): fix mappings for ui_reindex.
* refact(NA): invest telemetry local expect data order.
* chore(NA): includeDefaults for callCluster.
* chore(NA): remove ignore 404 from callCluster.
* refact(NA): wrap get logging status from cluster settings into a function.
* feat(NA): add reindex ui telemetry.
* fix(NA): typo on mappings. fix(NA): non wait for send telemetry to complete will cause es doc errors when increment counters
* test(NA): wait for telemetry requests to end before esArchiver.unload on functional tests.
* refact(NA): remove bad added async to tabs onclick function.
* Check security privileges before allowing reindexing
* Add global readyForUpgrade flag for Cloud
* Add ml_settings to cluster_settings
* Generalize locking mechanism for stop/starting watcher
* Display ML/Watcher stopping/resuming steps in UI
* Fix type issues
* Handle security being disabled for privilege check
* Use xpack_main.info + add types
* Fix x-pack builds