Bug 1574774 - SUI does not show custom button dialog
Summary: SUI does not show custom button dialog
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Gregg Tanzillo
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks: 1565845 1578990
TreeView+ depends on / blocked
 
Reported: 2018-05-04 02:39 UTC by Shveta
Modified: 2019-02-11 14:01 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1578990 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:01:34 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)
dialog (1.46 KB, text/x-vhdl)
2018-05-04 02:39 UTC, Shveta
no flags Details
domain (56.98 KB, application/zip)
2018-05-04 02:39 UTC, Shveta
no flags Details
screenshot (45.58 KB, image/png)
2018-05-04 02:40 UTC, Shveta
no flags Details

Description Shveta 2018-05-04 02:39:12 UTC
Created attachment 1430992 [details]
dialog

Description of problem:


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

How reproducible:


Steps to Reproduce:
1. Import the dialog and domain attached.
2. Create a custom button on service for the dialog attached.
3. Order service . Go to Myservice In SUI .
4. Select service and then custom button in service .
5. No dialog elements are shown .
6. Classic UI shows dialog elements.

Actual results:


Expected results:


Additional info:
Appliance : https://10.8.198.232/ui/service
Service - multi-20180503-162824

Comment 2 Shveta 2018-05-04 02:39:46 UTC
Created attachment 1430993 [details]
domain

Comment 3 Shveta 2018-05-04 02:40:24 UTC
Created attachment 1430994 [details]
screenshot

Comment 4 Chris Hale 2018-05-04 20:49:19 UTC
I have started to look at this.  In looking at what is going on it appears as though the "values" for a dropdown are not coming back from the API request.  I will work with someone on the API team to troubleshoot why it does not seem to appear.  This has been the root cause of why the dropdown listed in this ticket is not showing up.  Will update ticket when we have more information.

Comment 5 Chris Hale 2018-05-07 17:07:27 UTC
Here is a sample of the requests we make for dialogs. 

Here is the request for a catalog item with a dialog

https://10.8.198.232/api/service_templates/1/service_dialogs?expand=resources&attributes=content

Here is a custom button dialog request
https://10.8.198.232/api/service_dialogs/2?expand=resources&attributes=content

The first request returns the "values" as part of the response, but the second one returns everything in the dialog except the "values" object in the response.

Comment 6 Chris Hale 2018-05-08 18:31:51 UTC
After talking with QA , we cannot conclusively say whether this functionality had ever worked in SUI.  It does work in OPS UI so for feature parity we need to ensure it works in SUI.  I investigated this with a member of the API team and found that we couldn't conclude this had ever worked for SUI.  I am reassigning this issue to the API to see if they can help get it working so we can retest this issue and get it to work

Comment 8 Tim Wade 2018-05-10 17:27:11 UTC
Chris,

I'm not sure what you're saying in https://bugzilla.redhat.com/show_bug.cgi?id=1574774#c5. Can you let us know (with examples):

1. Which request does not give you the data you are asking for
2. The data you are asking for
3. The data which is not coming back

Thanks!

Comment 9 Chris Hale 2018-05-10 17:43:12 UTC
Hi Tim,
   The Here the custom button dialog request
https://10.8.198.232/api/service_dialogs/2?expand=resources&attributes=content is the one that is not returning the data we are asking for. 

2.  The data that should be included is a key called "values" for a dialog field that is a drop down.   

3.  To save space in the comments, please take a look at the following two gists

This is a service dialog that is rendered as part of a catalog item request.  

https://gist.github.com/chalettu/2b888ceef33afbb87d356c7033596ea2

This is a dialog that is rendered as part of a custom button details request.  
https://gist.github.com/chalettu/c29752f7a7af1375a94d6b19e5f556b7

You will see that it is the exact same dialog but one is rendered with a "values" key and one does not.   the Custom button details request is the one we are having issues with.  The endpoint we hit for that request looks like https://10.8.198.232/api/service_dialogs/2?expand=resources&attributes=content

Comment 10 Tim Wade 2018-05-10 18:06:14 UTC
Chris,

Is that the same dialog field? I'm seeing that it has the same ID but different data - e.g. the data_type and default_value are different in the two examples.

Comment 11 Chris Hale 2018-05-10 18:09:56 UTC
I believe it is.  I pulled this example off the appliance IP listed in this ticket.  You should be able to log into that appliance to reproduce this as well.   Please let me know if you have any questions

Comment 12 Tim Wade 2018-05-10 18:47:56 UTC
Chris,

It looks like you need to provide some additional params when querying a service dialog as a primary collection if you want the content serialized in the same way as when you request it as a subresource of its service template. The following should work for you:

https://10.8.198.232/api/service_dialogs/2?resource_action_id=21&target_id=1&target_type=service_template

Comment 14 Chris Hale 2018-05-14 15:29:39 UTC
Hi Greg, 
   Can you let me know if an another API team member has some time to answer some questions I have about Tim's proposed solution to this issue?  I talked with him briefly at the end of last week and I think there was some miscommunication on functionality so I don't believe his solution proposed above will work for this scenario.

Comment 19 Shveta 2018-08-28 19:51:10 UTC
Verified in 5.10.0.12.20180822200426_5f6e52b


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