From 4472ad82c420b17bc06a8aaa536eb738f608ba88 Mon Sep 17 00:00:00 2001 From: "scotty.b.brown@gmail.com" Date: Tue, 28 Jun 2011 11:14:26 +0000 Subject: [PATCH] More work on #144 git-svn-id: https://beef.googlecode.com/svn/trunk@1039 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- .../media/javascript/ui/panel/zombiesTreeList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js b/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js index 500c0acc7..bb082f626 100644 --- a/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js +++ b/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js @@ -241,6 +241,7 @@ Ext.extend(zombiesTreeList, Ext.tree.TreePanel, { * @param: {Literal Object} object containing the list of hooked browsers. */ compareAndRemove: function(zombies) { + var arr = ['online', 'offline']; Ext.each(arr, function(branch_type) { @@ -290,9 +291,15 @@ Ext.extend(zombiesTreeList, Ext.tree.TreePanel, { } } + // if a HB is in both the node list and the new list - check its ip is still correct - and if not update it if(new_set_zombies_sessions.indexOf(hb_session)!=-1) { - // TODO #144 if the hb does exist in both the tree and the new set of HBs received - check the HB details in the tree and update where necessary(new IP address etc). + Ext.iterate(new_set_zombies, function(key, new_zombie) { + if (new_zombie.session == known_hooked_browser.session && new_zombie.ip != known_hooked_browser.ip) { + known_hooked_browser.ip = new_zombie.ip; + } + }); } + }, this); }, this); },