-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fix Policy breadcrumbs when coming from GTL page #5814
Conversation
20e3003
to
1e6376c
Compare
I think you can solve this issue by checking if |
@rvsia well, there still would be a VM name in case you check just one VM in GTL page. I think we don't want a VM name when coming from GTL page. |
@ZitaNemeckova When I designed the breadcrumbs I was following this rule: show the Item's breadcrumb on tag page (etc.) if there is only one item which is being tagged. https://github.com/ManageIQ/manageiq-ui-classic/wiki/Breadcrumbs |
@@ -74,7 +74,7 @@ def special_page_breadcrumb(variable) | |||
elsif floating_ip_address?(variable.first) | |||
title = variable.first[:address] | |||
else | |||
title = variable.first[:name] | |||
title = variable.first[:name] if variable.count == 1 # show breadcrumb only for one item |
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.
The condition can be moved to line 70:
return unless variable && variable.count == 1
or
return if !variable || variable.count != 1
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.
Fixed. Chose the second option to get rid of unless
😃
54257fe
to
a61be78
Compare
a61be78
to
28b67ec
Compare
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.
Great! Thanks! 🏆
Checked commits ZitaNemeckova/manageiq-ui-classic@bd815c1~...28b67ec with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
Fix Policy breadcrumbs when coming from GTL page (cherry picked from commit 5e2db32) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1720714
Ivanchuk backport details:
|
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1720714
How to reproduce:
Go Compute -> Infrastructure -> VMs -> check two or more VMs -> Policy -> Edit Tags/Policy Simulation/Manage Policies -> see breadcrumbs
Before:
After:
There's no change when doing the same from a VM Summary page.
Following guides for breadcrumbs Tagging/Ownership/etc.
@miq-bot add_label bug, hammer/no
@rvsia please have a look, thanks :)