Merge pull request #28 from wagesj45/codex/remove-global-option-from-duration-view

Fix dropdown intervals to exclude global reports
This commit is contained in:
Jordan Wages 2025-07-19 00:46:15 -05:00 committed by GitHub
commit 71b11721ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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"

View file

@ -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