From 2de5175eb54c7f4b032f1eb2e6360db0d12b877b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chantal=20Bel=C3=A9n=20kelm?= <99441266+chantal-kelm@users.noreply.github.com> Date: Thu, 22 Dec 2022 10:06:44 -0300 Subject: [PATCH 1/3] Fix deploy new agent section (#4933) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * accordion and alpine os * changes * changes * changes * changes * alpine versions commands * commands for alpine and architecture macos * message install and start alpine * CHANGELOG * command debian * command raspbian * Added link for additional steps to alpine os and changelog * clear code * clean code * fixed windows command * deploy new agent section: command fixed for solaris * Fix the agent installation command for macOS (#4968) * Fixed the agent installation command for macOS * CHANGELOG * Update CHANGELOG.md * Fix agent deployment instructions for HP-UX and Solaris (#4943) * removing auto-deploy variables in hp and solaris * hide wazuh server address sections, assign group and assign name to agent when os is hp or solaris * update hp command * removing auto-deploy variables in alpine * move message additional installation steps * links and messages os * changelog * red hat, centos and windows commands fixed * Deploy new agent section: change the commands for all os * Deploy new agent section: change commands for all os * clean code * update commands * Deploy new agents: Update commands * Deploy new agents: Update commands * comand windows * oracleLinux command * warningcOMAND Co-authored-by: Álex (cherry picked from commit 549edd0e1cc989c8f97056aff2185a9485108658) --- CHANGELOG.md | 6 + .../agent/components/register-agent.js | 527 ++++++++++-------- .../agent/components/wz-accordion.tsx | 59 ++ .../controllers/agent/wazuh-config/index.ts | 164 +++--- public/styles/component.scss | 112 ++-- 5 files changed, 508 insertions(+), 360 deletions(-) create mode 100644 public/controllers/agent/components/wz-accordion.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ecb45bd8..84b7014d40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ All notable changes to the Wazuh app project will be documented in this file. - Added powerPC architecture in redhat7, in the section 'Deploy new agent'. [#4833](https://github.com/wazuh/wazuh-kibana-app/pull/4833) - Added a centralized service to handle the requests [#4831](https://github.com/wazuh/wazuh-kibana-app/pull/4831) - Added data-test-subj create policy [#4873](https://github.com/wazuh/wazuh-kibana-app/pull/4873) +- Added extra steps message and new command for windows xp and windows server 2008, added alpine agent with all its steps. [#4933](https://github.com/wazuh/wazuh-kibana-app/pull/4933) +- Deploy new agent section: Added link for additional steps to alpine os. [#4933](https://github.com/wazuh/wazuh-kibana-app/pull/4933) - Added file saving conditions in File Editor [#4970](https://github.com/wazuh/wazuh-kibana-app/pull/4970) - Added character validation to avoid invalid agent names in the section 'Deploy new agent'. [#5021](https://github.com/wazuh/wazuh-kibana-app/pull/5021) [#5028](https://github.com/wazuh/wazuh-kibana-app/pull/5028) - Deploy new agent section: Added link for additional steps to alpine os. [#4933](https://github.com/wazuh/wazuh-kibana-app/pull/4933) @@ -58,6 +60,10 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed agent deployment instructions for HP-UX and Solaris. [#4943](https://github.com/wazuh/wazuh-kibana-app/pull/4943) - Fixed a bug that caused the flyouts to close when clicking inside them [#4638](https://github.com/wazuh/wazuh-kibana-app/pull/4638) - Fixed the manager option in the agent deployment section [#4981](https://github.com/wazuh/wazuh-kibana-app/pull/4981) +- Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4962](https://github.com/wazuh/wazuh-kibana-app/pull/4962) +- Fixed agent installation command for macOS in the deploy new agent section. [#4968](https://github.com/wazuh/wazuh-kibana-app/pull/4968) +- Deploy new agent section: Fixed the way macos versions and architectures were displayed, fixed the way agents were displayed, fixed the way ubuntu versions were displayed. [#4933](https://github.com/wazuh/wazuh-kibana-app/pull/4933) +- Fixed agent deployment instructions for HP-UX and Solaris. [#4943](https://github.com/wazuh/wazuh-kibana-app/pull/4943) - Fixed Inventory checks table filters by stats [#4999](https://github.com/wazuh/wazuh-kibana-app/pull/4999) - Fixed agent graph in opensearch dashboard [#4942] (https://github.com/wazuh/wazuh-kibana-app/pull/4942) - Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4962](https://github.com/wazuh/wazuh-kibana-app/pull/4962) diff --git a/public/controllers/agent/components/register-agent.js b/public/controllers/agent/components/register-agent.js index 30d906d871..46a577fa5c 100644 --- a/public/controllers/agent/components/register-agent.js +++ b/public/controllers/agent/components/register-agent.js @@ -9,7 +9,7 @@ * * Find more information about this on the LICENSE file. */ -import React, { Component, Fragment } from 'react'; +import React, { Component, Fragment, useState } from 'react'; import { version } from '../../../../package.json'; import { WazuhConfig } from '../../../react-services/wazuh-config'; import { @@ -61,7 +61,7 @@ import { versionButtonsRedHat, versionButtonsCentos, architectureButtonsMacos, - osButtons, + osPrincipalButtons, versionButtonsDebian, versionButtonsUbuntu, versionButtonsWindows, @@ -70,6 +70,7 @@ import { versionButtonsSolaris, versionButtonsAix, versionButtonsHPUX, + versionButtonAlpine, } from '../wazuh-config'; import './register-agent.scss'; import ServerAddress from '../register-agent/steps/server-address'; @@ -77,6 +78,7 @@ import { getConnectionConfig, fetchClusterNodesOptions, } from './register-agent-service'; +import { PrincipalButtonGroup } from './wz-accordion'; export const RegisterAgent = withErrorBoundary( class RegisterAgent extends Component { @@ -85,6 +87,13 @@ export const RegisterAgent = withErrorBoundary( this.wazuhConfig = new WazuhConfig(); this.configuration = this.wazuhConfig.getConfig(); this.addToVersion = '-1'; + this.wazuhRpmVariable = '/wazuh-agent.rpm'; + this.wazuhDebVariable = '/wazuh-agent.deb'; + this.wazuhMsiVariable = '/wazuh-agent.msi'; + this.wazuhPkgVariable = '/wazuh-agent.pkg'; + this.wazuhP5pVariable = '/wazuh-agent.p5p'; + this.wazuhTarVariable = '/wazuh-agent.tar'; + this.state = { status: 'incomplete', selectedOS: '', @@ -106,6 +115,7 @@ export const RegisterAgent = withErrorBoundary( showPassword: false, showProtocol: true, connectionSecure: true, + isAccordionOpen: false, }; this.restartAgentCommand = { rpm: this.systemSelector(), @@ -237,7 +247,6 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion === 'debian10' || this.state.selectedVersion === 'busterorgreater' || this.state.selectedVersion === 'ubuntu15' || - this.state.selectedVersion === 'ubuntu16' || this.state.selectedVersion === 'leap15' ) { return 'sudo systemctl daemon-reload\nsudo systemctl enable wazuh-agent\nsudo systemctl start wazuh-agent'; @@ -258,22 +267,15 @@ export const RegisterAgent = withErrorBoundary( systemSelectorNet() { if ( this.state.selectedVersion === 'windowsxp' || - this.state.selectedVersion === 'windows8' + this.state.selectedVersion === 'windowsserver2008' || + this.state.selectedVersion === 'windows7' ) { return 'NET START WazuhSvc'; } } systemSelectorWazuhControlMacos() { - if ( - this.state.selectedVersion == 'sierra' || - this.state.selectedVersion == 'highSierra' || - this.state.selectedVersion == 'mojave' || - this.state.selectedVersion == 'catalina' || - this.state.selectedVersion == 'bigSur' || - this.state.selectedVersion == 'monterrey' || - this.state.selectedVersion == 'ventura' - ) { + if (this.state.selectedVersion == 'sierra') { return '/Library/Ossec/bin/wazuh-control start'; } } @@ -304,12 +306,15 @@ export const RegisterAgent = withErrorBoundary( setAgentName(event) { const validation = /^[a-z0-9-_.]+$/i; - if ((validation.test(event.target.value) && event.target.value.length >= 2) - || event.target.value.length <= 0) { + if ( + (validation.test(event.target.value) && + event.target.value.length >= 2) || + event.target.value.length <= 0 + ) { this.setState({ agentName: event.target.value, agentNameError: false, - badCharacters: [] + badCharacters: [], }); } else { let badCharacters = event.target.value @@ -323,7 +328,7 @@ export const RegisterAgent = withErrorBoundary( this.setState({ agentName: event.target.value, badCharacters: characters, - agentNameError: true + agentNameError: true, }); } } @@ -424,29 +429,29 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'redhat5-i386': - return `https://packages.wazuh.com/4.x/yum5/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum5/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm${this.wazuhRpmVariable}`; case 'redhat5-x86_64': - return `https://packages.wazuh.com/4.x/yum5/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum5/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.x86_64.rpm${this.wazuhRpmVariable}`; case 'redhat6-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'redhat6-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'redhat6-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'redhat6-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'redhat7-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'redhat7-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'redhat7-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'redhat7-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'redhat7-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -455,17 +460,17 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case '3.12.12-i386': - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; case '3.12.12-aarch64': - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; case '3.12.12-x86_64': - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; case '3.12.12-armhf': - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; case '3.12.12-powerpc': - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; default: - return 'https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; + return 'https://packages.wazuh.com/key/cicd%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main"'; } } @@ -474,25 +479,25 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'oraclelinux5-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'oraclelinux5-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'oraclelinux5-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'oraclelinux5-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'oraclelinux5-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; case 'oraclelinux6-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'oraclelinux6-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'oraclelinux6-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'oraclelinux6-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -501,29 +506,29 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'centos5-i386': - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm${this.wazuhRpmVariable}`; case 'centos5-x86_64': - return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.x86_64.rpm${this.wazuhRpmVariable}`; case 'centos6-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'centos6-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'centos6-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'centos6-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'centos7-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'centos7-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'centos7-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'centos7-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'centos7-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -532,21 +537,21 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'suse11-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'suse11-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'suse12-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'suse12-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'suse12-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'suse12-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'suse12-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -555,17 +560,17 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case '22-i386': - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.el5.i386.rpm${this.wazuhRpmVariable}`; case '22-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case '22-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case '22-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case '22-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -574,52 +579,52 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'amazonlinux1-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'amazonlinux1-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux1-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux1-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'amazonlinux1-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2-powerpc': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.ppc64le.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2022-i386': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.i386.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2022-aarch64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aarch64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2022-x86_64': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'amazonlinux2022-armhf': - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } resolveDEBPackage() { switch (`${this.state.selectedArchitecture}`) { case 'i386': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb${this.wazuhDebVariable}`; case 'aarch64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb${this.wazuhDebVariable}`; case 'armhf': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb${this.wazuhDebVariable}`; case 'x86_64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; case 'powerpc': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}.ppc64el.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_ppc64el.deb${this.wazuhDebVariable}`; default: - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; } } @@ -628,17 +633,17 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'busterorgreater-i386': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb${this.wazuhDebVariable}`; case 'busterorgreater-aarch64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb${this.wazuhDebVariable}`; case 'busterorgreater-armhf': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb${this.wazuhDebVariable}`; case 'busterorgreater-x86_64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; case 'busterorgreater-powerpc': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}.ppc64el.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_ppc64el.deb${this.wazuhDebVariable}`; default: - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; } } @@ -647,23 +652,23 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'ubuntu14-i386': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb${this.wazuhDebVariable}`; case 'ubuntu14-aarch64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb${this.wazuhDebVariable}`; case 'ubuntu14-armhf': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb${this.wazuhDebVariable}`; case 'ubuntu14-x86_64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; case 'ubuntu15-i386': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_i386.deb${this.wazuhDebVariable}`; case 'ubuntu15-aarch64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_arm64.deb${this.wazuhDebVariable}`; case 'ubuntu15-armhf': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_armhf.deb${this.wazuhDebVariable}`; case 'ubuntu15-x86_64': - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; default: - return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb`; + return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}${this.addToVersion}_amd64.deb${this.wazuhDebVariable}`; } } @@ -672,28 +677,28 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'leap15-x86_64': - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; case 'leap15-ARM64': - return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm`; + return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.armv7hl.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } resolveSOLARISPackage() { switch ( - `${this.state.selectedVersion}-${this.state.selectedArchitecture}` + `${this.state.selectedVersion}-${this.state.selectedArchitecture}``${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'solaris10-i386': - return `https://packages.wazuh.com/4.x/solaris/i386/10/wazuh-agent_v${this.state.wazuhVersion}-sol10-i386.pkg`; + return `https://packages.wazuh.com/4.x/solaris/i386/10/wazuh-agent_v${this.state.wazuhVersion}-sol10-i386.pkg${this.wazuhPkgVariable}`; case 'solaris10-sparc': - return `https://packages.wazuh.com/4.x/solaris/sparc/10/wazuh-agent_v${this.state.wazuhVersion}-sol10-sparc.pkg`; + return `https://packages.wazuh.com/4.x/solaris/sparc/10/wazuh-agent_v${this.state.wazuhVersion}-sol10-sparc.pkg${this.wazuhPkgVariable}`; case 'solaris11-i386': - return `https://packages.wazuh.com/4.x/solaris/i386/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-i386.p5p`; + return `https://packages.wazuh.com/4.x/solaris/i386/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-i386.p5p${this.wazuhP5pVariable}`; case 'solaris11-sparc': - return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-sparc.p5p`; + return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-sparc.p5p${this.wazuhP5pVariable}`; default: - return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-sparc.p5p`; + return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent_v${this.state.wazuhVersion}-sol11-sparc.p5p${this.wazuhP5pVariable}`; } } @@ -702,20 +707,20 @@ export const RegisterAgent = withErrorBoundary( `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case '6.1 TL9-powerpc': - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aix.ppc.rpm`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aix.ppc.rpm${this.wazuhRpmVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aix.ppc.rpm`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.aix.ppc.rpm${this.wazuhRpmVariable}`; } } resolveHPPackage() { switch ( - `${this.state.selectedVersion}-${this.state.selectedArchitecture}` + `${this.state.selectedVersion}-${this.state.selectedArchitecture}``${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case '11.31-itanium2': - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}-hpux-11v3-ia64.tar`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}-hpux-11v3-ia64.tar${this.wazuhTarVariable}`; default: - return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}-hpux-11v3-ia64.tar`; + return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}-hpux-11v3-ia64.tar${this.wazuhTarVariable}`; } } @@ -750,7 +755,7 @@ export const RegisterAgent = withErrorBoundary( case 'alpine': return this.resolveAlpinePackage(); default: - return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm`; + return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}.x86_64.rpm${this.wazuhRpmVariable}`; } } @@ -864,6 +869,13 @@ export const RegisterAgent = withErrorBoundary( ? ['OS architecture'] : []), ]; + case 'alpine': + return [ + ...(!this.state.selectedVersion ? ['OS version'] : []), + ...(this.state.selectedVersion && !this.state.selectedArchitecture + ? ['OS architecture'] + : []), + ]; default: return []; } @@ -876,6 +888,7 @@ export const RegisterAgent = withErrorBoundary( return 'bash'; } } + render() { const appVersionMajorDotMinor = this.state.wazuhVersion .split('.') @@ -898,8 +911,12 @@ export const RegisterAgent = withErrorBoundary( ` "${char}"`)} ${this.state.badCharacters.length <= 1 ? 'is' : 'are'} not valid. Allowed characters are A-Z, a-z, ".", "-", "_"`, @@ -956,50 +973,56 @@ export const RegisterAgent = withErrorBoundary( const codeBlock = { zIndex: '100', }; + const customTexts = { rpmText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, + alpineText: `wget -O /etc/apk/keys/cicd@wazuh.com-633d7457.rsa.pub ${this.optionalPackages()} >> /etc/apk/repositories && \ +apk update && \ +apk add wazuh-agent`, centText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, - debText: `curl -so wazuh-agent-${ - this.state.wazuhVersion - }.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i ./wazuh-agent-${ - this.state.wazuhVersion - }.deb`, - ubuText: `curl -so wazuh-agent-${ - this.state.wazuhVersion - }.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i ./wazuh-agent-${ - this.state.wazuhVersion - }.deb`, - macosText: `curl -so wazuh-agent-${ - this.state.wazuhVersion - }.pkg https://packages.wazuh.com/4.x/macos/wazuh-agent-${ - this.state.wazuhVersion - }-1.pkg && sudo launchctl setenv ${this.optionalDeploymentVariables()}${this.agentNameVariable()}&& sudo installer -pkg ./wazuh-agent-${ - this.state.wazuhVersion - }.pkg -target /`, - winText: `Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-${ - this.state.wazuhVersion - }-1.msi -OutFile \${env:tmp}\\wazuh-agent-${ - this.state.wazuhVersion - }.msi; msiexec.exe /i \${env:tmp}\\wazuh-agent-${ + debText: `curl -so wazuh-agent.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i .${ + this.wazuhDebVariable + }`, + ubuText: `curl -so wazuh-agent.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i .${ + this.wazuhDebVariable + }`, + macosText: `curl -so wazuh-agent.pkg https://packages.wazuh.com/4.x/macos/wazuh-agent-${ this.state.wazuhVersion - }.msi /q ${this.optionalDeploymentVariables()}${this.agentNameVariable()}`, - openText: `sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()} zypper install -y ${this.optionalPackages()}`, - solText: `sudo curl -so wazuh-agent.p5p ${this.optionalPackages()}/wazuh-agent.p5p ${this.agentNameVariable()}&& ${ + }-1.pkg${ + this.wazuhPkgVariable + } && sudo launchctl setenv ${this.optionalDeploymentVariables()}${this.agentNameVariable()}&& sudo installer -pkg .${ + this.wazuhPkgVariable + } -target /`, + winText: + this.state.selectedVersion == 'windowsxp' || + this.state.selectedVersion == 'windowsserver2008' + ? `msiexec.exe /i wazuh-agent-${ + this.state.wazuhVersion + }-1.msi /q ${this.optionalDeploymentVariables()}${this.agentNameVariable()}` + : `Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-${ + this.state.wazuhVersion + }-1.msi${ + this.wazuhMsiVariable + } -OutFile \${env:tmp}\\wazuh-agent.msi; msiexec.exe /i \${env:tmp}\\wazuh-agent.msi /q ${this.optionalDeploymentVariables()}${this.agentNameVariable()}`, + openText: `sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}zypper install -y ${this.optionalPackages()}`, + solText: `sudo curl -so ${ + this.state.selectedVersion == 'solaris11' + ? 'wazuh-agent.p5p' + : 'wazuh-agent.pkg' + } ${this.optionalPackages()}${this.agentNameVariable()} && ${ this.state.selectedVersion == 'solaris11' ? 'pkg install -g wazuh-agent.p5p wazuh-agent' : 'pkgadd -d wazuh-agent.pkg' }`, aixText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}rpm -ivh ${this.optionalPackages()}`, - hpText: `cd / && sudo curl -so ${this.optionalPackages()} && sudo groupadd wazuh && sudo useradd -G wazuh wazuh && sudo tar -xvf wazuh-agent.tar`, + hpText: `cd / && sudo curl -so wazuh-agent.tar ${this.optionalPackages()} && sudo groupadd wazuh && sudo useradd -G wazuh wazuh && sudo tar -xvf wazuh-agent.tar`, amazonlinuxText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, fedoraText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, oraclelinuxText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, suseText: `sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}yum install -y ${this.optionalPackages()}`, - raspbianText: `curl -so wazuh-agent-${ - this.state.wazuhVersion - }.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i ./wazuh-agent-${ - this.state.wazuhVersion - }.deb`, + raspbianText: `curl -so wazuh-agent.deb ${this.optionalPackages()} && sudo ${this.optionalDeploymentVariables()}${this.agentNameVariable()}dpkg -i .${ + this.wazuhDebVariable + }`, }; const field = `${this.state.selectedOS}Text`; @@ -1040,6 +1063,7 @@ export const RegisterAgent = withErrorBoundary(

); + const windowsAdvice = this.state.selectedOS === 'win' && ( <> @@ -1106,8 +1130,17 @@ export const RegisterAgent = withErrorBoundary( /> {windowsAdvice} - {this.state.selectedVersion == 'windowsxp' || - this.state.selectedVersion == 'windowsserver2008' ? ( + {this.state.selectedVersion === 'windowsxp' && ( + <> + + + + )} + {this.state.selectedVersion === 'windowsserver2008' && ( <> - ) : ( - '' )}
@@ -1289,6 +1320,26 @@ export const RegisterAgent = withErrorBoundary( /> {windowsAdvice} + {this.state.selectedVersion === 'windowsxp' && ( + <> + + + + )} + {this.state.selectedVersion === 'windowsserver2008' && ( + <> + + + + )}
{this.state.wazuhPassword && !this.state.showPassword @@ -1327,6 +1378,26 @@ export const RegisterAgent = withErrorBoundary( /> {windowsAdvice} + {this.state.selectedVersion === 'windowsxp' && ( + <> + + + + )} + {this.state.selectedVersion === 'windowsserver2008' && ( + <> + + + + )}
{this.state.wazuhPassword && !this.state.showPassword @@ -1515,6 +1586,9 @@ export const RegisterAgent = withErrorBoundary( {this.state.selectedOS == 'hp' || this.state.selectedOS == 'sol' ? messageExtraSteps : ''} + {this.state.selectedOS == 'hp' || this.state.selectedOS == 'sol' + ? messageExtraSteps + : ''} ), @@ -1588,11 +1662,13 @@ export const RegisterAgent = withErrorBoundary( const steps = [ { title: 'Choose the operating system', - children: buttonGroup( - 'Choose the Operating system', - osButtons, - this.state.selectedOS, - os => this.selectOS(os), + children: ( + this.selectOS(os)} + /> ), }, ...(this.state.selectedOS == 'rpm' @@ -1703,20 +1779,12 @@ export const RegisterAgent = withErrorBoundary( ? [ { title: 'Choose the version', - children: - this.state.selectedVersion == 'windowsxp' - ? buttonGroupWithMessage( - 'Choose the version', - versionButtonsWindows, - this.state.selectedVersion, - version => this.setVersion(version), - ) - : buttonGroup( - 'Choose the version', - versionButtonsWindows, - this.state.selectedVersion, - version => this.setVersion(version), - ), + children: buttonGroup( + 'Choose the version', + versionButtonsWindows, + this.state.selectedVersion, + version => this.setVersion(version), + ), }, ] : []), @@ -1798,10 +1866,7 @@ export const RegisterAgent = withErrorBoundary( }, ] : []), - ...(this.state.selectedVersion == 'centos5' || - this.state.selectedVersion == 'redhat5' || - this.state.selectedVersion == 'oraclelinux5' || - this.state.selectedVersion == 'suse11' + ...(this.state.selectedOS == 'alpine' ? [ { title: 'Choose the version', @@ -1843,6 +1908,19 @@ export const RegisterAgent = withErrorBoundary( }, ] : []), + ...(this.state.selectedVersion == '3.12.12' + ? [ + { + title: 'Choose the architecture', + children: buttonGroup( + 'Choose the architecture', + architectureButtonsWithPPC64LE, + this.state.selectedArchitecture, + architecture => this.setArchitecture(architecture), + ), + }, + ] + : []), ...(this.state.selectedVersion == 'centos6' || this.state.selectedVersion == 'oraclelinux6' || this.state.selectedVersion == 'amazonlinux1' || @@ -1851,8 +1929,7 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion == 'debian7' || this.state.selectedVersion == 'debian8' || this.state.selectedVersion == 'ubuntu14' || - this.state.selectedVersion == 'ubuntu15' || - this.state.selectedVersion == 'ubuntu16' + this.state.selectedVersion == 'ubuntu15' ? [ { title: 'Choose the architecture', @@ -1886,7 +1963,8 @@ export const RegisterAgent = withErrorBoundary( ] : []), ...(this.state.selectedVersion == 'windowsxp' || - this.state.selectedVersion == 'windows8' + this.state.selectedVersion == 'windowsserver2008' || + this.state.selectedVersion == 'windows7' ? [ { title: 'Choose the architecture', @@ -1899,13 +1977,7 @@ export const RegisterAgent = withErrorBoundary( }, ] : []), - ...(this.state.selectedVersion == 'sierra' || - this.state.selectedVersion == 'highSierra' || - this.state.selectedVersion == 'mojave' || - this.state.selectedVersion == 'catalina' || - this.state.selectedVersion == 'bigSur' || - this.state.selectedVersion == 'monterrey' || - this.state.selectedVersion == 'ventura' + ...(this.state.selectedVersion == 'sierra' ? [ { title: 'Choose the architecture', @@ -2004,47 +2076,26 @@ export const RegisterAgent = withErrorBoundary( }, ] : []), - ...(!( - this.state.selectedOS == 'hp' || - this.state.selectedOS == 'sol' || - this.state.selectedOS == 'alpine' - ) - ? [ - { - title: 'Install and enroll the agent', - children: this.state.gotErrorRegistrationServiceInfo ? ( - calloutErrorRegistrationServiceInfo - ) : missingOSSelection.length ? ( - - ) : ( -
{guide}
- ), - }, - ] - : [ - { - title: 'Install the agent', - children: this.state.gotErrorRegistrationServiceInfo ? ( - calloutErrorRegistrationServiceInfo - ) : missingOSSelection.length ? ( - - ) : ( -
{guide}
- ), - }, - ]), + { + title: 'Install and enroll the agent', + children: this.state.gotErrorRegistrationServiceInfo ? ( + calloutErrorRegistrationServiceInfo + ) : this.state.agentNameError ? ( + + ) : missingOSSelection.length ? ( + + ) : ( +
{guide}
+ ), + }, ...(this.state.selectedOS == 'rpm' || this.state.selectedOS == 'cent' || this.state.selectedOS == 'suse' || @@ -2097,11 +2148,11 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion == 'busterorgreater' || this.state.selectedVersion == 'busterorgreater' || this.state.selectedVersion === 'ubuntu15' || - this.state.selectedVersion === 'ubuntu16' || this.state.selectedVersion === 'leap15' ? tabSystemD : this.state.selectedVersion == 'windowsxp' || - this.state.selectedVersion == 'windows8' + this.state.selectedVersion == 'windowsserver2008' || + this.state.selectedVersion == 'windows7' ? tabNet : this.state.selectedVersion == 'sierra' || this.state.selectedVersion == 'highSierra' || @@ -2114,7 +2165,8 @@ export const RegisterAgent = withErrorBoundary( : this.state.selectedVersion == 'solaris10' || this.state.selectedVersion == 'solaris11' || this.state.selectedVersion == '6.1 TL9' || - this.state.selectedVersion == '11.31' + this.state.selectedVersion == '11.31' || + this.state.selectedVersion == '3.12.12' ? tabWazuhControl : tabSysV } @@ -2141,6 +2193,7 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedOS !== 'oraclelinux' && this.state.selectedOS !== 'suse' && this.state.selectedOS !== 'raspbian' && + this.state.selectedOS !== 'alpine' && restartAgentCommand ? [ { @@ -2228,5 +2281,5 @@ export const RegisterAgent = withErrorBoundary(
); } - } + }, ); diff --git a/public/controllers/agent/components/wz-accordion.tsx b/public/controllers/agent/components/wz-accordion.tsx new file mode 100644 index 0000000000..eafaf073cd --- /dev/null +++ b/public/controllers/agent/components/wz-accordion.tsx @@ -0,0 +1,59 @@ +import React, { useState } from 'react'; +import { + EuiPanel, + EuiSpacer, + EuiAccordion, + EuiButtonGroup, + htmlIdGenerator, +} from '@elastic/eui'; +import { osButtons } from '../wazuh-config'; + +export const PrincipalButtonGroup = ({ + legend, + options, + idSelected, + onChange, +}) => { + return ( + <> + + + + + + + ); +}; + +export const WzAccordion = ({ children }) => { + const [isAccordionOpen, setIsAccordionOpen] = useState(false); + const rightArrowAccordionId = htmlIdGenerator('wz-accordion')(); + return ( + setIsAccordionOpen(isOpen)} + className={'action-btn-td'} + > + + + {children} + + + ); +}; diff --git a/public/controllers/agent/wazuh-config/index.ts b/public/controllers/agent/wazuh-config/index.ts index 964c60c004..24e6cbe5ac 100644 --- a/public/controllers/agent/wazuh-config/index.ts +++ b/public/controllers/agent/wazuh-config/index.ts @@ -40,12 +40,11 @@ const architectureButtonsWithPPC64LE = [ }, ]; - const architectureButtonsi386 = [ { id: 'i386', label: 'i386', - } + }, ]; const architecturei386Andx86_64 = [ @@ -67,19 +66,15 @@ const architectureButtonsSolaris = [ { id: 'sparc', label: 'SPARC', - } + }, ]; const architectureButtonsMacos = [ { - id: 'intel', - label: 'Intel' + id: 'intel/applesilicon', + label: 'Intel/Apple Silicon', }, - { - id: 'applesilicon', - label: 'Apple Silicon' - } -] +]; const architectureButtonsOpenSuse = [ { @@ -89,21 +84,21 @@ const architectureButtonsOpenSuse = [ { id: 'ARM64', label: 'ARM64', - } + }, ]; const architectureButtonsAix = [ { id: 'powerpc', label: 'PowerPC', - } + }, ]; const architectureButtonsHpUx = [ { id: 'itanium2', label: 'Itanium2', - } + }, ]; const versionButtonAmazonLinux = [ @@ -118,8 +113,8 @@ const versionButtonAmazonLinux = [ { id: 'amazonlinux2022', label: 'Amazon Linux 2022', - } -] + }, +]; const versionButtonsRedHat = [ { @@ -167,15 +162,15 @@ const versionButtonsDebian = [ { id: 'debian10', label: 'Debian 10 or higher', - } + }, ]; const versionButtonFedora = [ { id: '22', - label: 'Fedora 22 or later' - } -] + label: 'Fedora 22 or higher', + }, +]; const versionButtonsUbuntu = [ { @@ -184,12 +179,8 @@ const versionButtonsUbuntu = [ }, { id: 'ubuntu15', - label: 'Ubuntu 15', + label: 'Ubuntu 15 or higher', }, - { - id: 'ubuntu16', - label: 'Ubuntu 16 or higher', - } ]; const versionButtonsWindows = [ @@ -198,9 +189,13 @@ const versionButtonsWindows = [ label: 'Windows XP', }, { - id: 'windows8', - label: 'Windows 8 or higher', - } + id: 'windowsserver2008', + label: 'Windows Server 2008', + }, + { + id: 'windows7', + label: 'Windows 7 or higher', + }, ]; const versionButtonsSuse = [ @@ -211,36 +206,13 @@ const versionButtonsSuse = [ { id: 'suse12', label: 'SUSE 12', - } + }, ]; const versionButtonsMacOS = [ { id: 'sierra', - label: 'macOS Sierra', - }, - { - id: 'highSierra', - label: 'macOS High Sierra', - }, - { - id: 'mojave', - label: 'macOS Mojave', - }, - { - id: 'catalina', - label: 'macOS Catalina', - }, - { - id: 'bigSur', - label: 'macOS Big Sur', - }, - { - id: 'monterrey', - label: 'macOS Monterrey', - }, - { id: 'ventura', - label: 'macOS Ventura', + label: 'macOS Sierra or higher', }, ]; @@ -248,7 +220,7 @@ const versionButtonsOpenSuse = [ { id: 'leap15', label: 'OpenSuse Leap 15 or higher', - } + }, ]; const versionButtonsSolaris = [ @@ -259,21 +231,21 @@ const versionButtonsSolaris = [ { id: 'solaris11', label: 'Solaris 11', - } + }, ]; const versionButtonsAix = [ { id: '6.1 TL9', label: 'AIX 6.1 TL9 or higher', - } + }, ]; const versionButtonsHPUX = [ { id: '11.31', label: 'HP-UX 11.31 or higher', - } + }, ]; const versionButtonsOracleLinux = [ @@ -283,22 +255,29 @@ const versionButtonsOracleLinux = [ }, { id: 'oraclelinux6', - label: 'Oracle Linux 6 or later', - } + label: 'Oracle Linux 6 or higher', + }, ]; const versionButtonsRaspbian = [ { id: 'busterorgreater', label: 'Raspbian Buster or greater', - } + }, +]; + +const versionButtonAlpine = [ + { + id: '3.12.12', + label: '3.12.12 or higher', + }, ]; /** * Order the OS Buttons Alphabetically by label - * @param a - * @param b - * @returns + * @param a + * @param b + * @returns */ const orderOSAlphabetically = (a, b) => { if (a.label.toUpperCase() < b.label.toUpperCase()) { @@ -308,9 +287,9 @@ const orderOSAlphabetically = (a, b) => { return 1; } return 0; -} +}; -const osButtons = [ +const osPrincipalButtons = [ { id: 'rpm', label: 'Red Hat Enterprise Linux', @@ -319,10 +298,6 @@ const osButtons = [ id: 'cent', label: 'CentOS', }, - { - id: 'deb', - label: 'Debian', - }, { id: 'ubu', label: 'Ubuntu', @@ -335,6 +310,13 @@ const osButtons = [ id: 'macos', label: 'macOS', }, +]; + +const osButtons = [ + { + id: 'deb', + label: 'Debian', + }, { id: 'open', label: 'OpenSuse', @@ -347,30 +329,62 @@ const osButtons = [ id: 'aix', label: 'AIX', }, - { + { id: 'hp', label: 'HP-UX', }, - { + { id: 'amazonlinux', label: 'Amazon Linux', }, - { + { id: 'fedora', label: 'Fedora', }, - { + { id: 'oraclelinux', label: 'Oracle Linux', }, - { + { id: 'suse', label: 'SUSE', }, - { + { id: 'raspbian', label: 'Raspbian OS', }, + { + id: 'alpine', + label: 'Alpine', + }, ].sort(orderOSAlphabetically); -export { architectureButtons, architecturei386Andx86_64, versionButtonsRaspbian, versionButtonsSuse, architectureButtonsWithPPC64LE, versionButtonsOracleLinux, versionButtonFedora, versionButtonsRedHat, versionButtonsCentos, architectureButtonsMacos, osButtons, versionButtonsDebian, versionButtonsUbuntu, versionButtonAmazonLinux, versionButtonsWindows, versionButtonsMacOS, versionButtonsOpenSuse, versionButtonsSolaris, versionButtonsAix, versionButtonsHPUX, architectureButtonsi386, architectureButtonsSolaris, architectureButtonsAix, architectureButtonsHpUx, architectureButtonsOpenSuse }; +export { + architectureButtons, + architecturei386Andx86_64, + versionButtonsRaspbian, + versionButtonsSuse, + architectureButtonsWithPPC64LE, + versionButtonsOracleLinux, + versionButtonFedora, + versionButtonsRedHat, + versionButtonsCentos, + versionButtonAlpine, + architectureButtonsMacos, + osButtons, + osPrincipalButtons, + versionButtonsDebian, + versionButtonsUbuntu, + versionButtonAmazonLinux, + versionButtonsWindows, + versionButtonsMacOS, + versionButtonsOpenSuse, + versionButtonsSolaris, + versionButtonsAix, + versionButtonsHPUX, + architectureButtonsi386, + architectureButtonsSolaris, + architectureButtonsAix, + architectureButtonsHpUx, + architectureButtonsOpenSuse, +}; diff --git a/public/styles/component.scss b/public/styles/component.scss index 733122d86f..7fa8976546 100644 --- a/public/styles/component.scss +++ b/public/styles/component.scss @@ -16,106 +16,122 @@ /* Custom nav bar styles */ -.wz-nav-bar .md-nav-bar{ - height: auto !important; +.wz-nav-bar .md-nav-bar { + height: auto !important; } .wz-nav-item button, .wz-no-padding { - padding: 0 5px!important; + padding: 0 5px !important; } .wz-nav-item button.md-primary { - color: rgb(0, 121, 165) !important; - background: #f5fafb !important; - border-bottom: 2px solid #006BB4; + color: rgb(0, 121, 165) !important; + background: #f5fafb !important; + border-bottom: 2px solid #006bb4; } .wz-nav-item button.md-unselected { - color: rgba(0, 0, 0, 0.87) !important; + color: rgba(0, 0, 0, 0.87) !important; } .wz-nav-bar md-nav-ink-bar { - color: rgb(0, 121, 165) !important; - background: rgb(0, 121, 165) !important; + color: rgb(0, 121, 165) !important; + background: rgb(0, 121, 165) !important; } .wz-nav-bar md-nav-ink-bar._md-left, .wz-nav-bar md-nav-ink-bar._md-right { - transition: none !important; + transition: none !important; } /* Custom tooltip styles */ .wz-tooltip { - background-color: rgba(0,0,0,0.87) !important; - color: #FFF !important; + background-color: rgba(0, 0, 0, 0.87) !important; + color: #fff !important; } /* Custom switch styles */ .wz-switch { - margin: 0 !important; + margin: 0 !important; } /* Custom chips styles */ .wz-chips .md-chips { - box-shadow: none !important; - padding-bottom: 0; + box-shadow: none !important; + padding-bottom: 0; } .wz-chip { - font-size: 12px; - color: white; - background-color: #006BB4; - height: 26px !important; - line-height: 26px !important; - margin: 0 8px 0 0 !important; + font-size: 12px; + color: white; + background-color: #006bb4; + height: 26px !important; + line-height: 26px !important; + margin: 0 8px 0 0 !important; } - .sca-chart-widget { - margin: 0 auto; - //width:350px; - margin-top:50px; - background-color: #222D3A; - border-radius: 5px; - box-shadow: 0px 0px 1px 0px #06060d; - + margin: 0 auto; + //width:350px; + margin-top: 50px; + background-color: #222d3a; + border-radius: 5px; + box-shadow: 0px 0px 1px 0px #06060d; } -.sca-chart-header{ - background-color: #29384D; - height:40px; - color:#929DAF; - text-align: center; - line-height: 40px; - border-top-left-radius: 7px; - border-top-right-radius: 7px; - font-weight: 400; - font-size: 1.5em; - text-shadow: 1px 1px #06060d; +.sca-chart-header { + background-color: #29384d; + height: 40px; + color: #929daf; + text-align: center; + line-height: 40px; + border-top-left-radius: 7px; + border-top-right-radius: 7px; + font-weight: 400; + font-size: 1.5em; + text-shadow: 1px 1px #06060d; } -.sca-chart{ - padding:12px; +.sca-chart { + padding: 12px; } .sca-chart-shadow { - -webkit-filter: drop-shadow( 0px 3px 3px rgba(0,0,0,.5) ); - filter: drop-shadow( 0px 3px 3px rgba(0,0,0,.5) ); + -webkit-filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.5)); + filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.5)); } kbn-dis doc-table .kbnDocViewer__warning { - display: none; + display: none; } /* Custom Breadcrumb styles*/ .header__breadcrumbsWithExtensionContainer .euiHeaderBreadcrumbs { - flex-grow: 1; - margin-right: 12px; + flex-grow: 1; + margin-right: 12px; } .header__breadcrumbsWithExtensionContainer .header__breadcrumbsAppendExtension { - flex-grow: 0; + flex-grow: 0; +} + +.osButtonsStyle { + display: grid; + grid-template-columns: repeat(5, 1fr); + grid-gap: 10px; +} + +.osButtonsStyleMac { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-gap: 10px; +} + +.message { + margin-top: 10px; + display: flex; + flex-direction: row; } From 53cd727f12c6c4465564aab936bb0a2fc875d835 Mon Sep 17 00:00:00 2001 From: "chantal.kelm" Date: Thu, 22 Dec 2022 14:03:04 -0300 Subject: [PATCH 2/3] styles --- public/controllers/agent/components/register-agent.js | 7 ++----- public/controllers/agent/components/wz-accordion.tsx | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/public/controllers/agent/components/register-agent.js b/public/controllers/agent/components/register-agent.js index 46a577fa5c..c84423a0f0 100644 --- a/public/controllers/agent/components/register-agent.js +++ b/public/controllers/agent/components/register-agent.js @@ -687,7 +687,7 @@ export const RegisterAgent = withErrorBoundary( resolveSOLARISPackage() { switch ( - `${this.state.selectedVersion}-${this.state.selectedArchitecture}``${this.state.selectedVersion}-${this.state.selectedArchitecture}` + `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case 'solaris10-i386': return `https://packages.wazuh.com/4.x/solaris/i386/10/wazuh-agent_v${this.state.wazuhVersion}-sol10-i386.pkg${this.wazuhPkgVariable}`; @@ -1009,7 +1009,7 @@ apk add wazuh-agent`, this.state.selectedVersion == 'solaris11' ? 'wazuh-agent.p5p' : 'wazuh-agent.pkg' - } ${this.optionalPackages()}${this.agentNameVariable()} && ${ + } ${this.optionalPackages()} && ${ this.state.selectedVersion == 'solaris11' ? 'pkg install -g wazuh-agent.p5p wazuh-agent' : 'pkgadd -d wazuh-agent.pkg' @@ -1586,9 +1586,6 @@ apk add wazuh-agent`, {this.state.selectedOS == 'hp' || this.state.selectedOS == 'sol' ? messageExtraSteps : ''} - {this.state.selectedOS == 'hp' || this.state.selectedOS == 'sol' - ? messageExtraSteps - : ''} ), diff --git a/public/controllers/agent/components/wz-accordion.tsx b/public/controllers/agent/components/wz-accordion.tsx index eafaf073cd..f2e72ed167 100644 --- a/public/controllers/agent/components/wz-accordion.tsx +++ b/public/controllers/agent/components/wz-accordion.tsx @@ -22,7 +22,6 @@ export const PrincipalButtonGroup = ({ options={options} idSelected={idSelected} onChange={onChange} - className={'osButtonsStyle'} /> @@ -32,7 +31,6 @@ export const PrincipalButtonGroup = ({ options={osButtons} idSelected={idSelected} onChange={onChange} - className={'osButtonsStyle'} /> @@ -51,7 +49,7 @@ export const WzAccordion = ({ children }) => { className={'action-btn-td'} > - + {children} From 8efbba585ac2420198994a4cb9808eefefcf1366 Mon Sep 17 00:00:00 2001 From: "chantal.kelm" Date: Thu, 22 Dec 2022 14:14:52 -0300 Subject: [PATCH 3/3] hp command --- public/controllers/agent/components/register-agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/controllers/agent/components/register-agent.js b/public/controllers/agent/components/register-agent.js index c84423a0f0..1e91cbe47d 100644 --- a/public/controllers/agent/components/register-agent.js +++ b/public/controllers/agent/components/register-agent.js @@ -715,7 +715,7 @@ export const RegisterAgent = withErrorBoundary( resolveHPPackage() { switch ( - `${this.state.selectedVersion}-${this.state.selectedArchitecture}``${this.state.selectedVersion}-${this.state.selectedArchitecture}` + `${this.state.selectedVersion}-${this.state.selectedArchitecture}` ) { case '11.31-itanium2': return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}${this.addToVersion}-hpux-11v3-ia64.tar${this.wazuhTarVariable}`;