Revert "Add the repositories to the register agent component"

This reverts commit f3f7cce9fc48429269a7892a29e4a8b7aad3d8ef.
This commit is contained in:
JuanCarlos 2019-08-29 15:28:56 +02:00 committed by Jesús Ángel
parent 8d181365d0
commit ea21c8cfba

View File

@ -38,13 +38,6 @@ export class RegisterAgent extends Component {
this.setState({ serverAddress: event.target.value });
}
clearSteps(steps) {
if (['win', 'macos'].includes(this.state.selectedOS)) {
steps.splice(2, 1);
}
return steps;
}
render() {
const rpmButton = (
<EuiButtonToggle
@ -105,50 +98,8 @@ export class RegisterAgent extends Component {
winText: `wazuh-agent-3.9.1-1.msi /q ADDRESS='${this.state.serverAddress}' AUTHD_SERVER='${this.state.serverAddress}'`
};
const repositoriesText = {
rpmRepo:
`rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH &&
cat > /etc/yum.repos.d/wazuh.repo <<\EOF
[wazuh_repo]
gpgcheck=1
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
name=Wazuh repository
baseurl=https://packages.wazuh.com/3.x/yum/
protect=1
EOF`,
debRepo:
`curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add - &&
echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee -a /etc/apt/sources.list.d/wazuh.list &&
apt-get update`
}
const field = `${this.state.selectedOS}`;
const text = customTexts[`${field}Text`];
const repo = repositoriesText[`${field}Repo`];
const repository = (
<div>
{this.state.selectedOS && (
<EuiText>
<div style={copyButton}>
<EuiCopy textToCopy={repo}>
{copy => (
<EuiButtonIcon
onClick={copy}
iconType="copy"
aria-label="Copy"
/>
)}
</EuiCopy>
</div>
<EuiCodeBlock style={codeBlock} language="js">
{repo}
</EuiCodeBlock>
</EuiText>
)}
</div>
);
const field = `${this.state.selectedOS}Text`;
const text = customTexts[field];
const guide = (
<div>
@ -186,16 +137,6 @@ apt-get update`
title: 'Wazuh server address',
children: <Fragment>{ipInput}</Fragment>
},
{
title: 'Add the repository',
children: (
<div>
<Fragment>
<div>{repository}</div>
</Fragment>
</div>
)
},
{
title: 'Complete the installation',
children: (
@ -232,7 +173,7 @@ apt-get update`
<EuiFlexItem>
<EuiPanel>
<EuiFlexItem>
<EuiSteps steps={this.clearSteps(steps)} />
<EuiSteps steps={steps} />
</EuiFlexItem>
</EuiPanel>
</EuiFlexItem>