[#2450] [WebUI] Fix empty Peers tab

Also fix missing flags and tracker icons.
This commit is contained in:
Calum Lind 2014-08-09 21:27:20 +01:00
parent 8cc96d9b89
commit 90419a4f2d
2 changed files with 4 additions and 2 deletions

View File

@ -39,6 +39,8 @@
}
function peerAddressRenderer(value, p, record) {
var seed = (record.data['seed'] == 1024) ? 'x-deluge-seed' : 'x-deluge-peer';
// Modify display of IPv6 to include brackets
var peer_ip = value.split(':');
if (peer_ip.length > 2) {
var port = peer_ip.pop();
var ip = peer_ip.join(":");

View File

@ -196,7 +196,7 @@ class Tracker(resource.Resource):
request.finish()
def render(self, request):
d = self.tracker_icons.get(request.tracker_name)
d = self.tracker_icons.fetch(request.tracker_name)
d.addCallback(self.on_got_icon, request)
return server.NOT_DONE_YET
@ -207,7 +207,7 @@ class Flag(resource.Resource):
def render(self, request):
headers = {}
path = ("data", "pixmaps", "flags", request.country.lower() + ".png")
path = ("ui", "data", "pixmaps", "flags", request.country.lower() + ".png")
filename = common.resource_filename("deluge", os.path.join(*path))
if os.path.exists(filename):
request.setHeader("cache-control",