[llvm-commits] [zorg] r125898 - in /zorg/trunk/llvmlab/llvmlab/ui: frontend/views.py templates/admin.html templates/index.html
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:42:34 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:42:33 2011
New Revision: 125898
URL: http://llvm.org/viewvc/llvm-project?rev=125898&view=rev
Log:
llvmlab: Sketch an admin page.
Added:
zorg/trunk/llvmlab/llvmlab/ui/templates/admin.html
Modified:
zorg/trunk/llvmlab/llvmlab/ui/frontend/views.py
zorg/trunk/llvmlab/llvmlab/ui/templates/index.html
Modified: zorg/trunk/llvmlab/llvmlab/ui/frontend/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/frontend/views.py?rev=125898&r1=125897&r2=125898&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/frontend/views.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/frontend/views.py Fri Feb 18 10:42:33 2011
@@ -8,6 +8,9 @@
from flask import current_app
frontend = flask.Module(__name__)
+###
+# Top-level Information
+
@frontend.route('/')
def index():
return render_template("index.html")
@@ -16,10 +19,19 @@
def favicon_ico():
return redirect(url_for('.static', filename='favicon.ico'))
+ at frontend.route('/admin')
+def admin():
+ return render_template("admin.html")
+
+###
+# Machine Management
@frontend.route('/machines')
def machines():
return render_template("machines.html")
+###
+# User Management
+
@frontend.route('/users')
def users():
return render_template("users.html")
@@ -32,6 +44,9 @@
return render_template("user.html", user=user)
+###
+# Session Management
+
@frontend.route('/login', methods=['GET', 'POST'])
def login():
# If this isn't a post request, return the login template.
Added: zorg/trunk/llvmlab/llvmlab/ui/templates/admin.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/admin.html?rev=125898&view=auto
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/admin.html (added)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/admin.html Fri Feb 18 10:42:33 2011
@@ -0,0 +1,9 @@
+{% extends "layout.html" %}
+{% block title %}home{% endblock %}
+{% block body %}
+
+<h1>Admin</h1>
+
+<li><a href="{{ url_for('add_machine') }}">Add Machine</a></li>
+
+{% endblock %}
Modified: zorg/trunk/llvmlab/llvmlab/ui/templates/index.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/index.html?rev=125898&r1=125897&r2=125898&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/index.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/index.html Fri Feb 18 10:42:33 2011
@@ -7,10 +7,11 @@
<li><a href="{{ url_for('login') }}">login</a></li>
<li><a href="{{ url_for('logout') }}">logout</a></li>
<li><a href="{{ url_for('users') }}">users</a></li>
+<li><a href="{{ url_for('dashboard') }}">dashboard</a></li>
{% if session.logged_in %}
<li><a href="{{ url_for('user', username=session.active_user) }}">my info</a></li>
+<li><a href="{{ url_for('admin') }}">admin</a></li>
{% endif %}
-<li><a href="{{ url_for('dashboard') }}">dashboard</a></li>
</ul>
</div>
More information about the llvm-commits
mailing list