mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[8.12] [Security Solution][Endpoint] Map unisolate
to release
and running-processes
to processes
commands on response actions history output tray (#173831) (#173852)
# Backport This will backport the following commits from `main` to `8.12`: - [[Security Solution][Endpoint] Map `unisolate` to `release` and `running-processes` to `processes` commands on response actions history output tray (#173831)](https://github.com/elastic/kibana/pull/173831) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ash","email":"1849116+ashokaditya@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-12-21T15:56:31Z","message":"[Security Solution][Endpoint] Map `unisolate` to `release` and `running-processes` to `processes` commands on response actions history output tray (#173831)\n\n## Summary\r\n\r\nShows `release` instead of `unisolate` and `processes` instead of\r\n`running-processes` on the response actions history output tray.\r\n\r\n**with this change**\r\n\r\n\r\n\r\n\r\ncloses elastic/kibana/issues/168779\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"3781a0dcd185550e2beaa2701c1ec95ad4f19915","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Defend Workflows","OLM Sprint","v8.12.0","v8.13.0"],"number":173831,"url":"https://github.com/elastic/kibana/pull/173831","mergeCommit":{"message":"[Security Solution][Endpoint] Map `unisolate` to `release` and `running-processes` to `processes` commands on response actions history output tray (#173831)\n\n## Summary\r\n\r\nShows `release` instead of `unisolate` and `processes` instead of\r\n`running-processes` on the response actions history output tray.\r\n\r\n**with this change**\r\n\r\n\r\n\r\n\r\ncloses elastic/kibana/issues/168779\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"3781a0dcd185550e2beaa2701c1ec95ad4f19915"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173831","number":173831,"mergeCommit":{"message":"[Security Solution][Endpoint] Map `unisolate` to `release` and `running-processes` to `processes` commands on response actions history output tray (#173831)\n\n## Summary\r\n\r\nShows `release` instead of `unisolate` and `processes` instead of\r\n`running-processes` on the response actions history output tray.\r\n\r\n**with this change**\r\n\r\n\r\n\r\n\r\ncloses elastic/kibana/issues/168779\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"3781a0dcd185550e2beaa2701c1ec95ad4f19915"}}]}] BACKPORT--> Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
This commit is contained in:
parent
9251d59451
commit
a599b3168e
2 changed files with 14 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import React, { memo, useMemo } from 'react';
|
||||
import { EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiDescriptionList } from '@elastic/eui';
|
||||
import { EuiCodeBlock, EuiDescriptionList, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import { css, euiStyled } from '@kbn/kibana-react-plugin/common';
|
||||
import { map } from 'lodash';
|
||||
import { EndpointUploadActionResult } from '../../endpoint_upload_action_result';
|
||||
|
@ -96,7 +96,8 @@ const OutputContent = memo<{ action: MaybeImmutable<ActionDetails>; 'data-test-s
|
|||
canAccessEndpointActionsLogManagement,
|
||||
} = useUserPrivileges().endpointPrivileges;
|
||||
|
||||
const { command, isCompleted, isExpired, wasSuccessful, errors } = action;
|
||||
const { command: _command, isCompleted, isExpired, wasSuccessful, errors } = action;
|
||||
const command = getUiCommand(_command);
|
||||
|
||||
if (errors?.length) {
|
||||
return (
|
||||
|
|
|
@ -34,6 +34,7 @@ import { getEndpointAuthzInitialStateMock } from '../../../../../common/endpoint
|
|||
import { useGetEndpointActionList as _useGetEndpointActionList } from '../../../hooks/response_actions/use_get_endpoint_action_list';
|
||||
import { OUTPUT_MESSAGES } from '../translations';
|
||||
import { EndpointActionGenerator } from '../../../../../common/endpoint/data_generators/endpoint_action_generator';
|
||||
import { getUiCommand } from '../components/hooks';
|
||||
|
||||
const useGetEndpointActionListMock = _useGetEndpointActionList as jest.Mock;
|
||||
|
||||
|
@ -981,10 +982,12 @@ describe('Response actions history', () => {
|
|||
|
||||
render();
|
||||
|
||||
const outputCommand = getUiCommand(command);
|
||||
|
||||
const outputs = expandRows();
|
||||
expect(outputs.map((n) => n.textContent)).toEqual([
|
||||
expect.stringContaining(`${command} completed successfully`),
|
||||
expect.stringContaining(`${command} completed successfully`),
|
||||
expect.stringContaining(`${outputCommand} completed successfully`),
|
||||
expect.stringContaining(`${outputCommand} completed successfully`),
|
||||
]);
|
||||
expect(
|
||||
renderResult.getAllByTestId(`${testPrefix}-column-status`).map((n) => n.textContent)
|
||||
|
@ -1006,10 +1009,11 @@ describe('Response actions history', () => {
|
|||
});
|
||||
render();
|
||||
|
||||
const outputCommand = getUiCommand(command);
|
||||
const outputs = expandRows();
|
||||
expect(outputs.map((n) => n.textContent)).toEqual([
|
||||
`${command} failed`,
|
||||
`${command} failed`,
|
||||
`${outputCommand} failed`,
|
||||
`${outputCommand} failed`,
|
||||
]);
|
||||
expect(
|
||||
renderResult.getAllByTestId(`${testPrefix}-column-status`).map((n) => n.textContent)
|
||||
|
@ -1032,10 +1036,11 @@ describe('Response actions history', () => {
|
|||
});
|
||||
render();
|
||||
|
||||
const outputCommand = getUiCommand(command);
|
||||
const outputs = expandRows();
|
||||
expect(outputs.map((n) => n.textContent)).toEqual([
|
||||
`${command} failed: action expired`,
|
||||
`${command} failed: action expired`,
|
||||
`${outputCommand} failed: action expired`,
|
||||
`${outputCommand} failed: action expired`,
|
||||
]);
|
||||
expect(
|
||||
renderResult.getAllByTestId(`${testPrefix}-column-status`).map((n) => n.textContent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue