Bug 1649800

Summary: Preview host set should be limited or generating should be confirmed
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: ReportingAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: inecas, mhulan, oprazak, pcreech
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.20.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:38:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Hellebrandt 2018-11-14 14:37:09 UTC
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):
Sat 6.5

How reproducible:
Deterministic

Steps to Reproduce:
1. Monitor -> Report Templates -> <report> -> Preview

Actual results:
No warning, full report generated

Expected results:
Either warning or limited dataset, after thinking through the implications. Or something completely different that would make sense.

Comment 1 Marek Hulan 2018-11-14 14:56:29 UTC
Created redmine issue https://projects.theforeman.org/issues/25465 from this bug

Comment 2 Satellite Program 2018-11-14 15:09:01 UTC
Upstream bug assigned to mhulan

Comment 3 Satellite Program 2018-11-14 15:09:04 UTC
Upstream bug assigned to mhulan

Comment 6 Lukáš Hellebrandt 2018-12-11 15:28:22 UTC
Verified with Sat 6.5 snap 7 using reproducer from OP.

load_hosts macro now only loads 10 hosts in preview.

Comment 8 errata-xmlrpc 2019-05-14 12:38:50 UTC
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.

https://access.redhat.com/errata/RHSA-2019:1222