Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Reintroduce ML Jobs warning popover on rule upgra…
…de (#159868) ## Summary Reintroduces ML Jobs warning popover that was removed during [new install/upgrade initial implementation.](#158450) ML Jobs warning popover that appears when user has legacy ML jobs installed, and the user attempts to update their prebuilt rules. Modified behaviour so that the popover now appears in any of the three cases: upgrading **all rules**, upgrading **specific rules** and upgrading **a single rule**. ### Testing In the `state` returned by `UpgradePrebuiltRulesTableContextProvider`, replace the value of `legacyJobsInstalled` for a mock value. See below: ```ts return { state: { rules, tags, isFetched, isLoading: isLoading && loadingJobs, isRefetching, selectedRules, loadingRules, lastUpdated: dataUpdatedAt, legacyJobsInstalled: [ { id: 'rc-rare-process-windows-5', description: 'Looks for rare and anomalous processes on a Windows host. Requires process execution events from Sysmon.', groups: ['host'], processed_record_count: 8577, memory_status: 'ok', jobState: 'closed', hasDatafeed: true, datafeedId: 'datafeed-rc-rare-process-windows-5', datafeedIndices: ['winlogbeat-*'], datafeedState: 'stopped', latestTimestampMs: 1561402325194, earliestTimestampMs: 1554327458406, isSingleMetricViewerJob: true, awaitingNodeAssignment: false, jobTags: {}, bucketSpanSeconds: 900, }, { id: 'siem-api-rare_process_linux_ecs', description: 'SIEM Auditbeat: Detect unusually rare processes on Linux (beta)', groups: ['siem'], processed_record_count: 582251, memory_status: 'hard_limit', jobState: 'closed', hasDatafeed: true, datafeedId: 'datafeed-siem-api-rare_process_linux_ecs', datafeedIndices: ['auditbeat-*'], datafeedState: 'stopped', latestTimestampMs: 1557434782207, earliestTimestampMs: 1557353420495, isSingleMetricViewerJob: true, awaitingNodeAssignment: false, jobTags: {}, bucketSpanSeconds: 900, }, ], isUpgradeModalVisible, ruleIdToUpgrade, modalConfirmationUpdateMethod, }, actions, }; ``` ### Checklist Delete any items that are not applicable to this PR. - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information