Bug 1404463

Summary: Title contains compressed string on Container Image Control Policy page
Product: Red Hat CloudForms Management Engine Reporter: Nandini Chandra <nachandr>
Component: UI - OPSAssignee: Nimrod Shneor <nshneor>
Status: CLOSED CURRENTRELEASE QA Contact: Einat Pacifici <epacific>
Severity: low Docs Contact:
Priority: low    
Version: 5.7.0CC: cben, cpelland, fsimonce, hkataria, jhardy, mpovolny, nshneor, obarenbo
Target Milestone: GAKeywords: TestOnly
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:control:container
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1511521 (view as bug list) Environment:
Last Closed: 2018-06-21 20:38:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1397248, 1511521    
Attachments:
Description Flags
screen shot of Container Image policy image with compressed string. none

Description Nandini Chandra 2016-12-13 22:10:28 UTC
Created attachment 1231343 [details]
screen shot of Container Image policy image with compressed string.

Description of problem:
-----------------------
See attached screen shot.The title reads 'Containerimage Control Policy...'
instead of 'Container Image Control Policy...'


Version-Release number of selected component (if applicable):
--------------------------------
5.7.0.14


How reproducible:
----------------
Always


Steps to Reproduce:
-------------------
1.Navigate to the Control -> Explorer page.
2.From the 'Events' accordion, click any event already assigned to a Control Policy.Eg: Click the "Container Image Analysis Complete" event.Click the policy link in the 'Assigned to Policies' section.


Actual results:
--------------
Title contains compressed string on Container Image Control Policy page.
 

Expected results:
-----------------
Title shouldn't contain compressed string.


Additional info:
----------------

Comment 2 Beni Paskin-Cherniavsky 2016-12-14 12:31:07 UTC
Good catch!
Found the problematic view code, and several more like it e.g. Actions -> Initiate SmartState Analysis for Container Image -> assigned policy title.
Will give details list after I fix them.

These are all manifestation of the bug 1359909 class of bugs.
(Proposing 5.7.z? as was decided there.)
But that BZ has been re-opened too many times and is becoming impossible to understand what exactly should be verified.
QE, feel free to dup to 1359909 if you do prefer one mega-BZ.

This area definitely needs more unit tests, and less code duplication.  Discussing approaches with UI team...

Comment 3 Beni Paskin-Cherniavsky 2017-01-12 15:12:33 UTC
Status: I know how to proceed but didn't have time to start coding.

The reason these bugs repeatedly come up is the logic is replicated in too many places.  I already did several rounds of "fixed them all", and then other places still fail - this time in views.
Chatted with Martin Hradil, I'm going to centralize nodeid computation (the "xx-control_xx-..." strings) in corresponding TreeBuilder classes where it can be shared between controller and views.

Comment 4 Federico Simoncelli 2017-01-27 14:09:01 UTC
Beni is this fixed by:

https://github.com/ManageIQ/manageiq-ui-classic/pull/256

If so, can you move to POST?

Comment 5 Beni Paskin-Cherniavsky 2017-02-06 12:30:41 UTC
No, that only fixed a couple places.
I still see 4 `towhat.downcase` under app/views/miq_policy/ — at least 3 of these are bugs, other `downcase` uses there also need to be checked.

That's why I really want to refactor these and controllers to use common helper(s).

Comment 9 Federico Simoncelli 2017-06-05 21:06:18 UTC
What's the status on this?

Comment 10 Nimrod Shneor 2017-06-06 06:20:10 UTC
This is open since me and beni wanted to refactor tree_builder_policy but I never got around to do that...

Comment 11 Federico Simoncelli 2017-08-28 07:51:08 UTC
Nimrod if there are no PRs addressing this please move the Status back to "ASSIGNED" (or add a link to the code). Thanks.

Comment 12 Nimrod Shneor 2017-11-06 14:40:09 UTC
PR: https://github.com/ManageIQ/manageiq-ui-classic/pull/2639