Skip to content

Commit

Permalink
show far parent in share explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed Jul 10, 2015
1 parent 7203957 commit 4e5afe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions p2pool/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def get_share(share_hash_str):

return dict(
parent='%064x' % share.previous_hash,
far_parent='%064x' % share.share_info['far_share_hash'],
children=['%064x' % x for x in sorted(node.tracker.reverse.get(share.hash, set()), key=lambda sh: -len(node.tracker.reverse.get(sh, set())))], # sorted from most children to least children
type_name=type(share).__name__,
local=dict(
Expand Down
3 changes: 3 additions & 0 deletions web-static/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
var parent = b.append('p')
parent.append('span').text('Parent: ');
parent.append('a').attr('href', '#' + share.parent).text(share.parent.substr(-8));
var far_parent = b.append('p')
far_parent.append('span').text('Far parent: ');
far_parent.append('a').attr('href', '#' + share.far_parent).text(share.far_parent.substr(-8));
var children = b.append('p');
children.append('span').text('Children: ');
children.selectAll().data(share.children).enter().append('span').text(' ').append('a')
Expand Down

0 comments on commit 4e5afe9

Please sign in to comment.