diff options
Diffstat (limited to 'server/index.py')
-rw-r--r-- | server/index.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/server/index.py b/server/index.py index e6a63f5..2204bd3 100644 --- a/server/index.py +++ b/server/index.py @@ -1,8 +1,22 @@ +from web import form from config import render, db +search_form = form.Form( + form.Textbox('cat', value = 'any', description = 'Category'), + form.Textbox('pkg', value = 'any', description = 'Package'), + form.Textbox('ver', value = 'any', description = 'Version'), + form.Textbox('repo', value = 'any', description = 'Repository'), + form.Textbox('min_hosts', value = 'any', description = 'Minimum hosts'), + form.Textbox('max_hosts', value = 'any', description = 'Maximum hosts'), + form.Button('Search', type = 'submit') + ) + class Index(object): def GET(self): hosts = db.select('HOSTS', what='COUNT(UUID) as COUNT') count = hosts[0]['COUNT'] - return render.index(count) + + form = search_form() + + return render.index(count, form) |