Problem/Motivation
The current reporting is just a wrapper around simple sql statements to fetch "Updated" and "Skipped" entries by batch id (specifying '0' shows all batches, but may cause memory usage errors for a large amount of data).
This is an incremental improvement (so future/further improvements should be added to some sort of "part 2" request)
Steps to reproduce
The current reporting is available at:
/admin/link_magician/tracking/results/updated/{batchid}
/admin/link_magician/tracking/results/skipped/{batchid}
Proposed resolution
Add a 'Reporting' service.
Add a new Admin Report link, "Link Magician" (*new page*): /admin/reports/link_magician
Update the paths for the 'skipped' and 'updated' reports: /admin/reports/link_magician/{batch_id}/updated, /admin/reports/link_magician/{batch_id}/updated
Adds an "Attention" results report: /admin/reports/link_magician/{batch_id}/attention
Add CSV exports for each of the reports (button added to each page).
User interface changes
Add 'Link Magician' to /admin/ reports.
Available batches, status, count and links to more detailed reporting is now on the initial report page (/admin/reports/link_magician).
The detailed reports now include a button to download a csv file containing the same data.
API changes
Add a simple reporting Service.
Testing
If you have already run tidy, you may already have some data that you can have a look at to validate the 3 reports.
Otherwise, create a new page and add 2 links: One should use alias of an existing page, the other should be a page that doesn't exist.
Run tidy on node (example uses dry-run, replace {NNN} with the node id)
drush link_magician:tidy nodeid --nodeid={NNN} --dry-run=true
Go to the report page, /admin/reports/link_magician; the top row is for the most recent run.
There should be 3 results for the Attention and Skipped columns and 1 for the Updated.
Click on each of them to view the contents as well as clicking the "Download CSV Export" button to download the results as a csv file.
Issue fork link_magician-3601173
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jasongose commentedComment #4
jasongose commentedComment #5
jasongose commentedComment #6
jasongose commentedComment #7
jasongose commentedComment #8
jasongose commentedComment #9
jasongose commentedComment #10
jasongose commentedComment #11
jasongose commentedComment #12
jasongose commentedComment #13
mmarsello commentedCode changes look good and the testing steps all produced the desired outcomes.
Comment #14
mmarsello commentedComment #15
jasongose commentedComment #17
jasongose commented