aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui/controllers/tor.py
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-10-02 16:44:03 +0200
committerficus <ficus@robocracy.org>2012-10-02 16:44:03 +0200
commitfcf6a8630b7ae818e7719d6e811d01d9359388c3 (patch)
tree81610e80263e0f326f300b1bc7ea4264df9f29ab /packages/torouter-web/src/tui/controllers/tor.py
parent7dcf9aa0db8585eb3489bcf0903e67bdd9dee027 (diff)
downloadtorouter-fcf6a8630b7ae818e7719d6e811d01d9359388c3.tar.gz
torouter-fcf6a8630b7ae818e7719d6e811d01d9359388c3.zip
remove unused told TUI
Diffstat (limited to 'packages/torouter-web/src/tui/controllers/tor.py')
-rw-r--r--packages/torouter-web/src/tui/controllers/tor.py59
1 files changed, 0 insertions, 59 deletions
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())
-
-