forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] moved root privilege callout with data stream info to create/…
…edit package policy page (elastic#184190) ## Summary Address feedback in elastic#184119 (comment) Relates elastic/ingest-dev#3357 Moved root privileges callout with data streams from package policy submit modal to the create/edit package policy page itself, so it is more persistent than a modal window. To verify: - Go to System integration / Add integration - Verify that the require root callout shows the data streams that require root <img width="974" alt="image" src="https://github.com/elastic/kibana/assets/90178898/bafdd556-c837-414d-8bbc-26a4463a8390"> - Go to System integration / Existing policies / Edit integration - Verify that the require root callout is visible with data stream info <img width="901" alt="image" src="https://github.com/elastic/kibana/assets/90178898/793ace68-7618-482e-a200-6b831d293c99"> - For package where all data streams require root, the callout is unchanged. <img width="876" alt="image" src="https://github.com/elastic/kibana/assets/90178898/902f7d3c-ddbc-4131-a19d-341aa1209430"> <img width="878" alt="image" src="https://github.com/elastic/kibana/assets/90178898/085e32df-033d-41ca-9805-5414854d9750"> - The require root callout is removed from the submit confirmation modal. <img width="1135" alt="image" src="https://github.com/elastic/kibana/assets/90178898/e360d74b-09d1-4a41-b2ff-f4a36656e3d4"> ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
5a74376
commit 8ecee1f
Showing
8 changed files
with
75 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 0 additions & 103 deletions
103
...eet/sections/agent_policy/create_package_policy_page/single_page_layout/confirm_modal.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...leet/sections/agent_policy/create_package_policy_page/single_page_layout/root_callout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiCallOut } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import React from 'react'; | ||
|
||
interface Props { | ||
dataStreams: Array<{ name: string; title: string }>; | ||
} | ||
|
||
export const RootPrivilegesCallout: React.FC<Props> = ({ dataStreams }) => { | ||
return ( | ||
<EuiCallOut | ||
size="m" | ||
color="warning" | ||
title={ | ||
<FormattedMessage | ||
id="xpack.fleet.createPackagePolicy.requireRootCalloutTitle" | ||
defaultMessage="Requires root privileges" | ||
/> | ||
} | ||
data-test-subj="rootPrivilegesCallout" | ||
> | ||
{dataStreams.length === 0 ? ( | ||
<FormattedMessage | ||
id="xpack.fleet.createPackagePolicy.requireRootCalloutDescription" | ||
defaultMessage="Elastic Agent needs to be run with root/administrator privileges for this integration." | ||
/> | ||
) : ( | ||
<> | ||
<FormattedMessage | ||
id="xpack.fleet.addIntegration.confirmModal.unprivilegedAgentsDataStreamsMessage" | ||
defaultMessage="This integration has the following data streams that require Elastic Agents to have root privileges. To ensure that all data required by the integration can be collected, enroll agents using an account with root privileges." | ||
/> | ||
<ul> | ||
{dataStreams.map((item) => ( | ||
<li key={item.name}>{item.title}</li> | ||
))} | ||
</ul> | ||
</> | ||
)} | ||
</EuiCallOut> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.