Fix analysis tab intervals #40
3 changed files with 5 additions and 2 deletions
|
@ -175,7 +175,7 @@ def _generate_root_index() -> None:
|
|||
intervals = [
|
||||
p.name
|
||||
for p in OUTPUT_DIR.iterdir()
|
||||
if p.is_dir() and p.name.lower() not in {"domains", "global"}
|
||||
if p.is_dir() and p.name.lower() not in {"domains", "global", "analysis"}
|
||||
]
|
||||
intervals.sort()
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@
|
|||
Object.entries(sections).forEach(([key, section]) => {
|
||||
section.classList.toggle('is-hidden', key !== name);
|
||||
});
|
||||
intervalControl.classList.toggle('is-hidden', name === 'overview');
|
||||
intervalControl.classList.toggle('is-hidden', name === 'overview' || name === 'analysis');
|
||||
domainControl.classList.toggle('is-hidden', name !== 'domain');
|
||||
if (name === 'overview') {
|
||||
loadStats();
|
||||
|
|
|
@ -184,6 +184,8 @@ def test_generate_root_index(tmp_path, sample_reports, monkeypatch):
|
|||
(tmp_path / "output" / "domains" / "bar.com").mkdir(parents=True)
|
||||
# add an extra directory with capitalized name to ensure it's ignored
|
||||
(tmp_path / "output" / "Global").mkdir(parents=True)
|
||||
# add an analysis directory to ensure it's excluded
|
||||
(tmp_path / "output" / "analysis").mkdir(parents=True)
|
||||
|
||||
gr._generate_root_index()
|
||||
|
||||
|
@ -196,6 +198,7 @@ def test_generate_root_index(tmp_path, sample_reports, monkeypatch):
|
|||
assert '<option value="daily">' in content
|
||||
assert '<option value="global">' not in content
|
||||
assert '<option value="Global">' not in content
|
||||
assert '<option value="analysis">' 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