Open ncautotest opened 1 year ago
Hi @ncautotest
Sorry for the late feedback. The idea looks indeed interesting.
As the tracking will take computing time, I would add this as an option to not be executed by default. We need to add it as a binding similar as we do it with the dryRun paramater. Adding a new method .run(isDryRun, isShowStats)
seems like a good way and the current one will just add false as the second argument.
In terms of tracking:
TraversData
in applyActionsOnResource
methodJcrUtil.createPath
Moving forward: If you need this feature soon, feel free to work on it. Otherwise we can put it on the roadmap.
Best Nicolas
Allow displaying a grand total for modified resources
While
printPath()
,printProperty()
andprintJson()
are sure very useful, they only apply to a single resource in a matched resultset. Would there be any value in a feature to display a grand totals that will show an outline of what the script did?Use case: given a script like the one below, allow the possibility to display grand totals showing which nodes/resources/pages were traversed/modifed/deleted/created etc:
Or maybe a better approach would be to allow passing an extra parameter to
run()
e.g:Or as a map (more flexible in terms of future customization):
These are just quick not not very well thought through ideas; maybe it would make more sense to have the accounting features configurable/available on the
AecuBinding
or on theContentUpgrade
object, etc.Another possible approach might be to expose some simple API to allow the users to add a create/modify/delete record that could be accessed on some global object after execution, e.g. with
println(log.printStats()
or something like that.Example of possible grand totals (only a raw idea):
This is meant to be as a starting point for figuring out a clean approach that would be simple to implement and helpful for API consumers.
wdyt?