-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Automate Domains and Providers clickable from the list displayed through Tenant's Relationships #6144
Make Automate Domains and Providers clickable from the list displayed through Tenant's Relationships #6144
Conversation
779885a
to
827e24b
Compare
d92a175
to
34e2a33
Compare
34e2a33
to
8b5e292
Compare
4ac83ef
to
3d56794
Compare
Clicking on these providers redirects to appropriate controller and displays dashboard view/details page:
|
96f62c2
to
7b9c1b5
Compare
c479f61
to
4602c25
Compare
redirect_to(polymorphic_path(record)) | ||
rescue NoMethodError | ||
flash_to_session(_("Cannot redirect to \"%{record}\" provider.") % {:record => record.name}, :error) | ||
redirect_to(:controller => 'ops', :action => 'explorer') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to redirect user back to the tenant detail, but can stay in the screen displaying providers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with Martin P we decided to redirect user back to the Tenant textual summary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works 👍
Solve clicking on Ansible Tower/Automation Manager, Embedded Ansible and Satellite Provider.
4602c25
to
49e16d6
Compare
Checked commits hstastna/manageiq-ui-classic@df4d1e5~...49e16d6 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
begin | ||
redirect_to(polymorphic_path(record)) | ||
rescue NoMethodError | ||
flash_to_session(_("Cannot redirect to \"%{record}\" provider.") % {:record => record.name}, :error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the word redirect
here is a bit unfortunate. I understand that we're in redirect controller and what we're doing here is rendering redirects, but the user reading the above flash message isn't expecting any redirects, the user is just clicking in the ui.
May I suggest a string like: Cannot display ... provider
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cannot redirect..." flash message/string was suggested by @martinpovolny.
And in my opinion, "cannot redirect..." can be more accurate. We just have problems with redirecting to the proper place from list of Providers from Tenant's summary, not with displaying provider's info in general. Displaying still can be possible for example via different place/controller. I just cannot guarantee proper redirecting for all kinds of providers here, so I better implemented displaying this flash message. I am little bit worried that we would create a little misunderstanding by using "cannot display..". It would feel like we are not able to display the provider at all. @martinpovolny @mzazrivec What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we aren't able to display the provider in this case, are we? My point was that redirect is really a matter of internal implementation here, not necessarilly something a user would understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, the flash message is ok. And yes, it could be confusing for some users because as you said, it's about internal implementation. I have no problem with changing the string in a flash message. But .. I think that this all is just about that we are trying to see into users' heads and assume what's understandable for them. Anyway, @martinpovolny what do you think about Milan's assumption?
RFE: https://bugzilla.redhat.com/show_bug.cgi?id=1678124
Depends on: #5675 (merged)
Tracking issue: ManageIQ/manageiq#18734
This is a continuation of an RFE about converting Tenants details page to textual summary and adding Relationships with Services, Automate Domains and Providers. Specifically, this PR makes Automate Domains and Providers clickable from the list displayed thru Relationships table of Tenant's textual summary. After clicking on any Automate Domain or a Provider, we are redirected to the appropriate controller and details about the selected item are displayed.
For Automate Domains, I had to add new
show
method tomiq_ae_class
controller and to add a condition in application helper for choosing the right controller (instead of unnecessary creatingmiq_ae_domain
controller). I also had to add missing templateapp/views/miq_ae_class/show.html.haml
to make it work.TODO:
(but the whole rendered page does not work well - that's another bug, unrelated to this PR)
(redirect to Automate -> Ansible -> Playbooks (Embedded Ansible))
or at least, it will not 💣
Automate Domains are finally clickable:
Clicking on individual Satellite provider in the list of Providers related to the selected Tenant displays the provider and its Configuration Profiles:
After clicking on some provider in the list, which is not common or is unknown, flash message is displayed and we are redirected to the Tenant's textual summary:
Note:
Normally, we can access Automate Domains in Automation -> Automate -> Explorer.