From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qol8S-0002Js-Cn for garchives@archives.gentoo.org; Wed, 03 Aug 2011 23:46:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45CDB21C086; Wed, 3 Aug 2011 23:45:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0AB0421C086 for ; Wed, 3 Aug 2011 23:45:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 535692AC013 for ; Wed, 3 Aug 2011 23:45:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9E3968003C for ; Wed, 3 Aug 2011 23:45:50 +0000 (UTC) From: "Vikraman Choudhury" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Vikraman Choudhury" Message-ID: <6a6a09d88f50282b910ef82c47bb4bb21cd48556.vikraman@gentoo> Subject: [gentoo-commits] proj/gentoostats:master commit in: server/, server/templates/ X-VCS-Repository: proj/gentoostats X-VCS-Files: server/index.py server/templates/index.html X-VCS-Directories: server/ server/templates/ X-VCS-Committer: vikraman X-VCS-Committer-Name: Vikraman Choudhury X-VCS-Revision: 6a6a09d88f50282b910ef82c47bb4bb21cd48556 Date: Wed, 3 Aug 2011 23:45:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 9f85ff476aa96fe4945da24cf02c3199 commit: 6a6a09d88f50282b910ef82c47bb4bb21cd48556 Author: Vikraman Choudhury gmail com> AuthorDate: Wed Aug 3 23:45:24 2011 +0000 Commit: Vikraman Choudhury gmail com> CommitDate: Wed Aug 3 23:45:24 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoostats.g= it;a=3Dcommit;h=3D6a6a09d8 updates to index page, trying out relative urls --- server/index.py | 16 +++++++++++++++- server/templates/index.html | 26 +++++++++++++------------- 2 files changed, 28 insertions(+), 14 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 @@ =20 +from web import form from config import render, db =20 +search_form =3D form.Form( + form.Textbox('cat', value =3D 'any', description =3D 'Category')= , + form.Textbox('pkg', value =3D 'any', description =3D 'Package'), + form.Textbox('ver', value =3D 'any', description =3D 'Version'), + form.Textbox('repo', value =3D 'any', description =3D 'Repositor= y'), + form.Textbox('min_hosts', value =3D 'any', description =3D 'Mini= mum hosts'), + form.Textbox('max_hosts', value =3D 'any', description =3D 'Maxi= mum hosts'), + form.Button('Search', type =3D 'submit') + ) + class Index(object): def GET(self): hosts =3D db.select('HOSTS', what=3D'COUNT(UUID) as COUNT') count =3D hosts[0]['COUNT'] - return render.index(count) + + form =3D search_form() + + return render.index(count, form) diff --git a/server/templates/index.html b/server/templates/index.html index e601b26..24f7ea7 100644 --- a/server/templates/index.html +++ b/server/templates/index.html @@ -1,4 +1,4 @@ -$def with (count) +$def with (count, form) $var title: Gentoostats =20 Welcome to the gentoostats webapp
@@ -7,18 +7,18 @@ Number of hosts: $count
=20

Statistics

=20

Package search

- +
+ $:form.render() +