Skip to content

Commit

Permalink
add filter for is_wp
Browse files Browse the repository at this point in the history
  • Loading branch information
fliepeltje committed Jun 27, 2024
1 parent e1ca04d commit d3eef1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions humitifier/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ def host_filters(request: Request | None, all_hosts: list[Host]) -> list[Filter]
value=request.query_params.get("severity") if request else None,
fn=lambda h, p: not p.get("severity") or p.get("severity") == h.severity,
),
Filter(
typ="select",
label="Is Wordpress",
id="is_wp",
options={"true", "false"},
value=request.query_params.get("is_wp") if request else None,
fn=lambda h, p: not p.get("is_wp") or p.get("is_wp") == str(h.is_wp).lower(),
),
]


Expand Down

0 comments on commit d3eef1b

Please sign in to comment.