UI: Reformat advanced.keep_tunnel_open_time

This commit is contained in:
Ilija Lazoroski 2022-07-21 10:09:35 +02:00
parent 4f4bba23cf
commit 6d372485fc
1 changed files with 5 additions and 1 deletions

View File

@ -3,9 +3,13 @@ import _ from 'lodash';
export function reformatConfig(config, reverse = false) {
if (reverse) {
config['payloads'] = [{'name': 'ransomware', 'options': config['payloads']}]
config['payloads'] = [{'name': 'ransomware', 'options': config['payloads']}];
config['keep_tunnel_open_time'] = config['advanced']['keep_tunnel_open_time'];
delete config['advanced'];
} else {
config['payloads'] = config['payloads'][0]['options'];
config['advanced'] = {};
config['advanced']['keep_tunnel_open_time'] = config['keep_tunnel_open_time'];
}
return config;
}