fix(display): default from-selector to last N months; keep all months selectable
All checks were successful
Deploy to K8s / deploy (push) Successful in 12s
All checks were successful
Deploy to K8s / deploy (push) Successful in 12s
Instead of hiding older months entirely, show all months in the from/to selectors but default the from-select to the last MONTHS_TO_SHOW months on page load. The "All" button resets to full history as before. Python: passes months_to_show to render_template, IIFE sets fromSelect.value. Go: adds MonthsToShow to response structs, data-months-to-show attr in templates, filters.js reads it and defaults fromSelect after hideFutureMonths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1045,6 +1045,7 @@
|
||||
});
|
||||
|
||||
toSelect.value = maxMonthIdx;
|
||||
fromSelect.value = Math.max(0, maxMonthIdx - {{ months_to_show }} + 1);
|
||||
applyMonthFilter();
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -1026,6 +1026,7 @@
|
||||
});
|
||||
|
||||
toSelect.value = maxMonthIdx;
|
||||
fromSelect.value = Math.max(0, maxMonthIdx - {{ months_to_show }} + 1);
|
||||
applyMonthFilter();
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user