update WUI welcome page with new connection-status info

This shows current-connection info, and provides per-hint status details in a
tooltip.

The "Connection" section no longer shows seconds-since-loss when the server
was not connected (previously it showed seconds-since-connect when connected,
and flipped to seconds-since-loss when disconnected). We already have the
"Last RX" column, which is arguably more meaningful (and I can't think of a
good case when these would differ), so we don't really need
seconds-since-loss, and the new ConnectionStatus doesn't track it anyways.

So now the "Connection" timestamp for non-connected servers is just
"N/A" (both the main text and the tooltip). The "Introducers" section was
changed the same way.

This moves the per-server connection timestamp out of the nickname/serverid
box and over into the Connection box. It also right-floats all timestamps,
regardless of which box they're in, which makes them share the box with
connection_status more politely.

Internally, this adds code to create ConnectionStatus objects when necessary.
This commit is contained in:
Brian Warner
2016-12-08 15:15:49 -08:00
parent 48fc14bd30
commit 77fd41b66e
8 changed files with 127 additions and 93 deletions

View File

@ -610,7 +610,7 @@ class Client(node.Node, pollmixin.PollMixin):
return self.encoding_params
def introducer_connection_statuses(self):
return [ic.connected_to_introducer() for ic in self.introducer_clients]
return [ic.connection_status() for ic in self.introducer_clients]
def connected_to_introducer(self):
return any([ic.connected_to_introducer() for ic in self.introducer_clients])