Removed unnecessary UI warning about config change not working if monkeys already ran

This commit is contained in:
VakarisZ 2020-05-19 11:31:52 +03:00
parent 54ac059d5e
commit 698a13960e
1 changed files with 0 additions and 24 deletions

View File

@ -30,7 +30,6 @@ class ConfigurePageComponent extends AuthComponent {
lastAction: 'none', lastAction: 'none',
sections: [], sections: [],
selectedSection: 'attack', selectedSection: 'attack',
monkeysRan: false,
PBAwinFile: [], PBAwinFile: [],
PBAlinuxFile: [], PBAlinuxFile: [],
showAttackAlert: false showAttackAlert: false
@ -108,7 +107,6 @@ class ConfigurePageComponent extends AuthComponent {
selectedSection: 'attack' selectedSection: 'attack'
}) })
}); });
this.updateMonkeysRunning();
}; };
updateConfig = () => { updateConfig = () => {
@ -359,14 +357,6 @@ class ConfigurePageComponent extends AuthComponent {
event.target.value = null; event.target.value = null;
}; };
updateMonkeysRunning = () => {
this.authFetch('/api')
.then(res => res.json())
.then(res => {
this.setState({monkeysRan: res['completed_steps']['run_monkey']});
});
};
PBAwindows = () => { PBAwindows = () => {
return (<FilePond return (<FilePond
server={{ server={{
@ -464,19 +454,6 @@ class ConfigurePageComponent extends AuthComponent {
</div>) </div>)
}; };
renderConfigWontChangeWarning = () => {
return (<div>
{this.state.monkeysRan ?
<div className="alert alert-warning">
<i className="glyphicon glyphicon-warning-sign" style={{'marginRight': '5px'}}/>
Changed configuration will only apply to new infections.
"Start over" to run again with different configuration.
</div>
: ''
}
</div>)
};
renderBasicNetworkWarning = () => { renderBasicNetworkWarning = () => {
if (this.state.selectedSection === 'basic_network') { if (this.state.selectedSection === 'basic_network') {
return (<div className="alert alert-info"> return (<div className="alert alert-info">
@ -514,7 +491,6 @@ class ConfigurePageComponent extends AuthComponent {
{this.renderAttackAlertModal()} {this.renderAttackAlertModal()}
<h1 className="page-title">Monkey Configuration</h1> <h1 className="page-title">Monkey Configuration</h1>
{this.renderNav()} {this.renderNav()}
{this.renderConfigWontChangeWarning()}
{content} {content}
<div className="text-center"> <div className="text-center">
<button type="submit" onClick={this.onSubmit} className="btn btn-success btn-lg" style={{margin: '5px'}}> <button type="submit" onClick={this.onSubmit} className="btn btn-success btn-lg" style={{margin: '5px'}}>