Problem
MacTrack's report pages independently implement the same request-validation, session-filter, SQL-filter, export, and list-rendering pipeline. The duplication makes security and compatibility fixes easy to apply to one report while missing another.
Current evidence on develop:
- seven
mactrack_view_*.php pages call validate_store_request_vars()
- eight report-page validation functions implement overlapping request rules
mactrack_view_arp.php and mactrack_view_ips.php both declare mactrack_view_ips_validate_request_vars(), so the scripts cannot safely share a process
- the report pages repeat site/device/status filter construction, pagination, export queries, and option-label escaping
This is a focused implementation item under #304. It is architectural follow-up, not a MacTrack/Cacti 1.2 release blocker.
Proposed direction
- define report filters declaratively in one shared helper or service
- centralize request normalization, session persistence, SQL predicate/parameter construction, pagination, and CSV export selection
- give each endpoint a unique public entry function and keep page-specific columns/rendering local
- migrate one report at a time so behavior changes and broad formatting churn are avoided
Acceptance criteria
Related to #304 and #315.
Problem
MacTrack's report pages independently implement the same request-validation, session-filter, SQL-filter, export, and list-rendering pipeline. The duplication makes security and compatibility fixes easy to apply to one report while missing another.
Current evidence on
develop:mactrack_view_*.phppages callvalidate_store_request_vars()mactrack_view_arp.phpandmactrack_view_ips.phpboth declaremactrack_view_ips_validate_request_vars(), so the scripts cannot safely share a processThis is a focused implementation item under #304. It is architectural follow-up, not a MacTrack/Cacti 1.2 release blocker.
Proposed direction
Acceptance criteria
Related to #304 and #315.