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 1QdSDO-0002uR-U6 for garchives@archives.gentoo.org; Sun, 03 Jul 2011 19:20:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 042BD21C023; Sun, 3 Jul 2011 19:20:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2A1AE21C031 for ; Sun, 3 Jul 2011 19:20:03 +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 A96B02AC19D for ; Sun, 3 Jul 2011 18:04:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0FC8F8003D for ; Sun, 3 Jul 2011 18:04:15 +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: Subject: [gentoo-commits] proj/gentoostats:master commit in: server/, server/templates/ X-VCS-Repository: proj/gentoostats X-VCS-Files: server/app.py server/arch.py server/feature.py server/kwd.py server/lang.py server/mirror.py server/profile.py server/repo.py server/templates/arch.html server/templates/feature.html server/templates/keyword.html server/templates/lang.html server/templates/mirror.html server/templates/profile.html server/templates/repo.html server/templates/use.html server/use.py X-VCS-Directories: server/ server/templates/ X-VCS-Committer: vikraman X-VCS-Committer-Name: Vikraman Choudhury X-VCS-Revision: f5f0837b3bb3a7bdbf3adde70a6defcb3819c602 Date: Sun, 3 Jul 2011 18:04:15 +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: b1cd110780a97f073d7ce855b687b8bf commit: f5f0837b3bb3a7bdbf3adde70a6defcb3819c602 Author: Vikraman Choudhury gmail com> AuthorDate: Sun Jul 3 18:03:33 2011 +0000 Commit: Vikraman Choudhury gmail com> CommitDate: Sun Jul 3 18:03:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoostats.g= it;a=3Dcommit;h=3Df5f0837b more stats pages --- server/app.py | 16 ++++++++++++++++ server/arch.py | 10 ++++++++++ server/feature.py | 10 ++++++++++ server/kwd.py | 10 ++++++++++ server/lang.py | 10 ++++++++++ server/mirror.py | 10 ++++++++++ server/profile.py | 10 ++++++++++ server/repo.py | 10 ++++++++++ server/templates/arch.html | 11 +++++++++++ server/templates/feature.html | 11 +++++++++++ server/templates/keyword.html | 12 ++++++++++++ server/templates/lang.html | 11 +++++++++++ server/templates/mirror.html | 11 +++++++++++ server/templates/profile.html | 11 +++++++++++ server/templates/repo.html | 12 ++++++++++++ server/templates/use.html | 11 +++++++++++ server/use.py | 10 ++++++++++ 17 files changed, 186 insertions(+), 0 deletions(-) diff --git a/server/app.py b/server/app.py index 89ade62..ba77639 100755 --- a/server/app.py +++ b/server/app.py @@ -4,10 +4,26 @@ import web import config from config import render from index import Index +from arch import Arch +from profile import Profile +from mirror import Mirror +from feature import Feature +from kwd import Keyword +from use import Use +from repo import Repo +from lang import Lang from host import Host =20 urls =3D ( r'/', 'Index', + r'/arch', 'Arch', + r'/profile', 'Profile', + r'/mirror', 'Mirror', + r'/feature', 'Feature', + r'/keyword', 'Keyword', + r'/use', 'Use', + r'/repo', 'Repo', + r'/lang', 'Lang', r'/host/(.+)', 'Host' ) =20 diff --git a/server/arch.py b/server/arch.py new file mode 100644 index 0000000..a389b8f --- /dev/null +++ b/server/arch.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Arch(object): + def GET(self): + arch_count =3D db.select('ENV', what=3D'ARCH, COUNT(UUID) AS HOSTS', gr= oup=3D'ARCH') + arch_data =3D dict() + for t in arch_count: + arch_data[t['ARCH']] =3D {'HOSTS':t['HOSTS']} + return render.arch(arch_data) diff --git a/server/feature.py b/server/feature.py new file mode 100644 index 0000000..4b79da5 --- /dev/null +++ b/server/feature.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Feature(object): + def GET(self): + feature_count =3D db.query('SELECT FEATURE,COUNT(UUID) AS HOSTS FROM HO= ST_FEATURES NATURAL JOIN FEATURES GROUP BY FEATURE') + feature_data =3D dict() + for t in feature_count: + feature_data[t['FEATURE']] =3D {'HOSTS':t['HOSTS']} + return render.feature(feature_data) diff --git a/server/kwd.py b/server/kwd.py new file mode 100644 index 0000000..88fc799 --- /dev/null +++ b/server/kwd.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Keyword(object): + def GET(self): + keyword_count =3D db.query('SELECT KEYWORD, COUNT(DISTINCT IPKEY) AS PA= CKAGES, COUNT(DISTINCT UUID) AS HOSTS FROM GLOBAL_KEYWORDS NATURAL JOIN K= EYWORDS NATURAL JOIN INSTALLED_PACKAGES GROUP BY KEYWORD') + keyword_data =3D dict() + for t in keyword_count: + keyword_data[t['KEYWORD']] =3D {'HOSTS':t['HOSTS'],'PACKAGES':t['PACK= AGES']} + return render.keyword(keyword_data) diff --git a/server/lang.py b/server/lang.py new file mode 100644 index 0000000..3f4ebfb --- /dev/null +++ b/server/lang.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Lang(object): + def GET(self): + lang_count =3D db.query('SELECT LANG,COUNT(UUID) AS HOSTS FROM HOST_LAN= G NATURAL JOIN LANG GROUP BY LANG') + lang_data =3D dict() + for t in lang_count: + lang_data[t['LANG']] =3D {'HOSTS':t['HOSTS']} + return render.lang(lang_data) diff --git a/server/mirror.py b/server/mirror.py new file mode 100644 index 0000000..7084831 --- /dev/null +++ b/server/mirror.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Mirror(object): + def GET(self): + mirror_count =3D db.query('SELECT MIRROR,COUNT(UUID) AS HOSTS FROM HOST= _MIRRORS NATURAL JOIN GENTOO_MIRRORS GROUP BY MIRROR') + mirror_data =3D dict() + for t in mirror_count: + mirror_data[t['MIRROR']] =3D {'HOSTS':t['HOSTS']} + return render.mirror(mirror_data) diff --git a/server/profile.py b/server/profile.py new file mode 100644 index 0000000..211963c --- /dev/null +++ b/server/profile.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Profile(object): + def GET(self): + profile_count =3D db.select('ENV', what=3D'PROFILE, COUNT(UUID) AS HOST= S', group=3D'PROFILE') + profile_data =3D dict() + for t in profile_count: + profile_data[t['PROFILE']] =3D {'HOSTS':t['HOSTS']} + return render.profile(profile_data) diff --git a/server/repo.py b/server/repo.py new file mode 100644 index 0000000..4348248 --- /dev/null +++ b/server/repo.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Repo(object): + def GET(self): + repo_count =3D db.query('select REPO,COUNT(DISTINCT IPKEY) AS PACKAGES,= COUNT(DISTINCT UUID) AS HOSTS from INSTALLED_PACKAGES natural join REPOSI= TORIES group by REPO') + repo_data =3D dict() + for t in repo_count: + repo_data[t['REPO']] =3D {'HOSTS':t['HOSTS'], 'PACKAGES':t['PACKAGES'= ]} + return render.repo(repo_data) diff --git a/server/templates/arch.html b/server/templates/arch.html new file mode 100644 index 0000000..535399c --- /dev/null +++ b/server/templates/arch.html @@ -0,0 +1,11 @@ +$def with (arch_data) +$var title: Arch + + + + + + + $for arch in arch_data.keys(): + +
ArchHosts
$arch$arch_data[arch]['HOSTS']
diff --git a/server/templates/feature.html b/server/templates/feature.htm= l new file mode 100644 index 0000000..03c4bbd --- /dev/null +++ b/server/templates/feature.html @@ -0,0 +1,11 @@ +$def with (feature_data) +$var title: Feature + + + + + + + $for feature in feature_data.keys(): + +
FeatureHosts
$feature$feature_data[feature]['HOSTS']
diff --git a/server/templates/keyword.html b/server/templates/keyword.htm= l new file mode 100644 index 0000000..4855040 --- /dev/null +++ b/server/templates/keyword.html @@ -0,0 +1,12 @@ +$def with (keyword_data) +$var title: Keyword + + + + + + + + $for keyword in keyword_data.keys(): + +
KeywordHostsPackages
$keyword$keyword_data[keyword]['HOSTS']$ke= yword_data[keyword]['PACKAGES']
diff --git a/server/templates/lang.html b/server/templates/lang.html new file mode 100644 index 0000000..cfda84a --- /dev/null +++ b/server/templates/lang.html @@ -0,0 +1,11 @@ +$def with (lang_data) +$var title: Lang + + + + + + + $for lang in lang_data.keys(): + +
LangHosts
$lang$lang_data[lang]['HOSTS']
diff --git a/server/templates/mirror.html b/server/templates/mirror.html new file mode 100644 index 0000000..a6189bc --- /dev/null +++ b/server/templates/mirror.html @@ -0,0 +1,11 @@ +$def with (mirror_data) +$var title: Mirror + + + + + + + $for mirror in mirror_data.keys(): + +
MirrorHosts
$mirror$mirror_data[mirror]['HOSTS']
diff --git a/server/templates/profile.html b/server/templates/profile.htm= l new file mode 100644 index 0000000..702b03b --- /dev/null +++ b/server/templates/profile.html @@ -0,0 +1,11 @@ +$def with (profile_data) +$var title: Profile + + + + + + $for profile in profile_data.keys(): + +
Profile/th> + Hosts
$profile$profile_data[profile]['HOSTS']
diff --git a/server/templates/repo.html b/server/templates/repo.html new file mode 100644 index 0000000..63371bb --- /dev/null +++ b/server/templates/repo.html @@ -0,0 +1,12 @@ +$def with (repo_data) +$var title: Repository + + + + + + + + $for repo in repo_data.keys(): + +
RepositoryHostsPackages
$repo$repo_data[repo]['HOSTS']$repo_data[r= epo]['PACKAGES']
diff --git a/server/templates/use.html b/server/templates/use.html new file mode 100644 index 0000000..209f8f8 --- /dev/null +++ b/server/templates/use.html @@ -0,0 +1,11 @@ +$def with (use_data) +$var title: Use + + + + + + + $for use in use_data.keys(): + +
UseHosts
$use$use_data[use]['HOSTS']
diff --git a/server/use.py b/server/use.py new file mode 100644 index 0000000..dfdcfaf --- /dev/null +++ b/server/use.py @@ -0,0 +1,10 @@ + +from config import render, db + +class Use(object): + def GET(self): + use_count =3D db.query('SELECT USEFLAG,COUNT(UUID) AS HOSTS FROM GLOBAL= _USEFLAGS NATURAL JOIN USEFLAGS GROUP BY USEFLAG') + use_data =3D dict() + for t in use_count: + use_data[t['USEFLAG']] =3D {'HOSTS':t['HOSTS']} + return render.use(use_data)