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: ----------------
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...
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.
Beni is this fixed by: https://github.com/ManageIQ/manageiq-ui-classic/pull/256 If so, can you move to POST?
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).
What's the status on this?
This is open since me and beni wanted to refactor tree_builder_policy but I never got around to do that...
Nimrod if there are no PRs addressing this please move the Status back to "ASSIGNED" (or add a link to the code). Thanks.
PR: https://github.com/ManageIQ/manageiq-ui-classic/pull/2639