Skip to content

Commit

Permalink
rename filter to status
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
  • Loading branch information
hthiery committed Jan 4, 2020
1 parent 68944e5 commit 1df629b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def packages():
packages = {}

developer = request.args.get('developer')
filter = request.args.get('filter')
status = request.args.get('filter')
infra = request.args.get('filter')

if developer is not None:
Expand All @@ -66,12 +66,12 @@ def packages():
packages[pkg_name] = (data['packages'][pkg_name])
title = '{} packages maintained by {}'.format(len(packages), developer)

elif filter is not None:
elif status is not None:
for pkg_name in data['packages']:
pkg = data['packages'][pkg_name]
if pkg['status'][filter][0] != 'ok':
if pkg['status'][status][0] != 'ok':
packages[pkg_name] = pkg
title = '{} packages with error in {}'.format(len(packages), filter)
title = '{} packages with error in {}'.format(len(packages), status)

elif infra is not None:
for pkg_name in data['packages']:
Expand Down
16 changes: 8 additions & 8 deletions app/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
Filter
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{url_for('packages', filter='hash')}}">no hash</a>
<a class="dropdown-item" href="{{url_for('packages', filter='patches')}}">patches</a>
<a class="dropdown-item" href="{{url_for('packages', filter='license')}}">no license</a>
<a class="dropdown-item" href="{{url_for('packages', filter='url')}}">no url</a>
<a class="dropdown-item" href="{{url_for('packages', filter='license-files')}}">no licence-files</a>
<a class="dropdown-item" href="{{url_for('packages', filter='version')}}">outdated version</a>
<a class="dropdown-item" href="{{url_for('packages', filter='developers')}}">no developers</a>
<a class="dropdown-item" href="{{url_for('packages', filter='pkg-check')}}">failed pkg-check</a>
<a class="dropdown-item" href="{{url_for('packages', status='hash')}}">no hash</a>
<a class="dropdown-item" href="{{url_for('packages', status='patches')}}">patches</a>
<a class="dropdown-item" href="{{url_for('packages', status='license')}}">no license</a>
<a class="dropdown-item" href="{{url_for('packages', status='url')}}">no url</a>
<a class="dropdown-item" href="{{url_for('packages', status='license-files')}}">no licence-files</a>
<a class="dropdown-item" href="{{url_for('packages', status='version')}}">outdated version</a>
<a class="dropdown-item" href="{{url_for('packages', status='developers')}}">no developers</a>
<a class="dropdown-item" href="{{url_for('packages', status='pkg-check')}}">failed pkg-check</a>
</div>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<td>Infrastructure(s)</td>
<td>
{% for infra in pkg['infras'] %}
<p>{{infra[0]}}: <a href="{{url_for('infrastructure', infra=infra[1])}}">{{infra[1]}}</a></p>
<p>{{infra[0]}}: <a href="{{url_for('packages', infra=infra[1])}}">{{infra[1]}}</a></p>
{% endfor %}
</td>
</tr>
Expand Down

0 comments on commit 1df629b

Please sign in to comment.