Skip to content

Commit

Permalink
LiveUpdate.
Browse files Browse the repository at this point in the history
(this does not work correctly at the Moment :-/)


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1003 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
allo committed Oct 29, 2005
1 parent 5526d2f commit 749f44d
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions htroot/js/WatchCrawler.js
Expand Up @@ -3,24 +3,39 @@ function handleResponse(){
var response = http.responseXML;
indexingTable=document.getElementById("indexingTable");
entries=response.getElementsByTagName("entry");

//skip the Tableheade
row=indexingTable.firstChild.nextSibling.nextSibling;

while(row != null){ //delete old entries
indexingTable.removeChild(row);
row=indexingTable.firstChild.nextSibling.nextSibling;
}

dark=false;
for(i=0;i<entries.length;i++){
row=document.createElement("tr");

//simply add all fields chronologically
//TODO: add them by Name
field=entries[i].firstChild;
while(field != null){
if(field.nodeType == 1 && field.nodeName != "inProcess"){//Element
if(field.nodeType == 1 && field.firstChild!=null && field.nodeName != "inProcess"){//Element
col=document.createElement("td");
text=document.createTextNode(field.firstChild.nodeValue);
col.appendChild(text);
row.appendChild(col);
}
field=field.nextSibling;
}

if(dark){
row.setAttribute("class", "TableCellDark");
}else{
row.setAttribute("class", "TableCellLight");
}
indexingTable.appendChild(row);
dark=!dark;
}
}
}
sndReq("/xml/queues/indexing_p.xml");
window.setInterval("sndReq('/xml/queues/indexing_p.xml')", 5000);

0 comments on commit 749f44d

Please sign in to comment.