more tables

This commit is contained in:
Christoph Reiter 2017-09-11 12:38:24 +02:00
parent f38b878939
commit f81e7b2e9c
7 changed files with 68 additions and 27 deletions

View File

@ -353,11 +353,11 @@ def group(name=None):
return render_template('group.html', name=name, packages=res) return render_template('group.html', name=name, packages=res)
else: else:
groups = set() groups = {}
for s in sources: for s in sources:
for k, p in sorted(s.packages.items()): for k, p in sorted(s.packages.items()):
for name in p.groups: for name in p.groups:
groups.add(name) groups[name] = groups.get(name, 0) + 1
return render_template('groups.html', groups=groups) return render_template('groups.html', groups=groups)

View File

@ -7,13 +7,22 @@
<h6 class="card-subtitle mb-2 text-muted">All package groups</h6> <h6 class="card-subtitle mb-2 text-muted">All package groups</h6>
</div> </div>
<div class="card-body"> <div class="card-body">
<ul> <table class="table table-hover table-sm">
{% for g in groups|sort %} <thead>
<li><a href="{{ url_for('group', name=g) }}">{{ g }}</a></li> <tr>
{% else %} <th>Group</th>
No groups found <th>Packages</th>
</tr>
</thead>
<tbody>
{% for g, count in groups|dictsort %}
<tr>
<td><a href="{{ url_for('group', name=g) }}">{{ g }}</a></td>
<td>{{ count }}</td>
</tr>
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
</div> </div>
</div> </div>

View File

@ -7,13 +7,24 @@
<h6 class="card-subtitle mb-2 text-muted">All base packages</h6> <h6 class="card-subtitle mb-2 text-muted">All base packages</h6>
</div> </div>
<div class="card-body"> <div class="card-body">
<ul> <table class="table table-hover table-sm">
<thead>
<tr>
<th>Package</th>
<th>Version</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for s in sources %} {% for s in sources %}
<li><a href="{{ url_for('base', name=s.name) }}">{{ s.name }}</a></li> <tr>
{% else %} <td><a href="{{ url_for('base', name=s.name) }}">{{ s.name }}</a></td>
No packages found <td>{{ s.version }}</td>
<td>{{ s.desc }}</td>
</tr>
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light"> <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light" style="border-bottom: 1px solid rgba(0,0,0,.125)">
<a class="navbar-brand" href="{{ url_for('base') }}"> <a class="navbar-brand" href="{{ url_for('base') }}">
<img src="{{ url_for('static', filename='images/logo.png') }}" width="30" height="30" class="d-inline-block align-top" alt="MSYS2"> <img src="{{ url_for('static', filename='images/logo.png') }}" width="30" height="30" class="d-inline-block align-top" alt="MSYS2">
</a> </a>

View File

@ -16,11 +16,11 @@
href="https://github.com/msys2/msys2/wiki/Creating-packages">the packaging href="https://github.com/msys2/msys2/wiki/Creating-packages">the packaging
guide</a> for how to package new upstream versions</p> guide</a> for how to package new upstream versions</p>
<table class="table"> <table class="table table-hover table-sm">
<thead> <thead>
<tr> <tr>
<th>Package</th> <th>Package</th>
<th>Local</th> <th>MSYS2</th>
<th>Arch Linux</th> <th>Arch Linux</th>
</tr> </tr>
</thead> </thead>

View File

@ -32,13 +32,24 @@
<h6 class="card-subtitle mb-2 text-muted">Base packages matching the search query</h6> <h6 class="card-subtitle mb-2 text-muted">Base packages matching the search query</h6>
</div> </div>
<div class="card-body"> <div class="card-body">
<ul> <table class="table table-hover table-sm">
<thead>
<tr>
<th>Package</th>
<th>Version</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for s in sources %} {% for s in sources %}
<li><a href="{{ url_for('base', name=s.name) }}">{{ s.name }}</a></li> <tr>
{% else %} <td><a href="{{ url_for('base', name=s.name) }}">{{ s.name }}</a></td>
No matches <td>{{ s.version }}</td>
<td>{{ s.desc }}</td>
</tr>
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
</div> </div>
</div> </div>

View File

@ -7,14 +7,24 @@
<h6 class="card-subtitle mb-2 text-muted">Recently built binary packages</h6> <h6 class="card-subtitle mb-2 text-muted">Recently built binary packages</h6>
</div> </div>
<div class="card-body"> <div class="card-body">
<ul> <table class="table table-hover table-sm">
<thead>
<tr>
<th>Build Date</th>
<th>Binary Package</th>
<th>Version</th>
</tr>
</thead>
<tbody>
{% for p in packages %} {% for p in packages %}
<li>{{ p.builddate|timestamp }} - <a href="{{ package_url(p) }}">{{ p.name }}</a> {{ p.version }}</li> <tr>
{% else %} <td>{{ p.builddate|timestamp }}</td>
No packages found <td><a href="{{ package_url(p) }}">{{ package_name(p) }}</a></td>
<td>{{ p.version }}</td>
</tr>
{% endfor %} {% endfor %}
<li>...</li> </tbody>
</ul> </table>
</div> </div>
</div> </div>