From 90419a4f2d5d94db9f8be99ded9e1a7ed6ba98e0 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 9 Aug 2014 21:27:20 +0100 Subject: [PATCH] [#2450] [WebUI] Fix empty Peers tab Also fix missing flags and tracker icons. --- deluge/ui/web/js/deluge-all/details/PeersTab.js | 2 ++ deluge/ui/web/server.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/details/PeersTab.js b/deluge/ui/web/js/deluge-all/details/PeersTab.js index 490c49ff4..c5a1dee0c 100644 --- a/deluge/ui/web/js/deluge-all/details/PeersTab.js +++ b/deluge/ui/web/js/deluge-all/details/PeersTab.js @@ -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(":"); diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 1c80a4b2b..4f3deebb5 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -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",