Add HIBP filter to dashboard

This commit is contained in:
Sylvia van Os 2021-05-24 18:50:45 +02:00
parent 3c6c3f7dbd
commit 1283285d1e
2 changed files with 5 additions and 0 deletions

View file

@ -322,6 +322,8 @@ def get_alias_infos_with_pagination_v3(
q = q.filter(Alias.enabled)
elif alias_filter == "disabled":
q = q.filter(Alias.enabled.is_(False))
elif alias_filter == "hibp":
q = q.filter(Alias.hibp_breaches)
q = q.order_by(Alias.pinned.desc())

View file

@ -143,6 +143,9 @@
<option value="disabled" {% if filter == "disabled" %} selected {% endif %}>
Only Disabled Aliases
</option>
<option value="hibp" {% if filter == "hibp" %} selected {% endif %}>
Only Aliases Found In Data Breaches
</option>
</select>
<input type="search" name="query" placeholder="Enter to search for alias"