-
Notifications
You must be signed in to change notification settings - Fork 182
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
Interactive guide for registering agents #1468
Comments
Update Today I have continued to improve my react knowledge, and I have advanced almost finishing the issue. I found this problem during the morning as I navigated through the component: It turned out to be due to the syntax of how the installation instructions showed conditionally. Wrong behavior if (this.state.selectedOS === 'win') {
guide = (
<div>
<EuiText>
<p>Deploy the installation</p>
<EuiCodeBlock language="js">
{winText}
</EuiCodeBlock>
</EuiText>
</div>
);
} else if (this.state.selectedOS === 'macos') {
guide = (
<div>
<EuiText>
<p>Deploy the installation</p>
<EuiCodeBlock language="js">
{macosText}
</EuiCodeBlock>
</EuiText>
</div>
);
} Good behavior {this.state.selectedOS === 'win' ? (
<EuiText>
<p>Deploy the installation</p>
<EuiCodeBlock language="js">
{winText}
</EuiCodeBlock>
</EuiText>
) : (<EuiFlexItem />)}
{this.state.selectedOS === 'macos' ? (
<EuiText>
<p>Deploy the installation</p>
<EuiCodeBlock language="js">
{macosText}
</EuiCodeBlock>
</EuiText>
) : (<EuiFlexItem />)} Finally this is the aspect that is currently almost finished. I still have to make the button to copy the code in the |
Update I implemented de copy function in this way: Now, the last point remaining is how to manage the no-agents scenario. We need to avoid this flick while it's searching agents and finally, there are not any agents yet: |
Update The flick on the component shown has been fixed checking if the On the other hand, the copy method that had implemented yesterday has been replaced by the |
Update Today I did some refactoring on the render method of the component, doing the load of the guide steps cleaner and less repetitive. I use a loop with dynamic fields name to get the titles and content text of every step (for the selected OS). This snippet shows it: |
Update I've changed the multi instructions in every OS to leaving only the installation command. |
Hi team,
This issue is the second part of #1320 that unfortunately was not finished properly and we must complete it before 3.10.
Description
Give the user a new component where he can fill a simple (and dynamic) form and the app tells you how to install the agent with just a copy & paste commands from a dynamic box.
We must use the new syntax for auto-deployment that the @wazuh/cicd team implemented for the users, an example can be found here https://documentation.wazuh.com/current/installation-guide/installing-wazuh-agent/wazuh_agent_linux_rpm.html#installing-wazuh-agent
Proposal
Create a new React component that we can use where we want in the Wazuh app. The agents preview must know if there are no agents, then show it by default. If there are agents, it should show a link or a button that enables this component.
We must cover at least the most common agent types: RPM, DEB, Windows and MacOS.
The text was updated successfully, but these errors were encountered: