Archived
1
0

update mod panel connections view

This commit is contained in:
Jeff Becker 2016-03-12 09:44:51 -05:00
parent f8a6b32b5f
commit f972d91137
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -142,6 +142,13 @@ function nntpchan_delete() {
});
}
function createConnectionElement(j) {
var e = document.createElement("div");
e.setAttribute("class", "connection");
e.appendChild(document.createTextNode(JSON.stringify(j)));
return e;
}
function inject_nntp_feed_element(feed, elem) {
var name = document.createElement("div");
name.setAttribute("class", "feeds_name");
@ -150,8 +157,10 @@ function inject_nntp_feed_element(feed, elem) {
elem.appendChild(name);
var conns = document.createElement("div");
conns.setAttribute("class", "feeds_connections");
conns_elem = document.createTextNode("Connections: "+feed.Conns.length);
conns.setAttribute("class", "connections");
for ( var idx = 0 ; idx < feed.Conns.length; idx ++ ) {
conns.appendChild(createConnectionElement(feed.Conns[idx]));
}
conns.appendChild(conns_elem);
elem.appendChild(conns);
}