Bug 1439761 - Service catalog service dialog refresh function in cf 4.2 behaves differently from cf 4.0
Summary: Service catalog service dialog refresh function in cf 4.2 behaves differently...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.9.0
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: upgrade:service:dialog
Depends On:
Blocks: 1455670 1461183
TreeView+ depends on / blocked
 
Reported: 2017-04-06 13:29 UTC by Ryan Spagnola
Modified: 2020-06-11 13:32 UTC (History)
9 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1455670 1461183 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:41:09 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
datastore (932.88 KB, application/zip)
2017-04-11 15:06 UTC, Ryan Spagnola
no flags Details
current evm (4.23 MB, application/x-gzip)
2017-04-11 15:07 UTC, Ryan Spagnola
no flags Details
dialog export (30.34 KB, text/x-vhdl)
2017-04-11 15:07 UTC, Ryan Spagnola
no flags Details
automation no button (60.54 KB, text/plain)
2017-04-11 15:08 UTC, Ryan Spagnola
no flags Details
automation with button (59.64 KB, text/plain)
2017-04-11 15:09 UTC, Ryan Spagnola
no flags Details

Description Ryan Spagnola 2017-04-06 13:29:22 UTC
Description of problem:
on our 'Redhat Server' catalog item, we have several elements that our tied to one another and rely on the information last populated to determine the proper setting. Our 'vlan' element is one such item. It appears it's not being refreshed after the 'dialog_placement_hostname' is last updated, which is required for the vlan list to be properly loaded. I ran a test and added a refresh button to the 'vlan' element, and when I hit that the vlan list loads properly, but this was not required before. I have attached specific logs showing the behavior in our automation.log. I have also provided the dialog, and the classes that can be referenced, along with a full log dump. I only dumped the logs from the Web UI as I don't believe any other node is being used during this test.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
[collab-shell] https://gitlab.cee.redhat.com/gss-tools/collab-shell

    # ssh your_kerb.redhat.com
    # cd /cases/01825390

the following files have been downloaded and extracted:
--------------------------------
	1M	capture_no_button_automation.log
	1M	capture_with_button_automation.log
	1M	datastore_2017_04_05.zip
	1M	dialog_export_20170405_103531.yml
	5M	evm_current_chcfesbx211.unionbank.com_20170405_104145.tgz
--------------------------------

view attachments here: http://collab-shell.usersys.redhat.com/01825390/

Comment 2 eclarizi 2017-04-11 14:58:48 UTC
Looks like these files don't exist any more? I'm unable to reproduce any issue where the refresh behavior doesn't appear to be working, but since I can't see the exact dialogs being used anymore, there might be some set up there that I'm missing.

Can you re-upload at least the dialogs and/or attach them to this ticket, please?

Comment 3 Ryan Spagnola 2017-04-11 15:06:42 UTC
Created attachment 1270803 [details]
datastore

Comment 4 Ryan Spagnola 2017-04-11 15:07:21 UTC
Created attachment 1270804 [details]
current evm

Comment 5 Ryan Spagnola 2017-04-11 15:07:51 UTC
Created attachment 1270805 [details]
dialog export

Comment 6 Ryan Spagnola 2017-04-11 15:08:33 UTC
Created attachment 1270806 [details]
automation no button

Comment 7 Ryan Spagnola 2017-04-11 15:09:13 UTC
Created attachment 1270807 [details]
automation with button

Comment 13 eclarizi 2017-05-05 16:58:46 UTC
This has to do with the cascading auto refresh enhancement that we've added.

Please see this talk topic that I've created regarding the changes: http://talk.manageiq.org/t/regarding-fields-that-utilize-auto-refresh/2315.

Comment 16 CFME Bot 2017-05-22 18:48:27 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/2aa78e0c9aaf988bdd1c8a95f62b346a94baccb0

commit 2aa78e0c9aaf988bdd1c8a95f62b346a94baccb0
Author:     Erik Clarizio <eclarizio>
AuthorDate: Mon May 15 08:44:09 2017 -0700
Commit:     Erik Clarizio <eclarizio>
CommitDate: Mon May 15 09:03:29 2017 -0700

    Start cascading auto refresh from the first element
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761

 app/assets/javascripts/dialog_field_refresh.js     |  16 +-
 app/helpers/application_helper/dialogs.rb          |   3 +-
 app/views/shared/dialogs/_dialog_field.html.haml   |   2 +-
 .../dialogs/_dialog_field_check_box.html.haml      |  14 +-
 ...alog_field_date_and_date_time_control.html.haml |  14 +-
 .../dialogs/_dialog_field_drop_down_list.html.haml |  17 +-
 .../dialogs/_dialog_field_radio_button.html.haml   |  14 +-
 .../dialogs/_dialog_field_text_area_box.html.haml  |  16 +-
 .../dialogs/_dialog_field_text_box.html.haml       |  18 +-
 spec/helpers/application_helper/dialogs_spec.rb    |  21 ++-
 spec/javascripts/dialog_field_refresh_spec.js      | 188 ++++++++++++++++-----
 11 files changed, 235 insertions(+), 88 deletions(-)

Comment 17 CFME Bot 2017-05-22 18:48:33 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/9ca230c96dfbdc211baf6560e87c1e807fb7a21a

commit 9ca230c96dfbdc211baf6560e87c1e807fb7a21a
Author:     Erik Clarizio <eclarizio>
AuthorDate: Mon May 15 09:02:10 2017 -0700
Commit:     Erik Clarizio <eclarizio>
CommitDate: Mon May 15 09:11:44 2017 -0700

    Refactor javascript in each dialog_field type partial
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761

 app/assets/javascripts/dialog_field_refresh.js     |  23 +++++
 .../dialogs/_auto_refresh_javascript.html.haml     |   9 ++
 .../dialogs/_dialog_field_check_box.html.haml      |  13 +--
 ...alog_field_date_and_date_time_control.html.haml |  15 ++-
 .../dialogs/_dialog_field_drop_down_list.html.haml |  14 +--
 .../dialogs/_dialog_field_radio_button.html.haml   |  23 ++---
 .../dialogs/_dialog_field_text_area_box.html.haml  |  13 +--
 .../dialogs/_dialog_field_text_box.html.haml       |  13 +--
 spec/javascripts/dialog_field_refresh_spec.js      | 113 +++++++++++++++++++++
 9 files changed, 179 insertions(+), 57 deletions(-)
 create mode 100644 app/views/shared/dialogs/_auto_refresh_javascript.html.haml

Comment 18 eclarizi 2017-05-25 17:40:57 UTC
Hey Michael, is that *after* this fix, or before? This fix should make it so that the cascading auto refresh will always start with the first element that is set to auto-refresh, and then continue from top to bottom, leftmost tab to rightmost tab, regardless of the type of dialog field.

Comment 20 CFME Bot 2017-05-30 12:53:47 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/095aa1c5ccacc7e68f4202feedc93bfa6f7b109a

commit 095aa1c5ccacc7e68f4202feedc93bfa6f7b109a
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu May 25 13:29:07 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Thu May 25 13:32:40 2017 -0700

    Use jQuery trigger instead of postMessage
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761

 client/app/core/dialog-field-refresh.service.js    |  6 +++---
 .../app/core/dialog-field-refresh.service.spec.js  | 23 +++++++++++-----------
 2 files changed, 14 insertions(+), 15 deletions(-)

Comment 21 CFME Bot 2017-05-30 12:53:53 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/7233ccabbb72d80e16816e0359cb8e7ebdd3f6f6

commit 7233ccabbb72d80e16816e0359cb8e7ebdd3f6f6
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu May 25 13:30:47 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Thu May 25 13:35:53 2017 -0700

    Start cascading auto refresh from the first dialog field
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761
    
    Also refactor out some dialog field refresh logic into a separate
    service.

 client/app/core/core.module.js                     |   2 +
 client/app/core/dialog-field-listener.service.js   |  39 ++++++++
 .../app/core/dialog-field-listener.service.spec.js |  58 +++++++++++
 client/app/core/dialog-field-refresh.service.js    |  76 +++++++-------
 .../app/core/dialog-field-refresh.service.spec.js  | 110 +++++++++++----------
 .../app/shared/dialog-content/dialog-content.html  |  18 ++--
 .../app/states/catalogs/details/details.state.js   |   4 +-
 .../custom_button_details.state.js                 |   4 +-
 .../services/reconfigure/reconfigure.state.js      |   4 +-
 9 files changed, 206 insertions(+), 109 deletions(-)
 create mode 100644 client/app/core/dialog-field-listener.service.js
 create mode 100644 client/app/core/dialog-field-listener.service.spec.js

Comment 22 Satoe Imaishi 2017-06-07 18:29:43 UTC
Putting back to ON_DEV as SUI change (https://github.com/ManageIQ/manageiq-ui-service/pull/793) was reverted in https://github.com/ManageIQ/manageiq-ui-service/pull/799.

Comment 24 CFME Bot 2017-06-12 15:23:08 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/2993a3373602cf1070d27a0098ec0426c4f4581d

commit 2993a3373602cf1070d27a0098ec0426c4f4581d
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu Jun 8 09:25:28 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Thu Jun 8 09:31:11 2017 -0700

    Move triggering and listening to a specific AutoRefresh service
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761
    
    This change no longer uses the jQuery '$' to trigger and listen to
    messages but uses an angular service

 client/app/core/core.module.js                     |  2 +
 client/app/core/dialog-field-refresh.service.js    | 22 +++++--
 .../app/core/dialog-field-refresh.service.spec.js  | 72 +++++++++++++++++++---
 client/app/services/auto-refresh.service.js        | 44 +++++++++++++
 client/app/services/auto-refresh.service.spec.js   | 65 +++++++++++++++++++
 .../app/states/catalogs/details/details.state.js   |  7 ++-
 .../states/catalogs/details/details.state.spec.js  | 33 +++++++---
 .../custom_button_details.state.js                 |  7 ++-
 .../custom_button_details.state.spec.js            | 33 +++++++---
 .../services/reconfigure/reconfigure.state.js      |  7 ++-
 .../services/reconfigure/reconfigure.state.spec.js | 34 +++++++---
 11 files changed, 274 insertions(+), 52 deletions(-)
 create mode 100644 client/app/services/auto-refresh.service.js
 create mode 100644 client/app/services/auto-refresh.service.spec.js

Comment 25 CFME Bot 2017-06-12 15:23:13 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/52455d2a07eb7a48c2b464f417dfd7b5bd63587b

commit 52455d2a07eb7a48c2b464f417dfd7b5bd63587b
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu Jun 8 10:15:00 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Thu Jun 8 10:41:54 2017 -0700

    Remove old listener logic and clean up old code
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761

 client/app/core/dialog-field-refresh.service.js    | 63 ++++++++--------------
 .../app/core/dialog-field-refresh.service.spec.js  | 49 -----------------
 .../services/reconfigure/reconfigure.state.js      |  2 +-
 3 files changed, 24 insertions(+), 90 deletions(-)

Comment 26 CFME Bot 2017-06-12 15:23:21 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/3d1e769129b970da187124b0b367cbc6e2f451c3

commit 3d1e769129b970da187124b0b367cbc6e2f451c3
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu Jun 8 12:33:51 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Thu Jun 8 12:33:51 2017 -0700

    Move auto-refresh.service to core module and address styling issues
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439761

 client/app/core/auto-refresh.service.js          | 44 ++++++++++++++++
 client/app/core/auto-refresh.service.spec.js     | 61 ++++++++++++++++++++++
 client/app/core/core.module.js                   |  4 +-
 client/app/core/dialog-field-refresh.service.js  |  2 +-
 client/app/services/auto-refresh.service.js      | 44 ----------------
 client/app/services/auto-refresh.service.spec.js | 65 ------------------------
 6 files changed, 108 insertions(+), 112 deletions(-)
 create mode 100644 client/app/core/auto-refresh.service.js
 create mode 100644 client/app/core/auto-refresh.service.spec.js
 delete mode 100644 client/app/services/auto-refresh.service.js
 delete mode 100644 client/app/services/auto-refresh.service.spec.js

Comment 28 luke couzens 2017-06-27 08:23:38 UTC
Changing summary because this is not directly related to migration.

Comment 29 Shveta 2017-11-03 00:19:22 UTC
Fixed in 5.9.0.4.20171024163837_ef71ea6


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