Bug 1234588 - undefined method error when looking at bottlenecks under optimize using IE browser
Summary: undefined method error when looking at bottlenecks under optimize using IE br...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.3.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.5.0
Assignee: Brian McLaughlin
QA Contact: Jeff Teehan
URL:
Whiteboard:
Depends On:
Blocks: 1245669 1245670
TreeView+ depends on / blocked
 
Reported: 2015-06-22 18:26 UTC by Josh Carter
Modified: 2019-08-15 04:45 UTC (History)
9 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Previously, there was an undefined method error when looking at bottlenecks under optimize using IE browser. This was caused due to double render issue of the bottlenecks page. This patch fixes the double render issue caused by partial_bottlenecks_tl_detail.html.haml being rendered directly as well as indirectly via _bottlenecks_tabs.html.haml
Clone Of:
: 1245669 1245670 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:17:49 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1193179 0 medium CLOSED undefined method `report_results' while making a selection for 'classification' on the Optimize->Utilization page 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Internal Links: 1193179

Description Josh Carter 2015-06-22 18:26:53 UTC
Description of problem:

the following action causes an error message.
 
1.      Go to Optimize→Bottlenecks.
2.      Drill down to Production.
3.      When I select the arrow, Production opens and displays the sub items.
4.      But when I select Production as shown above, I get the error message below. The other items allow me to select the arrow or the name.


production.log

----] I, [2015-06-22T15:42:22.432062 #11119:e2f888]  INFO -- : Processing by MiqCapacityController#optimize_tree_select as JS
[----] I, [2015-06-22T15:42:22.432154 #11119:e2f888]  INFO -- :   Parameters: {"id"=>"c-2r1"}
[----] I, [2015-06-22T15:42:22.498339 #11119:e2f888]  INFO -- :   Rendered layouts/_dhtmlx_tags.html.erb (2.2ms)
[----] I, [2015-06-22T15:42:22.499717 #11119:e2f888]  INFO -- :   Rendered layouts/_dhtmlx_tags.html.erb (1.1ms)
[----] I, [2015-06-22T15:42:22.500122 #11119:e2f888]  INFO -- :   Rendered layouts/_flash_msg.html.erb (0.1ms)
[----] I, [2015-06-22T15:42:22.503910 #11119:e2f888]  INFO -- :   Rendered miq_capacity/_bottlenecks_options.html.erb (3.6ms)
[----] I, [2015-06-22T15:42:22.665842 #11119:e2f888]  INFO -- :   Rendered miq_capacity/_bottlenecks_tl_detail.html.erb (161.6ms)
[----] I, [2015-06-22T15:42:22.666088 #11119:e2f888]  INFO -- :   Rendered miq_capacity/_bottlenecks_summary.html.erb (166.2ms)
[----] I, [2015-06-22T15:42:22.666226 #11119:e2f888]  INFO -- :   Rendered miq_capacity/_bottlenecks_tabs.html.erb (170.4ms)
[----] F, [2015-06-22T15:42:22.666569 #11119:e2f888] FATAL -- : Error caught: [NoMethodError] undefined method `html_safe' for nil:NilClass
/var/www/miq/vmdb/app/views/miq_capacity/_bottlenecks_tl_detail.html.erb:8:in `_app_views_miq_capacity__bottlenecks_tl_detail_html_erb___4440936880413488166_115242340'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/template.rb:145:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:125:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/template.rb:143:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `instrument'


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Dave Johnson 2015-06-26 12:37:21 UTC
Brian, this one might be related... maybe fix both while you are in there?

Comment 8 CFME Bot 2015-08-04 17:58:49 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2941dc7bdf013bdb638c0f8d28e2316a7dc981fc

commit 2941dc7bdf013bdb638c0f8d28e2316a7dc981fc
Author:     Brian McLaughlin <bmclaugh>
AuthorDate: Fri Jul 17 16:01:08 2015 -0400
Commit:     Brian McLaughlin <bmclaugh>
CommitDate: Tue Aug 4 13:27:12 2015 -0400

    Fix error when viewing timelines in Optimize-Bottlenecks in IE
    
    - DRY'd and refactored getTLdata method
    - added additional routing specs
    - Fixed double render issue caused by partial
    _bottlenecks_tl_detail.html.haml being rendered directly as
    well as indirectly via _bottlenecks_tabs.html.haml
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1234588

 .../application_controller/timelines.rb            | 42 ++++------------------
 app/controllers/dashboard_controller.rb            | 38 --------------------
 app/controllers/miq_capacity_controller.rb         |  1 -
 app/views/dashboard/_tl_detail.html.haml           |  2 +-
 app/views/layouts/_tl_detail.html.haml             |  2 +-
 .../miq_capacity/_bottlenecks_tl_detail.html.haml  |  3 +-
 config/routes.rb                                   |  5 ++-
 spec/routing/dashboard_routing_spec.rb             | 16 +++++----
 spec/routing/host_routing_spec.rb                  |  6 ++++
 spec/routing/miq_capacity_routing_spec.rb          |  6 ++++
 10 files changed, 36 insertions(+), 85 deletions(-)

Comment 10 CFME Bot 2015-08-05 15:23:05 UTC
Detected commit referencing this ticket while ticket status is POST.

Comment 11 Brian McLaughlin 2015-08-05 15:31:54 UTC
Small refactoring follow-up to original fix (remove 2 unnecessary lines, update call to find_by_id to find in one line).  Forgot to update the status back to ON_DEV prior to sending the pull request.

Comment 12 CFME Bot 2015-08-05 17:18:40 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a3ddb15c2425cd015db35c47e680618ce83d5f09

commit a3ddb15c2425cd015db35c47e680618ce83d5f09
Author:     Brian McLaughlin <bmclaugh>
AuthorDate: Wed Aug 5 10:42:31 2015 -0400
Commit:     Brian McLaughlin <bmclaugh>
CommitDate: Wed Aug 5 10:58:56 2015 -0400

    Refactor timeline_data method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1234588

 app/controllers/application_controller/timelines.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comment 13 Jeff Teehan 2015-11-02 19:59:55 UTC
Performed the steps as described above using 5.5.0.8 on https://10.16.4.141/miq_capacity/bottlenecks#

I saw no occurrence of the referenced error message in production.log and the section expanded as expected using the arrow or clicking anywhere on the instance.

Moving to verified.

Comment 15 errata-xmlrpc 2015-12-08 13:17:49 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-2015:2551


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