aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/tui
diff options
context:
space:
mode:
authorArturo FilastoĢ€ <hellais@torproject.org>2011-08-12 20:50:12 +0200
committerArturo FilastoĢ€ <hellais@torproject.org>2011-08-12 20:50:12 +0200
commitd6fe8f27bb248a0850a657520f263835ca961e1f (patch)
tree6d346d61970f2315ce6d6e516d8643a4621d422c /packages/torouter-web/tui
parent49d2d4bf2ef7bf7098a034aa1004a3617a9cda9d (diff)
downloadtorouter-d6fe8f27bb248a0850a657520f263835ca961e1f.tar.gz
torouter-d6fe8f27bb248a0850a657520f263835ca961e1f.zip
Add dummy configuration update functions
Diffstat (limited to 'packages/torouter-web/tui')
-rw-r--r--packages/torouter-web/tui/controllers/network.py18
-rw-r--r--packages/torouter-web/tui/controllers/tor.py4
2 files changed, 21 insertions, 1 deletions
diff --git a/packages/torouter-web/tui/controllers/network.py b/packages/torouter-web/tui/controllers/network.py
index 7022ca4..10b0c9d 100644
--- a/packages/torouter-web/tui/controllers/network.py
+++ b/packages/torouter-web/tui/controllers/network.py
@@ -28,6 +28,10 @@ def menu(n):
The main page for network configuration
"""
class main:
+ # XXX do all the backend stuff
+ def update_config(self, data):
+ return True
+
def GET(self):
if session.is_logged() > 0:
return render.base(render.main(),menu(0))
@@ -36,6 +40,7 @@ class main:
def POST(self):
if session.is_logged() > 0:
+ self.update_config(web.input())
return render.base(render.main(),menu(0))
else:
return render.base(render.login())
@@ -44,6 +49,10 @@ class main:
The firewall configuration page
"""
class firewall:
+ # XXX do all the backend stuff
+ def update_config(self, data):
+ return True
+
def GET(self):
if session.is_logged() > 0:
return render.base(render.main(),menu(0))
@@ -52,6 +61,7 @@ class firewall:
def POST(self):
if session.is_logged() > 0:
+ self.update_config(web.input())
return render.base(render.firewall(),menu(1))
else:
return render.base(render.login())
@@ -89,6 +99,7 @@ class wireless:
return True
+ # XXX do all the backend stuff
def update_config(self, data):
return True
@@ -101,7 +112,7 @@ class wireless:
def POST(self):
if session.is_logged() > 0:
- self.update_config(None)
+ self.update_config(web.input())
print web.input()
return render.base(render.saved(web.input()),menu(2))
else:
@@ -111,6 +122,10 @@ class wireless:
Wired network configuration page
"""
class wired:
+ # XXX do all the backend stuff
+ def update_config(self, data):
+ return True
+
def GET(self):
if session.is_logged() > 0:
return render.base(render.wired(),menu(3))
@@ -119,6 +134,7 @@ class wired:
def POST(self):
if session.is_logged() > 0:
+ self.update_config(web.input())
return render.base(render.wired(),menu(3))
else:
return render.base(render.login())
diff --git a/packages/torouter-web/tui/controllers/tor.py b/packages/torouter-web/tui/controllers/tor.py
index ca96209..d07cb71 100644
--- a/packages/torouter-web/tui/controllers/tor.py
+++ b/packages/torouter-web/tui/controllers/tor.py
@@ -17,9 +17,13 @@ class status:
Tor configuration page
"""
class config:
+ def update_config(self, data):
+ return True
+
def GET(self):
return render.base(render.torconfig())
def POST(self):
+ self.update_config(web.input())
return render.base(render.torconfig())