commit d6fe8f27bb248a0850a657520f263835ca961e1f Author: Arturo Filastò hellais@torproject.org Date: Fri Aug 12 20:50:12 2011 +0200
Add dummy configuration update functions --- packages/torouter-web/tui/controllers/network.py | 18 +++++++++++++++++- packages/torouter-web/tui/controllers/tor.py | 4 ++++ 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())
tor-commits@lists.torproject.org