Bug 1667986

Summary: [Containers Provider] Aggregated Node Utilization Graph Not Being Drawn
Product: Red Hat CloudForms Management Engine Reporter: juwatts
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED CURRENTRELEASE QA Contact: juwatts
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.0CC: bmidwood, dmetzger, hkataria, juwatts, lavenel, mpovolny, obarenbo
Target Milestone: GAKeywords: Regression, TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1674585 (view as bug list) Environment:
Last Closed: 2019-12-13 15:16:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1674585    
Attachments:
Description Flags
10.8.199.54 working? none

Description juwatts 2019-01-21 16:01:16 UTC
Description of problem:
The Aggregated Node Utilization graphs on the Container Provider Dashboard and Overview views are not being drawn, there is a constant spinner wheel being rendered where the graph is suppose to go. 


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


How reproducible:
100%

Steps to Reproduce:
1. Enable CFME C&U services roles
2. Add a Openshift provider with metrics to CFME
3. Navigate to either Compute->Containers->Overview or Compute->Containers->Providers and select the provider added in step 2
4. Look at the Aggregated Node Utilization graph 

Actual results:
Graph has a constant spinner wheel being rendered

Expected results:
A graph being rendered

Additional info:
This is seen in the browser debug console on both pages:

angular.js:14961 TypeError: Cannot read property 'layout' of undefined
    at trendsChartController.e.updateAll (application-08cb9dddda7f23dff60c071d265c1c2ea26f9cb5240c6a1fd0d56184e6365225.js:3)
    at trendsChartController.e.$onChanges (application-08cb9dddda7f23dff60c071d265c1c2ea26f9cb5240c6a1fd0d56184e6365225.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)
(anonymous) @ angular.js:14961
(anonymous) @ angular.js:11281
(anonymous) @ angular.js:10024
x @ angular.js:426
re @ angular.js:10018
(anonymous) @ angular.js:10410
(anonymous) @ angular.js:17330
(anonymous) @ angular.js:17378
$digest @ angular.js:18514
$apply @ angular.js:18903
(anonymous) @ angular.js:12775
w @ angular.js:13032
g.onload @ angular.js:12937
load (async)
(anonymous) @ angular.js:12920
(anonymous) @ angular.js:12720
(anonymous) @ angular.js:12461
(anonymous) @ angular.js:17330
(anonymous) @ angular.js:17378
$digest @ angular.js:18514
$apply @ angular.js:18903
(anonymous) @ angular.js:1968
invoke @ angular.js:5117
o @ angular.js:1966
Pe @ angular.js:1986
miq_bootstrap @ application-08cb9dddda7f23dff60c071d265c1c2ea26f9cb5240c6a1fd0d56184e6365225.js:1
(anonymous) @ 1?display=dashboard:1631
angular.js:14961 TypeError: Cannot set property 'tooltipFn' of undefined
    at n (application-08cb9dddda7f23dff60c071d265c1c2ea26f9cb5240c6a1fd0d56184e6365225.js:215)
    at application-08cb9dddda7f23dff60c071d265c1c2ea26f9cb5240c6a1fd0d56184e6365225.js:215
    at angular.js:17330
    at angular.js:17378
    at l.$digest (angular.js:18514)
    at l.$apply (angular.js:18903)
    at angular.js:12775
    at w (angular.js:13032)
    at XMLHttpRequest.g.onload (angular.js:12937) "Possibly unhandled rejection: {}"

Comment 7 Martin Hradil 2019-01-28 12:03:10 UTC
Created attachment 1524193 [details]
10.8.199.54 working?

Comment 13 CFME Bot 2019-02-13 01:49:36 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/57564770239495ce274eeb721764d210fb798ff9
commit 57564770239495ce274eeb721764d210fb798ff9
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Feb  8 06:03:18 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Feb  8 06:03:18 2019 -0500

    ContainerDashboardService#hourly_image_metrics - don't pretend to have data when empty

    allows a proper fallback to `empty_metrics_data`

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

 app/services/container_dashboard_service.rb | 12 +-
 1 file changed, 7 insertions(+), 5 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/284ce4e23b7e8b901fe302a543884596db0eec38
commit 284ce4e23b7e8b901fe302a543884596db0eec38
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Feb  8 08:16:23 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Feb  8 08:16:23 2019 -0500

    utilizationTrendChartContainer - set hourly time tooltip for daily & realtime

    `vm.cpuUsageSparklineConfig` was replaced by `chartsMixin.cpuUsageSparklineConfig` (and same for memory),
    which the existing code is already using to create the `metricsDataStruct` object

    So just changing the tooltip in the existing structure, when needed.

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

 app/assets/javascripts/controllers/ems_container_dashboard/utilization_trend_chart_controller.js | 8 +-
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 14 juwatts 2019-04-30 18:24:44 UTC
Verified in  5.11.0.1.20190424210327_58b5dbd

Verification Steps:
1. Enable CFME C&U services roles
2. Add a Openshift provider with metrics to CFME
3. Navigate to either Compute->Containers->Overview or Compute->Containers->Providers and select the provider added in step 2
4. Look at the Aggregated Node Utilization graph 
5. Graphs displayed "No data available" 
6. TypeError no longer seen in the browser debug console

New error observed, bz opened: 1704891