Bug 1684226 - [Containers Overview] TypeError: Cannot read property 'layout' of undefined
Summary: [Containers Overview] TypeError: Cannot read property 'layout' of undefined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.11.0
Assignee: Martin Hradil
QA Contact: juwatts
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-28 18:41 UTC by juwatts
Modified: 2019-12-12 13:36 UTC (History)
10 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-12 13:35:55 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:4199 0 None None None 2019-12-12 13:36:08 UTC

Description juwatts 2019-02-28 18:41:35 UTC
Description of problem:
When navigating to the Containers Overview page, the following error is displayed in the browser console:

TypeError: Cannot read property 'layout' of undefined
    at trendsChartController.e.updateAll (application-d966831b…581bed47155710.js:3)
    at trendsChartController.e.$onChanges (application-d966831b…581bed47155710.js:3)
    at angular.js:10022
    at x (angular.js:426)
    at re (angular.js:10018)
    at angular.js:10410
    at angular.js:17330
    at angular.js:17378
    at l.$digest (angular.js:18514)
    at l.$apply (angular.js:18903)

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

How reproducible:
100%

Steps to Reproduce:
1. Add a Container provider
2. Open up the browser debug console
3. Navigate to Compute-Containers->Overview

Actual results:
Following error appears:
TypeError: Cannot read property 'layout' of undefined
    at trendsChartController.e.updateAll (application-d966831b…581bed47155710.js:3)
    at trendsChartController.e.$onChanges (application-d966831b…581bed47155710.js:3)
    at angular.js:10022
    at x (angular.js:426)
    at re (angular.js:10018)
    at angular.js:10410
    at angular.js:17330
    at angular.js:17378
    at l.$digest (angular.js:18514)
    at l.$apply (angular.js:18903)


Expected results:
No errors in the browser console

Additional info:

Comment 2 juwatts 2019-02-28 19:14:07 UTC
This is also seen on Compute->Containers->Providers Dashboard. If you navigate to the page and then click back, the error appears. For example, select Policy->Edit Tags and when the page is rendered, hit back.

Comment 12 CFME Bot 2019-03-08 09:37:27 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/8e3a5f476a3f6a8bd11344affac3b3a5f344d918
commit 8e3a5f476a3f6a8bd11344affac3b3a5f344d918
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Mar  6 05:59:15 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Mar  6 05:59:15 2019 -0500

    Container trends chart - wait for loadingDone before displaying pf-trends-chart

    prevents

        TypeError: Cannot read property 'layout' of undefined
        at trendsChartController.e.updateAll (application-d966831b…581bed47155710.js:3)
        at trendsChartController.e.$onChanges (application-d966831b…581bed47155710.js:3)

    when the JSON endpoints are taking longer to respond.

    The controller already has a concept of loadingDone, used to display a spinner.
    But it was never used to prevent rendering of the pf-trends-chart component, which fails when config is undefined.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684226

 app/views/ems_container/_trends-chart.html.haml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 juwatts 2019-04-30 18:12:56 UTC
Verified in 5.11.0.1.20190424210327_58b5dbd

Verification Steps:
1. Add an Openshift provider to CFME
2. Navigate to Containers Providers and select the Openshift provider. You will be on the Dashboard view
3. Select a Policy -> Edit Tags
4. Open up the browser debugger
4. Click the browser back button
5. Verified the following javascript error is not seen: TypeError: Cannot read property 'layout' of undefined


New BZ opened: 1704891

Comment 15 errata-xmlrpc 2019-12-12 13:35:55 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/RHBA-2019:4199


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