public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Vikraman Choudhury" <vikraman.choudhury@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoostats:master commit in: server/, server/templates/
Date: Wed,  3 Aug 2011 23:45:50 +0000 (UTC)	[thread overview]
Message-ID: <6a6a09d88f50282b910ef82c47bb4bb21cd48556.vikraman@gentoo> (raw)

commit:     6a6a09d88f50282b910ef82c47bb4bb21cd48556
Author:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
AuthorDate: Wed Aug  3 23:45:24 2011 +0000
Commit:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
CommitDate: Wed Aug  3 23:45:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoostats.git;a=commit;h=6a6a09d8

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 @@
 
+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)

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
 
 Welcome to the gentoostats webapp <br/>
@@ -7,18 +7,18 @@ Number of hosts: $count<br/>
 
 <h2>Statistics</h2>
 <ul>
-    <li>Arch statistics: <a href="/gentoostats/arch">/arch</a></li>
-    <li>Portage feature statistics: <a href="/gentoostats/feature">/feature</a></li>
-    <li>Keyword statistics: <a href="/gentoostats/keyword">/keyword</a></li>
-    <li>Language statistics: <a href="/gentoostats/lang">/lang</a></li>
-    <li>Mirror statistics: <a href="/gentoostats/mirror">/mirror</a></li>
-    <li>Package statistics: <a href="/gentoostats/package">/package</a></li>
-    <li>Profile statistics: <a href="/gentoostats/profile">/profile</a></li>
-    <li>Repository statistics: <a href="/gentoostats/repo">/repo</a></li>
-    <li>Useflag statistics: <a href="/gentoostats/use">/use</a></li>
+    <li>Arch statistics: <a href="arch">/arch</a></li>
+    <li>Portage feature statistics: <a href="feature">/feature</a></li>
+    <li>Keyword statistics: <a href="keyword">/keyword</a></li>
+    <li>Language statistics: <a href="lang">/lang</a></li>
+    <li>Mirror statistics: <a href="mirror">/mirror</a></li>
+    <li>Package statistics: <a href="package">/package</a></li>
+    <li>Profile statistics: <a href="profile">/profile</a></li>
+    <li>Repository statistics: <a href="repo">/repo</a></li>
+    <li>Useflag statistics: <a href="use">/use</a></li>
 </ul>
 
 <h2>Package search</h2>
-<ul>
-    <li><a href="/gentoostats/search">/search</a></li>
-</ul>
+<form method="GET" action="/gentoostats/search">
+    $:form.render()
+</form>



             reply	other threads:[~2011-08-03 23:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 23:45 Vikraman Choudhury [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-11 20:41 [gentoo-commits] proj/gentoostats:master commit in: server/, server/templates/ Vikraman Choudhury
2011-08-03 21:52 Vikraman Choudhury
2011-07-17 21:51 Vikraman Choudhury
2011-07-09 17:09 Vikraman Choudhury
2011-07-07 19:40 Vikraman Choudhury
2011-07-07 16:02 Vikraman Choudhury
2011-07-03 18:04 Vikraman Choudhury
2011-06-14 17:43 Vikraman Choudhury
2011-05-06 14:42 Vikraman Choudhury

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a6a09d88f50282b910ef82c47bb4bb21cd48556.vikraman@gentoo \
    --to=vikraman.choudhury@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox