From 6d372485fc0b7317756015de52f97628eecfd77e Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 21 Jul 2022 10:09:35 +0200 Subject: [PATCH] UI: Reformat advanced.keep_tunnel_open_time --- .../src/components/configuration-components/ReformatHook.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js index 6be6c521c..10969a971 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js @@ -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; }