Matrix reset bugfix
This commit is contained in:
parent
4c0f73cb91
commit
fd551a49b1
|
@ -75,19 +75,6 @@ class MatrixComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
resetConfig = () => {
|
|
||||||
this.authFetch('/api/attack',
|
|
||||||
{
|
|
||||||
method: 'POST',
|
|
||||||
headers: {'Content-Type': 'application/json'},
|
|
||||||
body: JSON.stringify('reset_attack_matrix')
|
|
||||||
})
|
|
||||||
.then(res => res.json())
|
|
||||||
.then(res => {
|
|
||||||
this.updateStateFromConfig(res.configuration, 'reset')
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
getTableData = (config) => {
|
getTableData = (config) => {
|
||||||
let configCopy = JSON.parse(JSON.stringify(config));
|
let configCopy = JSON.parse(JSON.stringify(config));
|
||||||
let maxTechniques = MatrixComponent.findMaxTechniques(Object.values(configCopy));
|
let maxTechniques = MatrixComponent.findMaxTechniques(Object.values(configCopy));
|
||||||
|
|
|
@ -274,12 +274,14 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
});
|
});
|
||||||
this.setInitialConfig(res.configuration);
|
this.setInitialConfig(res.configuration);
|
||||||
this.props.onStatusChange();
|
this.props.onStatusChange();
|
||||||
}).then(this.authFetch(ATTACK_URL,{ method: 'POST',
|
});
|
||||||
headers: {'Content-Type': 'application/json'},
|
this.authFetch(ATTACK_URL,{ method: 'POST',
|
||||||
body: JSON.stringify('reset_attack_matrix')}))
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: JSON.stringify('reset_attack_matrix')})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.setState({attackConfig: res.configuration})
|
this.setState({attackConfig: res.configuration});
|
||||||
|
this.setInitialAttackConfig(res.configuration);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ $black: #000000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 50%;
|
width: 100%;
|
||||||
transform: translate3d(-50%, -50%, 0); // center center by default
|
transform: translate3d(-50%, -50%, 0); // center center by default
|
||||||
|
|
||||||
// set the square
|
// set the square
|
||||||
|
|
Loading…
Reference in New Issue