[#2450] [WebUI] Fix empty Peers tab
Also fix missing flags and tracker icons.
This commit is contained in:
parent
8cc96d9b89
commit
90419a4f2d
|
@ -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(":");
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue