From f972d91137f77a93f511a08f088f9e138425a434 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 12 Mar 2016 09:44:51 -0500 Subject: [PATCH] update mod panel connections view --- contrib/static/mod.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/static/mod.js b/contrib/static/mod.js index fd3c220..6376806 100644 --- a/contrib/static/mod.js +++ b/contrib/static/mod.js @@ -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); }