%# Note that this file is not a valid *.html file! %# It is intended to be a bottlepy - style template %# used for the scripting part of TheOnionBox! <% tor = get('tor') if tor is None else tor oo_details = get('oo_details') if oo_details is None else oo_details oo_bw = get('oo_bw') %> {{!group_row('Bandwidth')}} % publ = oo_bw.published() % if publ is not None: {{!standard_row('Status Time', publ)}} % end
History Charts
Recorded Bandwidth
Values
<% bwv = '' bwv_items = {'advertised_bandwidth': 'Advertised', 'bandwidth_rate': 'Rate', 'bandwidth_burst': 'Burst', 'observed_bandwidth': 'Observed'} for key, text in bwv_items.items(): if oo_details(key): if len(bwv) > 0: bwv += ' | ' end bwv += '{}: {}/s'.format(text, pretty_number(oo_details(key))) end end %> {{bwv}}