Skip to content

Commit

Permalink
[Cloud Security] Improve integration installation titles and layout (#…
Browse files Browse the repository at this point in the history
…166014)

## Summary


Closes -> [Cloud Security] Improve integration installation titles and
layout #164443

The size of the sub-title "Setup Access" has been adjusted and with it,
the margin too.
The Form with (Name, Description) is moved to above the scope selection
and the description for the scope selection has also been adjusted as
per request in the issue discussion.

![localhost_5601_cxf_app_fleet_integrations_cloud_security_posture-1 5
2_add-integration_cspm
(1)](https://github.com/elastic/kibana/assets/27354444/75484c19-b017-457b-91c3-b81f568f6362)


![localhost_5601_cxf_app_fleet_integrations_cloud_security_posture-1 5
2_add-integration_cspm
(2)](https://github.com/elastic/kibana/assets/27354444/7382b3f4-740b-4891-8ce3-07d91153bbc0)

![localhost_5601_yjd_app_fleet_integrations_cloud_security_posture-1 5
2_add-integration](https://github.com/elastic/kibana/assets/27354444/7b0cb798-a11a-4276-841b-b671141ba83e)



### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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)

---------

Co-authored-by: Paulo Henrique <[email protected]>
  • Loading branch information
raphael3213 and opauloh authored Sep 12, 2023
1 parent adf73ca commit b191dba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ interface AWSSetupInfoContentProps {
const AWSSetupInfoContent = ({ integrationLink }: AWSSetupInfoContentProps) => {
return (
<>
<EuiHorizontalRule margin="xxl" />
<EuiTitle size="s">
<EuiHorizontalRule margin="xl" />
<EuiTitle size="xs">
<h2>
<FormattedMessage
id="xpack.csp.awsIntegration.setupInfoContentTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import { getPosturePolicy, NewPackagePolicyPostureInput } from './utils';

const AWSSetupInfoContent = () => (
<>
<EuiHorizontalRule margin="xxl" />
<EuiTitle size="s">
<EuiHorizontalRule margin="xl" />
<EuiTitle size="xs">
<h2>
<FormattedMessage
id="xpack.csp.eksIntegration.setupInfoContentTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export const CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS = {
type SetupFormatGCP = 'google_cloud_shell' | 'manual';
const GCPSetupInfoContent = () => (
<>
<EuiHorizontalRule margin="xxl" />
<EuiSpacer size="s" />
<EuiTitle size="s">
<EuiHorizontalRule margin="xl" />
<EuiTitle size="xs">
<h2>
<FormattedMessage
id="xpack.csp.gcpIntegration.setupInfoContentTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const AwsAccountTypeSelect = ({
<EuiText color="subdued" size="s">
<FormattedMessage
id="xpack.csp.fleetIntegration.awsAccountTypeDescriptionLabel"
defaultMessage="Select between single account or organization, and then fill in the name and description to help identify this integration."
defaultMessage="Select between single account or organization."
/>
</EuiText>
<EuiSpacer size="l" />
Expand Down Expand Up @@ -227,7 +227,6 @@ const AwsAccountTypeSelect = ({
</EuiText>
</>
)}
<EuiSpacer size="l" />
</>
);
};
Expand All @@ -248,7 +247,7 @@ const GcpAccountTypeSelect = ({
<EuiText color="subdued" size="s">
<FormattedMessage
id="xpack.csp.fleetIntegration.gcpAccountTypeDescriptionLabel"
defaultMessage="Select between single account or organization, and then fill in the name and description to help identify this integration."
defaultMessage="Select between single account or organization."
/>
</EuiText>
<EuiSpacer size="l" />
Expand All @@ -274,7 +273,6 @@ const GcpAccountTypeSelect = ({
defaultMessage="Deploying to a single account is suitable for an initial POC. To ensure complete coverage, it is strongly recommended to deploy CSPM at the organization-level, which automatically connects all accounts (both current and future)."
/>
</EuiText>
<EuiSpacer size="l" />
</>
);
};
Expand Down Expand Up @@ -436,6 +434,13 @@ export const CspPolicyTemplateForm = memo<PackagePolicyReplaceDefineStepExtensio
/>
<EuiSpacer size="l" />

{/* Defines the name/description */}
<IntegrationSettings
fields={integrationFields}
onChange={(field, value) => updatePolicy({ ...newPolicy, [field]: value })}
/>
<EuiSpacer size="l" />

{/* AWS account type selection box */}
{input.type === 'cloudbeat/cis_aws' && (
<AwsAccountTypeSelect
Expand All @@ -455,11 +460,6 @@ export const CspPolicyTemplateForm = memo<PackagePolicyReplaceDefineStepExtensio
/>
)}

{/* Defines the name/description */}
<IntegrationSettings
fields={integrationFields}
onChange={(field, value) => updatePolicy({ ...newPolicy, [field]: value })}
/>
{/* Defines the vars of the enabled input of the active policy template */}
<PolicyTemplateVarsForm
input={input}
Expand Down

0 comments on commit b191dba

Please sign in to comment.