euscanwww: charts, about, etc...

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary
2011-04-25 22:27:32 +02:00
parent 13dd433996
commit 0aba96f66f
30 changed files with 504 additions and 121 deletions

View File

@ -0,0 +1,9 @@
{% load mul %}
{% load sub %}
{% load div %}
<div class="package_stat">
<div class="packaged" style="width: {{ infos.n_packaged|mul:100.0|div:infos.n_versions }}%"></div>
<div class="overlay" style="width: {{ infos.n_overlay|mul:100.0|div:infos.n_versions }}%"></div>
<div class="upstream" style="width: {{ infos.n_versions|sub:infos.n_overlay|sub:infos.n_packaged|mul:100.0|div:infos.n_versions }}%"></div>
</div>

View File

@ -0,0 +1,24 @@
{% load packages %}
{% load mul %}
{% load sub %}
{% load div %}
<td>{{ infos.n_packaged }}</td>
{% if infos.n_overlay == 0 or infos.n_overlay <= infos.n_packaged %}
<td>
{% else %}{% if infos.n_overlay < infos.n_packaged %}
<td class="bad">
{% else %}
<td class="ugly">
{% endif %}{% endif %}
{{ infos.n_overlay }}
</td>
{% if infos.n_versions == infos.n_packaged|add:infos.n_overlay %}
<td>
{% else %}{% if infos.n_versions < infos.n_packaged|add:infos.n_overlay|mul:2 %}
<td class="bad">
{% else %}
<td class="ugly">
{% endif %}{% endif %}
{{ infos.n_versions|sub:infos.n_packaged|sub:infos.n_overlay }}
</td>

View File

@ -1,28 +1,22 @@
{% load sub %}
{% load mul %}
{% load packages %}
<table id="table" class="display">
<thead>
<th>Package</th>
<th>Ebuilds</th>
<th>Gentoo</th>
<th>Overlays</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for package in packages %}
{% if package.n_versions == package.n_packaged %}
<tr class="gradeA">
{% else %}{% if package.n_versions < package.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<tr>
<td>
<a href="{% url euscan.views.package package.category package.name %}">
{{ package.category }}/{{ package.name }}
</a>
{% package_bar package %}
</td>
<td>{{ package.n_packaged }}</td>
<td>{{ package.n_versions|sub:package.n_packaged }}</td>
{% package_cols package %}
</tr>
{% endfor %}
</tbody>

View File

@ -0,0 +1,37 @@
{% extends "_base.html" %}
{% block content %}
<h2>What's euscan ?</h2>
<p>
Euscan is both a tool to check if an ebuild is outdated (app-portage/euscan) and a web interface.
</p>
<p>
This web interface allow you to browse the portage tree, and find outdated ebuilds. It is designed to help maintainers monitor their packages and bump them.
</p>
<p>
euscan code source is available at <a href="http://git.iksaif.net/?p=euscan.git;a=summary">http://git.iksaif.net/?p=euscan.git;a=summary</a>.
</p>
<p>
<em>This site is not an official Gentoo website.</em>
</p>
<p>
Copyright (C) 2011 <strong>Corentin Chary</strong>
</p>
<p>
Powered by:
<a href="http://kernel.org" titke="Linux Kernel">
<img src="{{MEDIA_URL}}img/linux.png" alt="Linux Kernel" />
</a>
<a href="http://gentoo.org" title="Gentoo">
<img src="{{MEDIA_URL}}img/gentoo.png" alt="Gentoo Linux" />
</a>
<a href="http://www.djangoproject.com/" title="Django">
<img src="{{MEDIA_URL}}img/django.png" alt="Django" />
</a>
<a href="http://python.org" title="Python">
<img src="{{MEDIA_URL}}img/python.png" alt="Python" />
</a>
</p>
{% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% load packages %}
{% block title %}
{{ block.super }} - categories
@ -9,24 +8,22 @@
{% block content %}
<h2>Categories</h2>
<table id="table" class="display">
<thead>
<th>Category</th>
<th>Ebuilds</th>
<th>Gentoo</th>
<th>Overlays</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for category in categories %}
{% if category.n_versions == category.n_packaged %}
<tr class="gradeA">
{% else %}{% if category.n_versions < category.n_packaged|mul:1.5 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<td><a href="{% url euscan.views.category category.category %}">{{ category.category }}</a></td>
<td>{{ category.n_packaged }}</td>
<td>{{ category.n_versions|sub:category.n_packaged }}</td>
<tr>
<td>
<a href="{% url euscan.views.category category.category %}">{{ category.category }}</a>
{% package_bar category %}
</td>
{% package_cols category %}
</tr>
{% endfor %}
</tbody>

View File

@ -9,4 +9,9 @@
{% block content %}
<h2>Category: {{ category }}</h2>
{% packages packages %}
<h3>Statistics</h2>
<h4>Current statistics</h4>
<img src="{% url euscan.views.chart_category category 'pie-versions' %}" />
<img src="{% url euscan.views.chart_category category 'pie-packages' %}" />
{% endblock %}

View File

@ -9,4 +9,9 @@
{% block content %}
<h2>Herd: {{ herd.herd }}</h2>
{% packages packages %}
<h3>Statistics</h2>
<h4>Current statistics</h4>
<img src="{% url euscan.views.chart_herd herd.herd 'pie-versions' %}" />
<img src="{% url euscan.views.chart_herd herd.herd 'pie-packages' %}" />
{% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% load packages %}
{% block title %}
{{ block.super }} - herds
@ -12,25 +11,20 @@
<table id="table" class="display">
<thead>
<th>Herd</th>
<th>Ebuilds</th>
<th>Gentoo</th>
<th>Overlays</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for herd in herds %}
{% if herd.n_versions == herd.n_packaged %}
<tr class="gradeA">
{% else %}{% if herd.n_versions < herd.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<tr>
<td>
<a href="{% url euscan.views.herd herd.herds__herd %}">
{{ herd.herds__herd }}
</a>
{% package_bar herd %}
</td>
<td>{{ herd.n_packaged }}</td>
<td>{{ herd.n_versions|sub:herd.n_packaged }}</td>
{% package_cols herd %}
</tr>
{% endfor %}
</tbody>

View File

@ -8,12 +8,10 @@
Euscan is both a tool to check if an ebuild is outdated (app-portage/euscan) and a web interface.
</p>
<p>
This web interface allow you to browse the portage tree, and find outdated ebuilds. It was designed to help maintainers monitor their packages and bump them.
This web interface allow you to browse the portage tree, and find outdated ebuilds. It is designed to help maintainers monitor their packages and bump them.
</p>
<p>
euscan code source is available at <a href="http://git.iksaif.net/?p=euscan.git;a=summary">http://git.iksaif.net/?p=euscan.git;a=summary</a>.
</p>
<h2>Statistics</h2>
<h2>Overview</h2>
<ul>
<li>Packages: {{ n_packages }}</li>
<li>Versions: {{ n_packaged }}</li>

View File

@ -9,4 +9,10 @@
{% block content %}
<h2>Maintainer: {{ maintainer.name }} &lt{{ maintainer.email }}&gt</h2>
{% packages packages %}
<h3>Statistics</h2>
<h4>Current statistics</h4>
<img src="{% url euscan.views.chart_maintainer maintainer.id 'pie-versions' %}" />
<img src="{% url euscan.views.chart_maintainer maintainer.id 'pie-packages' %}" />
{% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% load packages %}
{% block title %}
{{ block.super }} - maintainers
@ -12,25 +11,20 @@
<table id="table" class="display">
<thead>
<th>Maintainer</th>
<th>Ebuilds</th>
<th>Gentoo</th>
<th>Overlays</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for maintainer in maintainers %}
{% if maintainer.n_versions == maintainer.n_packaged %}
<tr class="gradeA">
{% else %}{% if maintainer.n_versions < maintainer.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<tr>
<td>
<a href="{% url euscan.views.maintainer maintainer.maintainers__id %}">
{{ maintainer.maintainers__name }}
</a>
{% package_bar maintainer %}
</td>
<td>{{ maintainer.n_packaged }}</td>
<td>{{ maintainer.n_versions|sub:maintainer.n_packaged }}</td>
{% package_cols maintainer %}
</tr>
{% endfor %}
</tbody>

View File

@ -17,7 +17,7 @@
<dt>Homepage</dt>
<dd>
{% for homepage in package.homepages %}
<a href="{{ homepage }}">{{ homepage }}<br />
<a href="{{ homepage }}">{{ homepage }}</a><br />
{% endfor %}
</dd>
{% endif %}

View File

@ -0,0 +1,13 @@
{% extends "_base.html" %}
{% block content %}
<h2>What's euscan ?</h2>
<h2>Statistics</h2>
<h3>Current statistics</h3>
<img src="{% url euscan.views.chart 'pie-versions' %}" />
<img src="{% url euscan.views.chart 'pie-packages' %}" />
<h3>All time statistics</h3>
{% endblock %}