Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix styles in deploy new agent section #4830

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

chantal-kelm
Copy link
Member

@chantal-kelm chantal-kelm commented Nov 8, 2022

Description

In Wazuh info, in the 'Deploy new agent' section, the OS and versions were not displayed correctly.

Evidence

This is what Wazuh Info used to look like:

image (10)

This is what it looks like now:

image

Steps to test:

*Go to the Agents tab
*Click on the 'Deploy new agent' button.
*Verify that the styles are displayed correctly.

@chantal-kelm chantal-kelm requested a review from a team as a code owner November 8, 2022 17:45
Copy link
Contributor

@Mayons95 Mayons95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

We saw witch @chantal-kelm that the option for Suse 12 has the same problem as before.

@chantal-kelm chantal-kelm changed the title fix: OS version styles Fix styles in deploy new agent section Nov 9, 2022
@chantal-kelm chantal-kelm self-assigned this Nov 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Code coverage (Jest) % values
Statements 8.48% ( 3120 / 36784 )
Branches 4.35% ( 1244 / 28564 )
Functions 7.36% ( 672 / 9127 )
Lines 8.54% ( 3009 / 35209 )

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

image

@Mayons95 Mayons95 self-requested a review November 9, 2022 12:46
Copy link
Contributor

@Mayons95 Mayons95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TR: ✔️

image

@chantal-kelm chantal-kelm merged commit aa360f9 into 4.4-2.3-wzd Nov 9, 2022
@chantal-kelm chantal-kelm deleted the fix-os-version-styles branch November 9, 2022 12:49
Comment on lines +129 to 135
.euiButtonGroup__buttons {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(5, 1fr);
grid-gap: 10px;
padding: 0 3px;
box-shadow: none;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this a class of the @elastic/eui? If it does, we should ensure only to affect the UI of the Wazuh plugin. This could be modifying the styles of plugins of the platform.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in this PR

Comment on lines +141 to 144
.euiButtonGroup--medium .euiButtonGroupButton:not(:first-child), .euiButtonGroup--small .euiButtonGroupButton:not(:first-child) {
margin-left: 0 !important;

}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this a class of the @elastic/eui? If it does, we should ensure only to affect the UI of the Wazuh plugin. This could be modifying the styles of plugins of the platform.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: For another hand, this pull request has as its base the branch 4.4-2.3-wzd, which is a plugin compatible with Wazuh dashboard based on OpenSearch Dashboards 2.3.0. This version of OpenSearch is using a forked UI library, https://github.com/opensearch-project/OpenSearch-Dashboards/blob/2.3.0/package.json#L111, and it seems the class names are prefixed by oui instead of eui https://github.com/opensearch-project/oui/blob/1.0.0/src/components/button/button_group/_button_group_button.scss#L122. Is these styles applying?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: For another hand, this pull request has as its base the branch 4.4-2.3-wzd, which is a plugin compatible with Wazuh dashboard based on OpenSearch Dashboards 2.3.0. This version of OpenSearch is using a forked UI library, https://github.com/opensearch-project/OpenSearch-Dashboards/blob/2.3.0/package.json#L111, and it seems the class names are prefixed by oui instead of eui https://github.com/opensearch-project/oui/blob/1.0.0/src/components/button/button_group/_button_group_button.scss#L122. Is these styles applying?

I was testing the branch and it is working. It seems that the UI library contains components from @elastic/eui and oui components.

Anyways, we should ensure that the modified styles only happen in the Wazuh plugin.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in this PR

display: grid;
grid-template-columns: repeat(5, 1fr);
grid-gap: 10px;
.message {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: this class name is generic and could have conflicts with the styles of other plugins, we should use scoped names, for example prefixing it with wz, wazuh.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in this PR

@chantal-kelm chantal-kelm linked an issue Nov 10, 2022 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include instructions for all supported OS in agent enrollment
4 participants