Skip to content

Commit

Permalink
Fix architecture link in the deploy agent wizard (#4876)
Browse files Browse the repository at this point in the history
* link of architecture

* CHANGELOG

(cherry picked from commit 6bc39ca)
  • Loading branch information
chantal-kelm authored and github-actions[bot] committed Nov 16, 2022
1 parent 8354bcd commit e654596
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ commands of Start the agent in the deploy new agent section [#4458](https://gith
- Removed custom styles from kibana 7.9.0 [#4491](https://github.com/wazuh/wazuh-kibana-app/pull/4491)
- Fixed WAZUH_PROTOCOL param suggestion [#4849](https://github.com/wazuh/wazuh-kibana-app/pull/4849)
- Add macOS version to wizard deploy agent [#4867](https://github.com/wazuh/wazuh-kibana-app/pull/4867)
- Raspbian OS, Ubuntu, Amazon Linux and Amazon Linux 2 commands in the wizard deploy agent now change when selecting a different architecture [#4876](https://github.com/wazuh/wazuh-kibana-app/pull/4876)

### Fixed

Expand Down
64 changes: 40 additions & 24 deletions public/controllers/agent/components/register-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,25 +426,25 @@ export const RegisterAgent = withErrorBoundary(

resolveAMAZONLPackage() {
switch (`${this.state.selectedVersion}-${this.state.selectedArchitecture}`) {
case '1-i386':
case 'amazonlinux1-i386':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.i386.rpm`;
case '1-aarch64':
case 'amazonlinux1-aarch64':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.aarch64.rpm`;
case '1-x86_64':
case 'amazonlinux1-x86_64':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.x86_64.rpm`;
case '1-armhf':
case 'amazonlinux1-armhf':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.armv7hl.rpm`;
case '1-powerpc':
case 'amazonlinux1-powerpc':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.ppc64le.rpm`;
case '2-i386':
case 'amazonlinux2-i386':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.i386.rpm`;
case '2-aarch64':
case 'amazonlinux2-aarch64':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.aarch64.rpm`;
case '2-x86_64':
case 'amazonlinux2-x86_64':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.x86_64.rpm`;
case '2-armhf':
case 'amazonlinux2-armhf':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.armv7hl.rpm`;
case '2-powerpc':
case 'amazonlinux2-powerpc':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.ppc64le.rpm`;
case 'amazonlinux2022-i386':
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}-1.i386.rpm`;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const RegisterAgent = withErrorBoundary(
}

resolveRASPBIANPackage() {
switch (`${this.state.selectedArchitecture}`) {
switch (`${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}_i386.deb`;
case 'busterorgreater-aarch64':
Expand All @@ -495,24 +495,40 @@ export const RegisterAgent = withErrorBoundary(

resolveUBUNTUPackage() {
switch (`${this.state.selectedVersion}-${this.state.selectedArchitecture}`) {
case 'i386':
case 'ubuntu14-i386':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_i386.deb`;
case 'aarch64':
case 'ubuntu14-aarch64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_arm64.deb`;
case 'ubuntu14-armhf':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_armhf.deb`;
case 'ubuntu14-x86_64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_amd64.deb`;
case 'armhf':
case 'ubuntu15-i386':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_i386.deb`;
case 'ubuntu15-aarch64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_arm64.deb`;
case 'ubuntu15-armhf':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_armhf.deb`;
case 'x86_64':
case 'ubuntu15-x86_64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_amd64.deb`;
case 'ubuntu16-i386':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_i386.deb`;
case 'ubuntu16-aarch64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_arm64.deb`;
case 'ubuntu16-armhf':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_armhf.deb`;
case 'ubuntu16-x86_64':
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_amd64.deb`;
default:
return `https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_${this.state.wazuhVersion}_amd64.deb`;
}
}

resolveOPENSUSEPackage() {
switch (`${this.state.selectedVersion}-${this.state.selectedArchitecture}`) {
case 'leap15-i386':
return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}.x86_64.rpm`;
case 'leap15-x86_64':
return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}.x86_64.rpm`;
case 'leap15-ARM64':
return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}.armv7hl.rpm`
default:
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}.x86_64.rpm`;
Expand All @@ -522,15 +538,15 @@ export const RegisterAgent = withErrorBoundary(
resolveSOLARISPackage() {
switch (`${this.state.selectedVersion}-${this.state.selectedArchitecture}`) {
case 'solaris10-i386':
return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}-sol10-i386.pkg`;
case 'solaris10-spark':
return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}-sol10-sparc.pkg`;
return `https://packages.wazuh.com/4.x/solaris/i386/10/wazuh-agent-${this.state.wazuhVersion}-sol10-i386.pkg`;
case 'solaris10-sparc':
return `https://packages.wazuh.com/4.x/solaris/sparc/10/wazuh-agent-${this.state.wazuhVersion}-sol10-sparc.pkg`;
case 'solaris11-i386':
return `https://packages.wazuh.com/4.x/yum/i386/wazuh-agent-${this.state.wazuhVersion}-sol11-i386.p5p`;
case 'solaris11-spark':
return `https://packages.wazuh.com/4.x/yum/x86_64/wazuh-agent-${this.state.wazuhVersion}-sol11-sparc.p5p`
return `https://packages.wazuh.com/4.x/solaris/i386/11/wazuh-agent-${this.state.wazuhVersion}-sol11-i386.p5p`;
case 'solaris11-sparc':
return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent-${this.state.wazuhVersion}-sol11-sparc.p5p`
default:
return `https://packages.wazuh.com/4.x/yum/wazuh-agent-${this.state.wazuhVersion}-sol11-sparc.p5p`;
return `https://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent-${this.state.wazuhVersion}-sol11-sparc.p5p`;
}
}

Expand Down

0 comments on commit e654596

Please sign in to comment.