Reveal test server's FQDN:port along with sponsor and name

This commit is contained in:
Bob Sutterfield 2019-10-02 14:42:19 -07:00
parent c58ad3367b
commit 6018c97863
1 changed files with 5 additions and 4 deletions

View File

@ -36,7 +36,7 @@ except ImportError:
gzip = None gzip = None
GZIP_BASE = object GZIP_BASE = object
__version__ = '2.1.2' __version__ = '2.1.2.reveal-server'
class FakeShutdownEvent(object): class FakeShutdownEvent(object):
@ -1039,7 +1039,7 @@ class SpeedtestResults(object):
"""Return CSV Headers""" """Return CSV Headers"""
row = ['Server ID', 'Sponsor', 'Server Name', 'Timestamp', 'Distance', row = ['Server ID', 'Sponsor', 'Server Name', 'Timestamp', 'Distance',
'Ping', 'Download', 'Upload', 'Share', 'IP Address'] 'Ping', 'Download', 'Upload', 'Share', 'Client', 'Server']
out = StringIO() out = StringIO()
writer = csv.writer(out, delimiter=delimiter, lineterminator='') writer = csv.writer(out, delimiter=delimiter, lineterminator='')
writer.writerow([to_utf8(v) for v in row]) writer.writerow([to_utf8(v) for v in row])
@ -1054,7 +1054,8 @@ class SpeedtestResults(object):
row = [data['server']['id'], data['server']['sponsor'], row = [data['server']['id'], data['server']['sponsor'],
data['server']['name'], data['timestamp'], data['server']['name'], data['timestamp'],
data['server']['d'], data['ping'], data['download'], data['server']['d'], data['ping'], data['download'],
data['upload'], self._share or '', self.client['ip']] data['upload'], self._share or '', self.client['ip'],
data['server']['host']]
writer.writerow([to_utf8(v) for v in row]) writer.writerow([to_utf8(v) for v in row])
return out.getvalue() return out.getvalue()
@ -1928,7 +1929,7 @@ def shell():
results = speedtest.results results = speedtest.results
printer('Hosted by %(sponsor)s (%(name)s) [%(d)0.2f km]: ' printer('Hosted by %(sponsor)s (%(name)s) %(host)s [%(d)0.2f km]: '
'%(latency)s ms' % results.server, quiet) '%(latency)s ms' % results.server, quiet)
if args.download: if args.download: