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:
commit
71b11721ab
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:
|
def _generate_root_index() -> None:
|
||||||
"""Render the top-level index listing all intervals and domains."""
|
"""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()
|
intervals.sort()
|
||||||
|
|
||||||
domains_dir = OUTPUT_DIR / "domains"
|
domains_dir = OUTPUT_DIR / "domains"
|
||||||
|
|
|
@ -192,6 +192,7 @@ def test_generate_root_index(tmp_path, sample_reports, monkeypatch):
|
||||||
# check for interval options
|
# check for interval options
|
||||||
assert '<option value="hourly">' in content
|
assert '<option value="hourly">' in content
|
||||||
assert '<option value="daily">' in content
|
assert '<option value="daily">' in content
|
||||||
|
assert '<option value="global">' not in content
|
||||||
|
|
||||||
# check for domain options
|
# check for domain options
|
||||||
assert '<option value="foo.com">' in content
|
assert '<option value="foo.com">' in content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue