Bug 1872788 - RFE Replace Report Template help page with documentation from Satellite 6.8
Summary: RFE Replace Report Template help page with documentation from Satellite 6.8
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-26 15:47 UTC by Gary Scarborough
Modified: 2022-10-28 18:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-28 18:01:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screen shot from help tab (208.30 KB, image/png)
2020-09-02 21:32 UTC, Gary Scarborough
no flags Details
screen shot from further down help tab (177.50 KB, image/png)
2020-09-02 21:33 UTC, Gary Scarborough
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30959 0 Normal New Replace Report Template help page with documentation 2021-02-15 03:10:31 UTC

Description Gary Scarborough 2020-08-26 15:47:32 UTC
Description of problem:

The help tab on the Reports Template page of the Satellite UI is confusing and not very helpful to customers.  Can we place it with the new documentation created for Satellite 6.8 on this subject?  It might be good if we provide links to in depth documentation (even upstream) if it exists.


Version-Release number of selected component (if applicable):
 Found in satellite 6.7.0

Comment 1 Marek Hulan 2020-08-28 08:54:08 UTC
I think there is a misunderstanding. The classes you see listed, e.g. Subnet or Nic::Base can't be used directly. E.g. you can't do this

> <%= Subnet.all.map(&:name) %>

We don't want users to use internal objects API, in this case the ActiveRecord interface, as that may change. Instead we have the DSL that allows accessing these objects. E.g. to load subnet objects, there's a load_subnets macro. The documentation contains methods that you can call on such classes. So for example,

> <%- load_subnets.each_record do |s| -%>
> <%=  s.name -%>
> <%- end -%>

here you can see we load subnets using the loader and iterate over all of them. In variable s, we have instances of class Subnet. Here's where the documentation for Subnet class is useful. All methods listed in it can be called on s, e.g. name. Of course, there are other ways how to load subnet object, e.g. host.subnet (if host is object of class Host. I'd suggest reading the Help page (link is on top right corner in the 6.8 documentation), it explains it a bit more detailed.

You are right that we mostly allow read only things in the DSL. The safe mode should prevent users from doing potentially harmful things. But also reading can cause problems. There may be sensitive information that we don't want to expose to every user who has edit template permission. That's why every method needs to be considered and whitelisted. If there's some method you're missing, open a BZ for that. If we find it safe, it's easy to add. But in this case, I think it was more about the misunderstanding of how to use the documentation. Note that Subnet is not a method but a class of object.

Please let us know if it makes more sense now and we can close this.

Comment 2 Gary Scarborough 2020-08-28 18:19:32 UTC
Hello,

As satellite 6.8 seems to expand on reporting and documentation for it, you can go ahead and close this BZ.

Comment 3 Gary Scarborough 2020-08-28 18:42:18 UTC
One thing though, Subnet and Nic::Base are both listed as methods in the satellite gui help page under report templates.  At the very least this is confusing to the customer.

Comment 4 Marek Hulan 2020-08-28 18:50:04 UTC
Could you please upload a screen shot? The table may be confusing, but the left column should be the class, while on the right, there should be a list of methods. We should replace the Help tab though once the new documentation is in-app.

Comment 6 Gary Scarborough 2020-09-02 21:32:34 UTC
Created attachment 1713512 [details]
Screen shot from help tab

Comment 7 Gary Scarborough 2020-09-02 21:33:20 UTC
Created attachment 1713513 [details]
screen shot from further down help tab

Comment 8 Gary Scarborough 2020-09-02 21:36:58 UTC
As can be seen in the screen shot, all items in the table are labelled Safe Mode Methods and Variables.  Yet some of them are not usable in safe mode.  Since the user will expect them to work, this just creates confusion.

Comment 9 Dominik Matoulek 2020-09-03 08:23:48 UTC
I don't see the confusion there. Table on screenshoots show what methods are allowed for given object so logically you can't call 'Subnet.all' because method 'all' is not allowed for that object. 

Maybe it can help changing the labels of columns, for example 'for class' instead of 'class' and 'are allowed methods and members' instead of 'allowed methods and members'. However, I don't know if it's makes sense according to new documentation that was mentioned by Marek at Comment 4.

Comment 10 Marek Hulan 2020-09-08 07:06:22 UTC
I think there are 2 confusions. Gary calls Subnet and Nic::Base methods, but these are classes, as the table shows in the header for the first column. They are not allowed to be used in safe mode directly, e.g. <% Subnet %> will fail. Methods listed in the right column can be used on instances of this class, e.g. <% @host.subnet %>. Note the difference between class and instance. The table header says "Allowed methods or members" only for the right column. To load subnets, a loader must be used, e.g. <% load_subnets %>

I totally agree the Help tab is not overly helpful and should be replaced with the new documentation introduced in 6.8. If you don't mind, I'd modify this BZ subject and comment 0 to reflect it. It would be a new RFE. Does that make sense?

Comment 11 Gary Scarborough 2020-09-08 14:24:13 UTC
Marek,

Agreed and done.

Comment 12 Dominik Matoulek 2020-10-02 13:56:39 UTC
Created redmine issue https://projects.theforeman.org/issues/30959 from this bug

Comment 15 Brad Buckingham 2022-09-02 20:25:18 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 16 Brad Buckingham 2022-10-28 18:01:59 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.


Note You need to log in before you can comment on or make changes to this bug.