Ejemplo n.º 1
0
def statuspage():
    status = dict()
    status['system'] = sysstatus.get_system_status()
    status['resources'] = sysstatus.get_resources_status()
    status['wan'] = netif.get_wan_status()
    status['lan'] = netif.get_lan_status()
    status['wifi'] = netif.get_wifi_status()
    status['tor'] = tor.get_tor_status()
    return render_template('home.html', settings=None, status=status)
Ejemplo n.º 2
0
def statuspage():
    status = dict()
    status['system'] = sysstatus.get_system_status()
    status['resources'] = sysstatus.get_resources_status()
    status['wan'] = netif.get_wan_status()
    status['lan'] = netif.get_lan_status()
    status['wifi'] = netif.get_wifi_status()
    status['tor'] = tor.get_tor_status()
    return render_template('home.html', settings=None, status=status)
Ejemplo n.º 3
0
def torpage():
    msg = list()
    status = dict()
    status['tor'] = tor.get_tor_status()
    # Check for reset first
    if request.method == 'POST' and \
            request.form.get('submit') == 'Restart':
        try:
            tor.restart_tor()
            msg.append(("info",
                "Reloading Tor daemon... please wait a minute then <a href='/tor'>revisit this page</a> (don't just reload)."),)  
        except Exception, err:
            msg.append(("error", err),)
        return render_template('tor.html', form=None, status=status,
            formerr=None, messages=msg)
Ejemplo n.º 4
0
def torpage():
    msg = list()
    status = dict()
    status['tor'] = tor.get_tor_status()
    # Check for reset first
    if request.method == 'POST' and \
            request.form.get('submit') == 'Restart':
        try:
            tor.restart_tor()
            msg.append((
                "info",
                "Reloading Tor daemon... please wait a minute then <a href='/tor'>revisit this page</a> (don't just reload)."
            ), )
        except Exception, err:
            msg.append(("error", err), )
        return render_template('tor.html',
                               form=None,
                               status=status,
                               formerr=None,
                               messages=msg)