Fix dropdown intervals to exclude global reports #28
2 changed files with 6 additions and 1 deletions
|
@ -172,7 +172,11 @@ def _generate_all_domains(interval: str) -> None:
|
|||
|
||||
def _generate_root_index() -> None:
|
||||
"""Render the top-level index listing all intervals and domains."""
|
||||
intervals = [p.name for p in OUTPUT_DIR.iterdir() if p.is_dir() and p.name != "domains"]
|
||||
intervals = [
|
||||
p.name
|
||||
for p in OUTPUT_DIR.iterdir()
|
||||
if p.is_dir() and p.name not in {"domains", "global"}
|
||||
]
|
||||
intervals.sort()
|
||||
|
||||
domains_dir = OUTPUT_DIR / "domains"
|
||||
|
|
|
@ -192,6 +192,7 @@ def test_generate_root_index(tmp_path, sample_reports, monkeypatch):
|
|||
# check for interval options
|
||||
assert '<option value="hourly">' in content
|
||||
assert '<option value="daily">' in content
|
||||
assert '<option value="global">' not in content
|
||||
|
||||
# check for domain options
|
||||
assert '<option value="foo.com">' in content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue