Bug 1668023 - Custom Button: unable to collect events for custom button with dialog
Summary: Custom Button: unable to collect events for custom button with dialog
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: drew uhlmann
QA Contact: Nikhil Dhandre
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1702490
TreeView+ depends on / blocked
 
Reported: 2019-01-21 17:41 UTC by Nikhil Dhandre
Modified: 2019-12-13 15:08 UTC (History)
9 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1702490 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:08:37 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nikhil Dhandre 2019-01-21 17:41:42 UTC
Description of problem:
-----------------------
Automation helped me lot to found this BZ. I was automating custom button event count for all objects tested by core qe. previously, I was checking events for simple button execution some objects with dialog. With automation; I parametrize dialog and found that some objects not able to collect events. 

1.Host (Infra)
2. Storage Manger (Cloud Provider)
3. Cloud Network

Note: Those are related to infra and cloud need to find Physical provider, container objects. 


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


How reproducible:
-----------------
always

Steps to Reproduce:
-------------------
1. create custom button with dialog
2. execute custom button
3. check for custom button event count

Actual results:
---------------
custom button event count not update after execution. It work awesome without dialog but fails with dialog for some objects

Expected results:
-----------------
It should update


Additional info:

Comment 2 drew uhlmann 2019-01-21 19:53:33 UTC
I can't reproduce this for hosts. CustomButtonEvent count increases just fine when run with a dialog.

Comment 3 drew uhlmann 2019-01-21 20:22:23 UTC
I'm also not sure what kind of button is being described in case 2. What's the object type for storage manager?

Comment 4 drew uhlmann 2019-01-21 21:10:20 UTC
I can, however, reproduce for cloud networks.

Comment 5 drew uhlmann 2019-01-21 21:39:57 UTC
But it almost looks like this is an API issue, the invoke_custom_action doesn't ever get called.

Comment 6 Nikhil Dhandre 2019-01-22 07:09:20 UTC
(In reply to drew uhlmann from comment #3)

Drew, thank for attention,

> I'm also not sure what kind of button is being described in case 2. What's
> the object type for storage manager?
`Provider` is object type. If we add custom button on provider object type then for cloud provider it reflect on:
1. Cloud provider (eg. RHOS)
2. Storage Mangers (both)
3. Network Manger

Comment 10 drew uhlmann 2019-01-22 17:44:00 UTC
The logic inside https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/services/dialog_local_service.rb#L80 is missing a few different cases. 
Host.last.class.name.demodulize
=> "HostEsx"
and 
CloudNetwork.last.class.name.demodulize
=> "Public"

We're going to need to do something a little different in a few cases here.

Comment 14 Nikhil Dhandre 2019-05-15 11:31:33 UTC
The expected result satisfied with this fix. I would like to open new BZ for a landing problem.

Comment 15 drew uhlmann 2019-05-15 11:32:23 UTC
As discussed with Nikhil I think this ticket can be verified and a new one open for the outstanding issue found in comment 13, though to be honest that sounds like an issue that should first be looked at by the UI team because I can't speak to what page the product should be hitting for Storage Manager things.


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