%# 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!

<%
    try:
       from tob.template_tools import *
    except ModuleNotFoundError:
        from theonionbox.tob.template_tools import *
    end

    #tor = get('tor', None)
    #accounting_on = tor.get_isAccountingEnabled() if tor else False
    #if accounting_on:
    #    acc_stats = tor.get_accountingStats()
    #end
%>

{{!header_row('Tor', 'Accounting', 'accounting')}}

<div class="row acc_off" style="display: none">
    <div class="{{box_datum_grid}}">
        Status
    </div>
    <div class="{{box_value_grid}} box_value_margin">
        <span class="text-left" style="color: grey;">
            disabled
        </span>
    </div>
</div>
<div class="row acc_on">
    <div class="{{box_datum_grid}}">
        Status
    </div>
    <div class="{{box_value_grid}} box_value_margin">
        <span style="color: green;" id="acc_status">
            %# <!-- acc_stats.status -->
            ... waiting for data ...
        </span>
    </div>
</div>
<div class="row acc_on">
    <div class="{{box_datum_grid}}">
        Download
    </div>
    <div class="{{box_value_grid}}">
        <div id="acc_down" class="box_value_margin">
            %# <!-- acc_stats.read_bytes -->
        </div>
    </div>
</div>
<div class="row acc_on">
    <div class="{{box_datum_grid}}">
        Upload
    </div>
    <div class="{{box_value_grid}}">
        <div id="acc_up" class="box_value_margin">
            %# <!-- acc_stats.written_bytes -->
        </div>
    </div>
</div>
<div class="row acc_on">
    <div class="{{box_datum_grid}}">
        End of Interval
    </div>
    <div class="{{box_value_grid}}">
        <div id="acc_interval" class="box_value_margin">
            %# <!-- acc_stats.interval_end-->
        </div>
    </div>
</div>

<hr>
