lots of web ui work
This commit is contained in:
parent
f0c72ef1c8
commit
e5fc15acc2
16 changed files with 37 additions and 19 deletions
|
@ -23,4 +23,4 @@ def pick_proxy(peer_address):
|
|||
return 'tor'
|
||||
elif peer_address.endswith('.i2p'):
|
||||
return 'i2p'
|
||||
raise ValueError("Peer address was not string ending with acceptable value")
|
||||
raise ValueError(f"Peer address was not string ending with acceptable value: {peer_address}")
|
|
@ -38,7 +38,7 @@ def add_friend(pubkey):
|
|||
|
||||
@friends.route('/friends/remove/<pubkey>', methods=['POST'])
|
||||
def remove_friend(pubkey):
|
||||
contactmanager.ContactManager(pubkey).setTrust(0)
|
||||
contactmanager.ContactManager(pubkey).delete_contact()
|
||||
return redirect(request.referrer + '#' + request.form['token'])
|
||||
|
||||
@friends.route('/friends/setinfo/<pubkey>/<key>', methods=['POST'])
|
||||
|
|
|
@ -4,10 +4,13 @@ import onionrblocks
|
|||
import logger
|
||||
import coredb
|
||||
|
||||
def _check_remote_node(testmanager):
|
||||
return
|
||||
|
||||
def insert_bin_test(testmanager):
|
||||
data = os.urandom(32)
|
||||
b_hash = onionrblocks.insert(data, )
|
||||
|
||||
|
||||
if not b_hash in coredb.blockmetadb.get_block_list():
|
||||
logger.error(str(b_hash) + 'is not in bl')
|
||||
raise ValueError
|
||||
raise ValueError
|
||||
|
|
|
@ -40,8 +40,10 @@ class SerializedData:
|
|||
except AttributeError:
|
||||
time.sleep(1)
|
||||
comm_inst = self._too_many.get(communicator.OnionrCommunicatorDaemon, args=(self._too_many,))
|
||||
connected = []
|
||||
[connected.append(x) for x in comm_inst.onlinePeers if x not in connected]
|
||||
stats['uptime'] = comm_inst.getUptime()
|
||||
stats['connectedNodes'] = '\n'.join(comm_inst.onlinePeers)
|
||||
stats['connectedNodes'] = '\n'.join(connected)
|
||||
stats['blockCount'] = len(blockmetadb.get_block_list())
|
||||
stats['blockQueueCount'] = len(comm_inst.blockQueue)
|
||||
return json.dumps(stats)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue