LiveUpdate.

(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
pull/1/head
allo 19 years ago
parent 5526d2ff73
commit 749f44d144

@ -3,6 +3,16 @@ 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");
@ -10,7 +20,7 @@ function handleResponse(){
//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);
@ -18,9 +28,14 @@ function handleResponse(){
}
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);

Loading…
Cancel
Save