Bug 1553846

Summary: [RFE] Select entry point should be shown on editing
Product: Red Hat CloudForms Management Engine Reporter: Shveta <sshveta>
Component: UI - OPSAssignee: Patrik Kománek <pkomanek>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: dhalasz, gmccullo, hkataria, lavenel, mkanoor, mpovolny, nansari, obarenbo, pkomanek, simaishi, smallamp, sshveta, tfitzger
Target Milestone: GAKeywords: FutureFeature, RFE
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: service
Fixed In Version: 5.11.0.14 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:33:51 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: 1720596    
Bug Blocks:    
Attachments:
Description Flags
entry point path not displayed
none
In 5.10
none
entry point in 5.11 none

Description Shveta 2018-03-09 17:07:29 UTC
Created attachment 1406326 [details]
entry point path not displayed

Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Create a dialog with one dynamic element.
2. Provide an entry point for the dynamic element and Save.
3. Edit element and click on entry point , attached screenshot shows only domains 
are shown , full path to the selected method should be shown.

Actual results:


Expected results:


Additional info:
5.9.0.22.20180221205805_f93a675

Appliance : https://10.8.198.195

Comment 2 Sudhir Mallamprabhakara 2018-06-14 15:11:30 UTC
Can you check this on 5.9.3.1?

Comment 3 Shveta 2018-06-14 22:30:18 UTC
Yes still a bug in 5.9.3.1.20180606184006_8d120c0

Comment 5 Shveta 2019-02-08 17:01:24 UTC
Created attachment 1528191 [details]
In 5.10

In 5.10 also only the domain names are shown .
It will be helpful if the path given in entry point is selected and displayed in the tree

Comment 21 CFME Bot 2019-03-04 12:41:17 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/afa4734fa37253a471249e8b783a20387aeafee5
commit afa4734fa37253a471249e8b783a20387aeafee5
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Feb 22 12:45:51 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Feb 22 12:45:51 2019 -0500

    Dialog Editor - pass in a single tree-options object

    expected methods:

    * load() -> Promise(data)
    * lazyLoad(node) -> Promise(data)

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

 app/assets/javascripts/controllers/dialog_editor/dialog_editor_controller.js | 11 +-
 app/views/miq_ae_customization/editor.html.haml | 2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/c97834dcacef1c68b1a1a4cc201e168f4b567b14
commit c97834dcacef1c68b1a1a4cc201e168f4b567b14
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Feb 22 12:47:34 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Feb 22 12:47:34 2019 -0500

    treeSelectorLoadData - allow for a ?fqdn param to automate_entrypoint

    used to initialize the tree with the right node expanded

    treeOptions.load now accepts an optional fqdn argument

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

 app/assets/javascripts/services/dialog_editor_http_service.js | 5 +-
 app/views/miq_ae_customization/editor.html.haml | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Comment 23 CFME Bot 2019-05-22 08:06:43 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/71d635f13e03b7074238f97d5b2ddd9e409c249c
commit 71d635f13e03b7074238f97d5b2ddd9e409c249c
Author:     Dávid Halász <dhalasz>
AuthorDate: Wed May  8 01:08:17 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Wed May  8 01:08:17 2019 -0400

    Allow TreeController#fetch_tree to accept a block before building

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

 app/controllers/tree_controller.rb | 12 +-
 spec/controllers/tree_controller_spec.rb | 3 +-
 2 files changed, 13 insertions(+), 2 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/e2266567ad9608b0e8eb5f74b3887cb9ad717525
commit e2266567ad9608b0e8eb5f74b3887cb9ad717525
Author:     Dávid Halász <dhalasz>
AuthorDate: Wed May  8 01:08:21 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Wed May  8 01:08:21 2019 -0400

    Make the TreeBuilder#open_node method public

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

 app/presenters/tree_builder.rb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/36522ada53a64a129cb3519b4183da8084dced1c
commit 36522ada53a64a129cb3519b4183da8084dced1c
Author:     Dávid Halász <dhalasz>
AuthorDate: Wed May  8 01:08:24 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Wed May  8 01:08:24 2019 -0400

    Rename fqdn to fqname in DialogEditorHttpService

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

 app/assets/javascripts/services/dialog_editor_http_service.js | 4 +-
 1 file changed, 2 insertions(+), 2 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/ff35fe10291f061a59c7fff77269202d1bbb4293
commit ff35fe10291f061a59c7fff77269202d1bbb4293
Author:     Dávid Halász <dhalasz>
AuthorDate: Wed May  8 01:08:28 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Wed May  8 01:08:28 2019 -0400

    Open the homonymic tree nodes for dialog editor entrypoint selection

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

 app/controllers/tree_controller.rb | 25 +-
 1 file changed, 24 insertions(+), 1 deletion(-)

Comment 24 Niyaz Akhtar Ansari 2019-06-21 06:38:45 UTC
Created attachment 1583034 [details]
entry point in 5.11

I am unable to see the selected entry points in dynamic service dialog.

Please see the attached screenshot

Hence I am failing this on_qa

Comment 25 Dávid Halász 2019-07-04 08:14:11 UTC
Hi,

that's intentional. If you read the comments above, you will know that the same automate method can exist in multiple automate domains. 
After you set the method from one domain and there are multiple homonymic methods, there's no way to determine which one you have selected.
Therefore, we don't know which one to select, the best we could do is to expand all the trees which have the same domain.

Comment 26 Loic Avenel 2019-07-04 08:43:17 UTC
(In reply to Dávid Halász from comment #25)
> Hi,
> 
> that's intentional. If you read the comments above, you will know that the
> same automate method can exist in multiple automate domains. 
> After you set the method from one domain and there are multiple homonymic
> methods, there's no way to determine which one you have selected.
> Therefore, we don't know which one to select, the best we could do is to
> expand all the trees which have the same domain.

I am confused, when we select a method, this is not saved anywhere? 
Entry point at Catalog Item level are visible with full path..

Comment 27 Dávid Halász 2019-07-04 14:51:51 UTC
If the domain is included in the fqname, we can select the right node.
I will make the required adjustments.

Comment 30 CFME Bot 2019-07-10 12:32:56 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/62550e6f35c41194d38ab9aa7380309ad8d4f0a6
commit 62550e6f35c41194d38ab9aa7380309ad8d4f0a6
Author:     Dávid Halász <dhalasz>
AuthorDate: Thu Jul  4 10:52:00 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Thu Jul  4 10:52:00 2019 -0400

    Allow the selection of a node in DialogEditor + TreeSelector

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

 src/dialog-editor/components/modal-field/modalFieldComponent.ts | 1 +
 src/dialog-editor/components/tree-selector/tree-selector.html | 1 +
 2 files changed, 2 insertions(+)

Comment 31 Dávid Halász 2019-07-10 14:12:31 UTC
I updated the behavior a little, so if the domain prefix is included in the selected entry point (with the slider to the right), the node gets reselected upon editing the item again.
However, the best I can do for not having the domain prefix is to expand all the homonymic paths without any selection...

Comment 32 CFME Bot 2019-07-10 14:17:10 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/6b639d1867a85b66f9a80226328a6bdd6214997d
commit 6b639d1867a85b66f9a80226328a6bdd6214997d
Author:     Dávid Halász <dhalasz>
AuthorDate: Thu Jul  4 10:52:55 2019 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Thu Jul  4 10:52:55 2019 -0400

    Expand the node in DialogEditor/TreeSelector with prefix included

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

 app/controllers/tree_controller.rb | 53 +-
 1 file changed, 35 insertions(+), 18 deletions(-)

Comment 33 Niyaz Akhtar Ansari 2019-07-17 08:05:16 UTC
Looks good to me tested in Version 5.11.0.14.20190710225033_cb17ff0


Observations: 

1. I am able to select a tree from the edit entry point.
   a. created custom automate domain with a coping instance from the default domain and select that common instance > it works as expected as it shows both trees opened while editing entry again.
   b. I can able to select the tree path by clicking on the instance but not getting use case of save and cancel button

2. Confusion: (a. I can able to select a tree with a specific domain name using include domain as prefix checkbox but once again when I tried to edit the tree that time checkbox of include domain gets disabled(and we can enable too). Need clarity on include domain checkbox status while editing tree path again)

Comment 34 Niyaz Akhtar Ansari 2019-07-31 07:23:40 UTC
Verified  in Version 5.11.0.16.20190724210259_2b4aa51

Comment 36 errata-xmlrpc 2019-12-12 13:33:51 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