diff --git a/monkey_island/cc/admin/ui/index.html b/monkey_island/cc/admin/ui/index.html
index 86b0df33d..ca41f054a 100644
--- a/monkey_island/cc/admin/ui/index.html
+++ b/monkey_island/cc/admin/ui/index.html
@@ -151,10 +151,6 @@
onclick="loadMonkeyConfig()" style="margin-top:-4px">
Refresh
-
diff --git a/monkey_island/cc/admin/ui/js/monkeys-admin.js b/monkey_island/cc/admin/ui/js/monkeys-admin.js
index b0b6dee22..41afe7d6f 100644
--- a/monkey_island/cc/admin/ui/js/monkeys-admin.js
+++ b/monkey_island/cc/admin/ui/js/monkeys-admin.js
@@ -659,14 +659,12 @@ function killMonkey() {
var curr_config = monkeyCfg.getValue();
curr_config.alive = false;
monkeyCfg.setValue(curr_config);
- updateMonkeyConfig();
}
function reviveMonkey() {
var curr_config = monkeyCfg.getValue();
curr_config.alive = true;
monkeyCfg.setValue(curr_config);
- updateMonkeyConfig();
}
function toggleFocusOnNode() {
@@ -694,6 +692,7 @@ function loadNewMonkeysConfig() {
delete json.id;
newCfg.setValue(json);
}
+ newCfg.watch('root', updateNewMonkeysConfig);
});
}
@@ -738,7 +737,9 @@ function loadMonkeyConfig() {
var monkey = getMonkey(node[0]);
+ monkeyCfg.unwatch('root', updateMonkeyConfig);
monkeyCfg.setValue(monkey.config);
+ monkeyCfg.watch('root', updateMonkeyConfig);
}
function updateMonkeyConfig() {