From fcf6a8630b7ae818e7719d6e811d01d9359388c3 Mon Sep 17 00:00:00 2001 From: ficus Date: Tue, 2 Oct 2012 16:44:03 +0200 Subject: remove unused told TUI --- packages/torouter-web/src/tui/controllers/tor.py | 59 ------------------------ 1 file changed, 59 deletions(-) delete mode 100644 packages/torouter-web/src/tui/controllers/tor.py (limited to 'packages/torouter-web/src/tui/controllers/tor.py') diff --git a/packages/torouter-web/src/tui/controllers/tor.py b/packages/torouter-web/src/tui/controllers/tor.py deleted file mode 100644 index e671d80..0000000 --- a/packages/torouter-web/src/tui/controllers/tor.py +++ /dev/null @@ -1,59 +0,0 @@ -import web -from tui import config -from tui import view -from tui.view import render -from tui.utils import session, parsing, fileio - -""" -The main Tor status page -""" -class status: - def GET(self): - if session.is_logged() > 0: - trc = parsing.torrc(config.torrc_file) - trc.parse() - output = trc.html_output() - return render.base(render.torstatus(output,config.torrc_file)) - else: - return render.base(render.login()) - - - def POST(self): - if session.is_logged() > 0: - trc = parsing.torrc(config.torrc_file) - trc.parse() - output = trc.html_output() - return render.base(render.torstatus(output,config.torrc_file)) - else: - return render.base(render.login()) - -""" -Tor configuration page -""" -class torrc: - def update_config(self, data): - # Now it will just write to /tmp/torrc - files = [('/tmp/torrc',data.torrc)] - fileio.write(files) - - return True - - def GET(self): - if session.is_logged() > 0: - trc = parsing.torrc(config.torrc_file) - output = trc.output() - return render.base(render.torconfig(output)) - else: - return render.base(render.login()) - - def POST(self): - if session.is_logged() > 0: - self.update_config(web.input()) - trc = parsing.torrc(config.torrc_file) - trc.parse() - output = trc.html_output() - return render.base(render.torstatus(output,config.torrc_file)) - else: - return render.base(render.login()) - - -- cgit v1.2.3