forked from p15670423/monkey
UI: Add defaults for the payloads section
This commit is contained in:
parent
a4e66a0c9e
commit
88663f5276
|
@ -64,7 +64,9 @@ class ConfigurePageComponent extends AuthComponent {
|
|||
|
||||
setInitialConfig(config) {
|
||||
// Sets a reference to know if config was changed
|
||||
console.log(config, SCHEMA);
|
||||
this.initialConfig = JSON.parse(JSON.stringify(config));
|
||||
console.log(this.initialConfig);
|
||||
}
|
||||
|
||||
componentDidMount = () => {
|
||||
|
@ -267,9 +269,15 @@ class ConfigurePageComponent extends AuthComponent {
|
|||
|
||||
this.updateConfigSection();
|
||||
this.currentSection = key;
|
||||
let selectedSectionData = this.state.configuration[key];
|
||||
|
||||
if(key == 'payloads') {
|
||||
selectedSectionData = this.state.configuration[key][0]['options'];
|
||||
}
|
||||
|
||||
this.setState({
|
||||
selectedSection: key,
|
||||
currentFormData: this.state.configuration[key]
|
||||
currentFormData: selectedSectionData
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue