Bug 1789434 - Template editor not always allows refreshing of the preview pane
Summary: Template editor not always allows refreshing of the preview pane
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-09 15:06 UTC by Radovan Drazny
Modified: 2020-10-27 13:00 UTC (History)
4 users (show)

Fixed In Version: foreman-2.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:59:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Video of the issue (3.40 MB, application/x-matroska)
2020-01-09 15:06 UTC, Radovan Drazny
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28731 0 Normal Closed Template editor not always allows refreshing of the preview pane 2020-10-28 17:22:12 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:00:06 UTC

Description Radovan Drazny 2020-01-09 15:06:57 UTC
Created attachment 1650985 [details]
Video of the issue

Description of problem:
When you edit a template using the new integrated template editor, is is possible to get into a situation when the preview is not refreshed automatically, and the refresh button is not displayed. 

Version-Release number of selected component (if applicable):
Sat 6.7 Snap 7

How reproducible:
always

Steps to Reproduce:
1. Have a few managed hosts registered to a Sat 6.7 server
2. Go to Hosts->Provisioning templates page and create a clone of a template. I have used the "Kickstart default" template.
3. Check that template can be correctly previewed. You need a managed registered host for this.
4. Make the template invalid and unrenderable. The easiest way to achieve this is to make a typo in the name of a snippet to be included in the template. I have modified the line 245 of the template, adding an extra 's' to the 'remote_execution_ssh_keys' snipet name.
5. The change correctly activates the "Change" pane of the editor.
6. Go to the "Preview" pane of the editor. Use the "Preview is Outdated..." button if necessary. You will get an error, as the template cannot be rendered at the current state. Do not close the error widget.
7. Go back to the editor pane, and fix the typo (remove the extra "s"). The "Changes" pane will be correctly disabled, as there is no change in the template now. You can close the error widget now.
8. Go to the "Preview" pane. There is still a message "Error during rendering, Return to Editor tab." in the preview area, even if the template is already fixed. There is no "Preview is Outdated..." button to refresh the preview, and you are not going to get any preview.


Actual results:
Preview is not available, even if the template is correct and renderable


Expected results:
If the template is correct, a preview is always available, or at least the "Preview is Outdated..." button is available to do a manual refresh. 

Additional info:
To get out of this you can switch to a different host to force a preview refresh, or you can go back into the Editor pane and do some more changes. That is usually enough to get the "Preview is Outdated..." button displayed.
See the attached screen recording for a demo of the issue.

Comment 3 Bryan Kearney 2020-01-19 15:01:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28731 has been resolved.

Comment 5 Roman Plevka 2020-07-16 09:35:26 UTC
VERIFIED
on sat6.8.0-9.0
the "preview is outdated" label is now correctly shown on reverting the change so it is possible to refresh the preview.

Comment 8 errata-xmlrpc 2020-10-27 12:59:52 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 (Important: Satellite 6.8 release), 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-2020:4366


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