diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa1c0c4d5..b47c3fb9e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ 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) +- Deploy new agent section: 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) - Added file saving conditions in File Editor [#4970](https://github.com/wazuh/wazuh-kibana-app/pull/4970) - Deploy new agent section: Added link for additional steps to alpine os. [#4933](https://github.com/wazuh/wazuh-kibana-app/pull/4933) - Added character validation to avoid invalid agent names in the section 'Deploy new agent'. [#5021](https://github.com/wazuh/wazuh-kibana-app/pull/5021) @@ -57,12 +58,13 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed vulnerabilities default last scan date formatter [#4975](https://github.com/wazuh/wazuh-kibana-app/pull/4975) - 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) +- 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 the manager option in the agent deployment section [#4981](https://github.com/wazuh/wazuh-kibana-app/pull/4981) - 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) - Fixed agent installation command for macOS in the deploy new agent section. [#4968](https://github.com/wazuh/wazuh-kibana-app/pull/4968) -- Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4984](https://github.com/wazuh/wazuh-kibana-app/pull/4984) +- Fixed commands in the deploy new agent section (most of the commands are missing '-1') [#4984](https://github.com/wazuh/wazuh-kibana-app/pull/4984) - Fixed vulnerabilities default last scan date formatter [#4975](https://github.com/wazuh/wazuh-kibana-app/pull/4975) ### Removed diff --git a/public/controllers/agent/components/register-agent.js b/public/controllers/agent/components/register-agent.js index 663d56ec4d..39b6452fa0 100644 --- a/public/controllers/agent/components/register-agent.js +++ b/public/controllers/agent/components/register-agent.js @@ -61,7 +61,7 @@ import { versionButtonsRedHat, versionButtonsCentos, architectureButtonsMacos, - osButtons, + osPrincipalButtons, versionButtonsDebian, versionButtonsUbuntu, versionButtonsWindows, @@ -70,13 +70,15 @@ import { versionButtonsSolaris, versionButtonsAix, versionButtonsHPUX, + versionButtonAlpine, } from '../wazuh-config'; -import './register-agent.scss'; import ServerAddress from '../register-agent/steps/server-address'; import { getConnectionConfig, fetchClusterNodesOptions, } from './register-agent-service'; +import './register-agent.scss'; +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'; } } @@ -287,9 +289,6 @@ export const RegisterAgent = withErrorBoundary( ) { return '/var/ossec/bin/wazuh-control start'; } else { - this.state.selectedVersion === '11.31'; - } - { return '/sbin/init.d/wazuh-agent start'; } } @@ -399,7 +398,6 @@ export const RegisterAgent = withErrorBoundary( return deployment; } - agentNameVariable() { let agentName = `WAZUH_AGENT_NAME='${this.state.agentName}' `; if ( @@ -409,6 +407,7 @@ export const RegisterAgent = withErrorBoundary( ) { return agentName.replace(/=/g, ' '); } + if (this.state.selectedArchitecture && this.state.agentName !== '') { return agentName; } else { @@ -421,29 +420,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}`; } } @@ -452,17 +451,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"'; } } @@ -471,25 +470,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}`; } } @@ -498,29 +497,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}`; } } @@ -529,21 +528,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}`; } } @@ -552,17 +551,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}`; } } @@ -571,52 +570,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}`; } } @@ -625,17 +624,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}`; } } @@ -644,23 +643,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}`; } } @@ -669,11 +668,11 @@ 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}`; } } @@ -682,15 +681,15 @@ export const RegisterAgent = withErrorBoundary( `${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}`; } } @@ -699,9 +698,9 @@ 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}`; } } @@ -710,9 +709,9 @@ export const RegisterAgent = withErrorBoundary( `${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}`; } } @@ -747,7 +746,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}`; } } @@ -861,6 +860,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 []; } @@ -873,6 +879,7 @@ export const RegisterAgent = withErrorBoundary( return 'bash'; } } + render() { const appVersionMajorDotMinor = this.state.wazuhVersion .split('.') @@ -953,50 +960,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()}` + : `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`; @@ -1585,11 +1598,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' @@ -1700,20 +1715,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), + ), }, ] : []), @@ -1795,10 +1802,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', @@ -1840,6 +1844,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' || @@ -1848,8 +1865,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', @@ -1883,7 +1899,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', @@ -1896,13 +1913,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', @@ -2001,47 +2012,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' || @@ -2094,11 +2084,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' || @@ -2111,7 +2101,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 } @@ -2138,6 +2129,7 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedOS !== 'oraclelinux' && this.state.selectedOS !== 'suse' && this.state.selectedOS !== 'raspbian' && + this.state.selectedOS !== 'alpine' && restartAgentCommand ? [ { diff --git a/public/controllers/agent/components/wz-accordion.tsx b/public/controllers/agent/components/wz-accordion.tsx new file mode 100644 index 0000000000..910a955c8b --- /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/common.scss b/public/styles/common.scss index dfecffdcad..e59875e4d9 100644 --- a/public/styles/common.scss +++ b/public/styles/common.scss @@ -25,7 +25,7 @@ /* Custom healthcheck and blank screen styles */ -.kbnGlobalBannerList{ +.kbnGlobalBannerList { display: none; } @@ -262,9 +262,10 @@ box-shadow: none !important; } -.btn-as-i:hover, .btn-as-i:focus { +.btn-as-i:hover, +.btn-as-i:focus { background: none !important; - color: #006bb4!important; + color: #006bb4 !important; } /* Custom reporting button styles */ @@ -304,8 +305,8 @@ /* Custom input filter box styles */ -input[type="search"].euiFieldSearch{ - box-sizing: inherit!important; +input[type='search'].euiFieldSearch { + box-sizing: inherit !important; } .input-filter-box { @@ -363,7 +364,9 @@ input[type="search"].euiFieldSearch{ box-shadow: none; } -:focus:not(.wz-button):not(.input-filter-box):not(.kuiLocalSearchInput):not(.euiTextArea):not(.euiPanel.euiPopover__panel.euiPopover__panel-isOpen) { +:focus:not(.wz-button):not(.input-filter-box):not(.kuiLocalSearchInput):not( + .euiTextArea + ):not(.euiPanel.euiPopover__panel.euiPopover__panel-isOpen) { box-shadow: none !important; } @@ -418,8 +421,9 @@ input[type="search"].euiFieldSearch{ /* Custom plugin plaform styles */ -md-content.md-default-theme, md-content{ - background: transparent!important; +md-content.md-default-theme, +md-content { + background: transparent !important; } .wz-border-none, @@ -430,7 +434,7 @@ md-content.md-default-theme, md-content{ .wz-border-0 { border: 0px; } -.table{ +.table { margin: 0 !important; } .wz-md-tab .md-tab, @@ -439,7 +443,7 @@ md-content.md-default-theme, md-content{ } .table-hover > tbody > tr:hover { - background-color: #fafbfd!important; + background-color: #fafbfd !important; } /* .table > tbody { @@ -458,7 +462,7 @@ md-content.md-default-theme, md-content{ } .euiTab.euiTab-isSelected { - font-weight: 600!important; + font-weight: 600 !important; } .sca-checksum { @@ -504,7 +508,7 @@ md-sidenav { color: #b4bcc2; } -.conApp .euiProgress{ +.conApp .euiProgress { z-index: 2000; } @@ -780,7 +784,7 @@ md-switch.md-checked .md-thumb { display: block; } -.wz-ellipsis{ +.wz-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -850,12 +854,12 @@ wz-xml-file-editor { background: #ecf6fb !important; } -.table-striped > tbody > tr:nth-of-type(odd){ - background-color: transparent!important; +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: transparent !important; } -.table-striped > tbody > tr:nth-of-type(odd):hover{ - background-color: #fafbfd!important; +.table-striped > tbody > tr:nth-of-type(odd):hover { + background-color: #fafbfd !important; } .table-striped-duo > tbody tr:not(.euiTableRow):nth-child(2n + 1):not(:hover), @@ -987,40 +991,40 @@ wz-xml-file-editor { white-space: nowrap; } -.registerAgent{ +.registerAgent { min-height: calc(100vh - 100px); background: #fafbfd; } -.application{ +.application { background: #fafbfd; } -.application.tab-health-check wz-menu{ +.application.tab-health-check wz-menu { display: none; } -.health-check table tr td{ - border-top: none!important; +.health-check table tr td { + border-top: none !important; } -.health-check{ +.health-check { padding-top: 5%; max-width: 700px; margin: 0 auto; text-align: center; } -.health-check dl.euiDescriptionList dd{ +.health-check dl.euiDescriptionList dd { white-space: nowrap; } -.health-check dl.euiDescriptionList dd>span:first-child{ +.health-check dl.euiDescriptionList dd > span:first-child { display: inline-block; width: 26px; } -.health-check .euiCodeBlock{ +.health-check .euiCodeBlock { max-height: 0; margin-top: 0; transition: all 0.25s ease-out; @@ -1028,14 +1032,14 @@ wz-xml-file-editor { border: 0px solid #0001; } -.health-check .euiCodeBlock.visible{ +.health-check .euiCodeBlock.visible { border: 1px solid #0001; max-height: 700px; margin-top: 16px; visibility: visible; } -.wz-hover-transform-y1:hover{ +.wz-hover-transform-y1:hover { -webkit-transform: translateY(-1px) !important; transform: translateY(-1px) !important; } @@ -1049,30 +1053,30 @@ wz-xml-file-editor { } } -.health-check-loader{ +.health-check-loader { height: 120px; width: 120px; margin: 0 auto; } -.health-check-logo{ +.health-check-logo { width: 140px; z-index: 1; margin: 0 auto; } .health-check { - .euiDescriptionList__title{ - width: 60%!important; + .euiDescriptionList__title { + width: 60% !important; } - .euiDescriptionList__description{ - text-align: left!important; - width: 40%!important; + .euiDescriptionList__description { + text-align: left !important; + width: 40% !important; } } .CodeMirror-gutters { - z-index: 1!important; + z-index: 1 !important; } .refresh-report-button { @@ -1080,27 +1084,28 @@ wz-xml-file-editor { text-align: right; } -.monitoring-discover{ +.monitoring-discover { margin: -12px -6px 26px -6px; } -.euiBadge, .euiBadge__childButton{ - font-size: 12px!important; +.euiBadge, +.euiBadge__childButton { + font-size: 12px !important; } -.wz-link{ - cursor:pointer; - color: #006BB4; +.wz-link { + cursor: pointer; + color: #006bb4; text-decoration: none; } -.wzTableCellFilter{ +.wzTableCellFilter { text-align: right; height: 0; cursor: pointer; } -.wz-md-card:not(.fullscreen) .sca-vis.table-scrollable .kbnAggTable__paginated{ +.wz-md-card:not(.fullscreen) .sca-vis.table-scrollable .kbnAggTable__paginated { height: 150px; } @@ -1148,20 +1153,23 @@ wz-xml-file-editor { } .header-global-wrapper + .app-wrapper:not(.hidden-chrome) { - top: 48px!important; - left: 48px!important; + top: 48px !important; + left: 48px !important; } .reqCard { cursor: default !important; } -.reqCard:hover, .reqCard:focus { +.reqCard:hover, +.reqCard:focus { transform: translateY(0px) !important; - box-shadow: 0 2px 2px -1px rgba(152, 162, 179, 0.3), 0 1px 5px -2px rgba(152, 162, 179, 0.3) !important; + box-shadow: 0 2px 2px -1px rgba(152, 162, 179, 0.3), + 0 1px 5px -2px rgba(152, 162, 179, 0.3) !important; } -.reqCard:hover .euiCard__title, .reqCard:focus .euiCard__title { +.reqCard:hover .euiCard__title, +.reqCard:focus .euiCard__title { text-decoration: none !important; } @@ -1169,17 +1177,17 @@ wz-xml-file-editor { width: auto; } -@media only screen and (max-width: 1000px){ +@media only screen and (max-width: 1000px) { .flyout-no-overlap { max-width: 90%; } } -@media only screen and (min-width: 1000px) and (max-width: 1400px){ +@media only screen and (min-width: 1000px) and (max-width: 1400px) { .flyout-no-overlap { max-width: 85%; } } -@media only screen and (min-width: 1400px){ +@media only screen and (min-width: 1400px) { .flyout-no-overlap { max-width: 60%; } @@ -1216,7 +1224,6 @@ wz-xml-file-editor { color: #377dbb !important; } - .list-of-files-fail { margin-top: 10px; margin-bottom: 10px; @@ -1234,46 +1241,49 @@ wz-xml-file-editor { color: #000 !important; } -.logtest-side{ +.logtest-side { height: calc(100vh - 95px); margin-top: -50px; z-index: 10; - position : fixed; + position: fixed; right: 0; width: calc(30% - 16px); } -.logtest .euiFlyoutFooter, .logtest-side .euiFlyoutFooter{ +.logtest .euiFlyoutFooter, +.logtest-side .euiFlyoutFooter { margin: 0 -16px; - background: transparent; + background: transparent; } -.logtest-side .euiFlyoutFooter{ +.logtest-side .euiFlyoutFooter { margin: 0 -16px; } -.logtest .euiFlyoutFooter{ - margin: 0 -16px -16px -16px; +.logtest .euiFlyoutFooter { + margin: 0 -16px -16px -16px; } -.logtest .euiCodeBlock{ +.logtest .euiCodeBlock { border: 1px solid #e1e2e3; } -.logtest .euiTextArea, .logtest-side .euiTextArea{ +.logtest .euiTextArea, +.logtest-side .euiTextArea { max-height: 500px; resize: none; } -md-chips.md-default-theme .md-chips, md-chips .md-chips{ +md-chips.md-default-theme .md-chips, +md-chips .md-chips { box-shadow: none; } -.min-guide-width{ +.min-guide-width { min-width: 675px !important; } -.table-vis-container{ +.table-vis-container { overflow: auto !important; } @@ -1284,8 +1294,8 @@ md-chips.md-default-theme .md-chips, md-chips .md-chips{ .title-pin:hover:after { padding-left: 5px; font-size: 12px; - content: "\f00e"; - font-family: "FontAwesome"; + content: '\f00e'; + font-family: 'FontAwesome'; color: #0b6bb4; position: absolute; } @@ -1307,19 +1317,19 @@ md-chips.md-default-theme .md-chips, md-chips .md-chips{ margin-left: 25px; } -.AgentsTable__soBadge{ - font-size: 18px!important; +.AgentsTable__soBadge { + font-size: 18px !important; padding-right: 3px; } -.AgentsTable__soBadge--windows{ +.AgentsTable__soBadge--windows { color: lightskyblue; } -.AgentsTable__soBadge--darwin{ +.AgentsTable__soBadge--darwin { color: gray; } -.euiStatLink .euiStat__title{ +.euiStatLink .euiStat__title { cursor: pointer; } @@ -1340,7 +1350,7 @@ md-chips.md-default-theme .md-chips, md-chips .md-chips{ border: solid 1px #d9d9d9; } -.react-code-mirror > .CodeMirror.CodeMirror-wrap.cm-s-default{ +.react-code-mirror > .CodeMirror.CodeMirror-wrap.cm-s-default { height: 100% !important; } @@ -1364,40 +1374,40 @@ md-chips.md-default-theme .md-chips, md-chips .md-chips{ max-width: none !important; } -.sideMenuButton .euiButtonEmpty__content{ - justify-content: left!important; +.sideMenuButton .euiButtonEmpty__content { + justify-content: left !important; } -.wz-log-viewer{ +.wz-log-viewer { border: solid #8080806b 1px; } -.wz-load-extra{ +.wz-load-extra { color: #257dbd; text-align: center; cursor: pointer; } -.wz-load-extra:hover{ +.wz-load-extra:hover { text-decoration: underline; } -.hide-close-button{ +.hide-close-button { display: none; } -.WzNotReadyButton{ +.WzNotReadyButton { z-index: 9999; } -.WzNotReadyButton:focus{ +.WzNotReadyButton:focus { background-color: transparent !important; } -.WzNotReadyButton{ +.WzNotReadyButton { z-index: 9999; } -.WzNotReadyButton:focus{ +.WzNotReadyButton:focus { background-color: transparent !important; } @@ -1411,54 +1421,53 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu padding-right: 0; } - .euiSuggestItem .euiSuggestItem__label { flex-basis: 25%; min-width: 25%; } -.codeEditorWrapper{ +.codeEditorWrapper { border: 1px solid #e9edf3; } -.codeEditorWrapper .ace-tm .ace_gutter{ +.codeEditorWrapper .ace-tm .ace_gutter { border: none !important; } -.codeEditorWrapper .ace-tm .ace_print-margin{ - visibility: hidden!important; +.codeEditorWrapper .ace-tm .ace_print-margin { + visibility: hidden !important; } -.euiTableHeaderCellCheckbox{ - width: 32px!important; +.euiTableHeaderCellCheckbox { + width: 32px !important; } .kbnDis-no-padding .globalQueryBar:not(:empty) { - padding: 0px 0px 16px 0px!important; + padding: 0px 0px 16px 0px !important; } -.euiCodeBlock.euiCodeBlock-isFullScreen{ - border: 1px solid #D3DAE6; +.euiCodeBlock.euiCodeBlock-isFullScreen { + border: 1px solid #d3dae6; border-radius: 4px; margin: 22px; } -.euiCodeBlock.euiCodeBlock-isFullScreen .euiCodeBlock__controls{ +.euiCodeBlock.euiCodeBlock-isFullScreen .euiCodeBlock__controls { padding-right: 16px; } -.globalFilterGroup__wrapper{ +.globalFilterGroup__wrapper { max-height: 100px; - height: auto!important; + height: auto !important; } -.agent-selection-table-loading::before{ +.agent-selection-table-loading::before { position: absolute; content: ''; margin-left: 24px; width: 100%; height: 2px; - background-color: #006BB4; + background-color: #006bb4; -webkit-animation: euiBasicTableLoading 1000ms linear; animation: euiBasicTableLoading 1000ms linear; -webkit-animation-iteration-count: infinite; @@ -1487,16 +1496,18 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu padding: 0 3px; } -.wz-discover.hide-filter-control .globalFilterGroup__branch, kbn-dis.hide-filter-control .globalFilterGroup__branch { +.wz-discover.hide-filter-control .globalFilterGroup__branch, +kbn-dis.hide-filter-control .globalFilterGroup__branch { display: none; } /* Change custom discover size */ -.wz-discover > .globalQueryBar > -.kbnQueryBar--withDatePicker > -.euiFlexItem.euiFlexItem--flexGrowZero > -.euiFlexGroup > -.euiFlexItem.kbnQueryBar__datePickerWrapper { +.wz-discover + > .globalQueryBar + > .kbnQueryBar--withDatePicker + > .euiFlexItem.euiFlexItem--flexGrowZero + > .euiFlexGroup + > .euiFlexItem.kbnQueryBar__datePickerWrapper { max-width: 300px; } @@ -1506,16 +1517,18 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu } /* Change custom discover size */ - .wz-discover > .globalQueryBar > - .euiFlexGroup.kbnQueryBar.kbnQueryBar--withDatePicker { + .wz-discover + > .globalQueryBar + > .euiFlexGroup.kbnQueryBar.kbnQueryBar--withDatePicker { flex-wrap: wrap; margin-left: 0; margin-right: 0; } - .wz-discover > .globalQueryBar > - .euiFlexGroup.kbnQueryBar.kbnQueryBar--withDatePicker > - .euiFlexItem { + .wz-discover + > .globalQueryBar + > .euiFlexGroup.kbnQueryBar.kbnQueryBar--withDatePicker + > .euiFlexItem { width: 100% !important; -ms-flex-preferred-size: 100% !important; flex-basis: 100% !important; @@ -1524,27 +1537,28 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu margin-bottom: 16px !important; } - .wz-discover > .globalQueryBar > - .kbnQueryBar--withDatePicker > :first-child { + .wz-discover > .globalQueryBar > .kbnQueryBar--withDatePicker > :first-child { order: 1; margin-top: -8px; } - .wz-discover > .globalQueryBar > - .kbnQueryBar--withDatePicker > - .euiFlexItem.euiFlexItem--flexGrowZero > - .euiFlexGroup > - .euiFlexItem.kbnQueryBar__datePickerWrapper > - .euiFlexGroup { + .wz-discover + > .globalQueryBar + > .kbnQueryBar--withDatePicker + > .euiFlexItem.euiFlexItem--flexGrowZero + > .euiFlexGroup + > .euiFlexItem.kbnQueryBar__datePickerWrapper + > .euiFlexGroup { width: 100%; } - .wz-discover > .globalQueryBar > - .kbnQueryBar--withDatePicker > - .euiFlexItem.euiFlexItem--flexGrowZero > - .euiFlexGroup > - .euiFlexItem.kbnQueryBar__datePickerWrapper { - flex-grow: 1!important; + .wz-discover + > .globalQueryBar + > .kbnQueryBar--withDatePicker + > .euiFlexItem.euiFlexItem--flexGrowZero + > .euiFlexGroup + > .euiFlexItem.kbnQueryBar__datePickerWrapper { + flex-grow: 1 !important; max-width: none; } } @@ -1561,22 +1575,21 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu overflow: hidden; } } - } + } } @media (min-width: 1600px) { - .agents-evolution-visualization{ + .agents-evolution-visualization { width: 35vw; } .agents-details-card { width: 55vw; } - } @media (max-width: 1599px) { - .agents-evolution-visualization{ + .agents-evolution-visualization { width: 30vw; } @@ -1586,23 +1599,23 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu } @media (max-width: 1439px) { - .agents-evolution-visualization{ + .agents-evolution-visualization { width: 25vw; } } -@media only screen and (max-width: 1200px){ - .agents-evolution-visualization-group{ +@media only screen and (max-width: 1200px) { + .agents-evolution-visualization-group { flex-wrap: wrap; } - .agents-evolution-visualization{ + .agents-evolution-visualization { width: 100vw; } .agents-details-card { width: 100vw; } - .agents-status-pie{ + .agents-status-pie { flex-grow: 1 !important; } } @@ -1629,12 +1642,11 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu background-color: transparent !important; } - .ace_scrollbar-v { - margin-top: -10px!important; + margin-top: -10px !important; } .ace_autocomplete { - width: 390px!important; + width: 390px !important; } .wz-devtools { @@ -1642,14 +1654,13 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu margin: 16px; } .wz-devtools-tab .euiButtonEmpty__text { - height:24px; + height: 24px; text-decoration: none !important; } - .history-list { background-color: white; - border: 1px solid #80808061; + border: 1px solid #80808061; max-height: 25vh; overflow: auto; border-radius: 5px; @@ -1658,20 +1669,20 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu .history-list-item { padding: 10px; font-size: 14px; - border-bottom: 1px solid #80808061 ; + border-bottom: 1px solid #80808061; } .history-list-item:hover { - background-color:#a4a0e11a; + background-color: #a4a0e11a; } .history-list-item-active { - background-color:#a09dd326 !important; + background-color: #a09dd326 !important; } .history-list-item:last-child { padding: 10px; - border:none; + border: none; } iframe.width-changed { @@ -1691,7 +1702,7 @@ iframe.width-changed { } @media only screen and (max-width: 1200px) { - .wideElementsDevTools { + .wideElementsDevTools { display: none; } /* .selectDevTools { @@ -1703,7 +1714,7 @@ iframe.width-changed { } .code-block-log-viewer-container { - max-width: calc(100vw - 41*2px); + max-width: calc(100vw - 41 * 2px); } .dscFieldDetails__barContainer { @@ -1741,26 +1752,26 @@ iframe.width-changed { .wz-user-select-none { -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .wz-flex-basis-auto { flex-basis: auto !important; } -.wz-euiCard-no-title{ +.wz-euiCard-no-title { .euiCard__title, - .euiCard__description - { + .euiCard__description { display: none; } } /* Custom Searchbar styles */ -.application .filters-search-bar .globalQueryBar, .app-container .filters-search-bar .globalQueryBar { +.application .filters-search-bar .globalQueryBar, +.app-container .filters-search-bar .globalQueryBar { padding: 0 !important; } @@ -1776,7 +1787,7 @@ iframe.width-changed { @media only screen and (max-width: 767px) { .header-global-wrapper + .app-wrapper:not(.hidden-chrome) { - left: 0!important; + left: 0 !important; } .agents-details-card { @@ -1798,11 +1809,11 @@ iframe.width-changed { } .wz-flex { - display: flex; + display: flex; } .wz-callout-message { - margin-top: 10px; - display: flex; - flex-direction: row; + margin-top: 10px; + display: flex; + flex-direction: row; } 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; }