Description of problem:
When generating a report (as in clicking "Generate"), we warn a user about resource consumption implications and want to confirm they really want to generate the report.
While generating a preview of the report is much easier to reach (whenever you edit a template, you tend to preview it before submitting and the button is readily available), we don't issue any such warning there.
The warning should either be issued OR we could limit a number of hosts loaded, thus limiting the dataset we work with. The operation would be cheaper, thus suitable for preview without warning. However, the user needs to be well aware that the result is just a sample. This could also lead to selecting such a dataset that this sample would be useless for the user (e.g. empty).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Monitor -> Report Templates -> <report> -> Preview
No warning, full report generated
Either warning or limited dataset, after thinking through the implications. Or something completely different that would make sense.
Created redmine issue https://projects.theforeman.org/issues/25465 from this bug
Upstream bug assigned to firstname.lastname@example.org
Verified with Sat 6.5 snap 7 using reproducer from OP.
load_hosts macro now only loads 10 hosts in preview.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.