-
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 opening incorrect tag page, opened for Ansible Playbooks navigated through Repository summary page #3721
Fix opening incorrect tag page, opened for Ansible Playbooks navigated through Repository summary page #3721
Conversation
@miq-bot add_label bug |
571f123
to
0412356
Compare
@miq-bot remove_label wip |
@miq-bot add_label gaprindashvili/yes |
@miq-bot add_label tagging |
@@ -49,6 +48,8 @@ def button | |||
end | |||
when "ansible_repository_tag" | |||
tag(self.class.model) | |||
when "embedded_configuration_script_payload_tag" # playbooks from nested list | |||
tag(model_string_to_constant(@display)) |
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.
can you pass a constant here? (rather than trusting whatever might be in @display
)
5e2e831
to
138b874
Compare
This pull request is not mergeable. Please rebase and repush. |
e2589cc
to
8b496b4
Compare
@skateman Some spec tests to revieew for you here, too! ;) 🙏 |
Remove calling toolbar method from ansible repository controller because this did not work well; add new case to button method for tagging playbooks from nested list.
Remove calling toolbar method from ansible credential controller because this did not work well; add new case to button method for tagging repositories displayed in a nested list.
Add a spec test for changes, related to tagging Ansible Repositories from a nested list, in ansible credential controller.
Add a spec test for changes, related to tagging Ansible Playbooks from a nested list, in ansible repository controller.
Add spec test for changes related to Ansible Playbooks/Repositories/Credentials pages.
Add spec tests to check rendering correct toolbars for Ansible Credentials,Repositories or Playbooks list screens.
09ade7d
to
8e188db
Compare
Checked commits hstastna/manageiq-ui-classic@0d1ddab~...8e188db with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@martinpovolny I've added some simple tests. Do you think that it is enough or should I add anything else? Thanks! :) |
@skateman : did you test this in the UI? Thx! |
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.
@martinpovolny Can this PR be merged? It looks like fixing that BZ is important, as another BZ for the same problem was created: https://bugzilla.redhat.com/show_bug.cgi?id=1581635 (I have marked it as a dup). |
…page_playbooks_through_repo Fix opening incorrect tag page, opened for Ansible Playbooks navigated through Repository summary page (cherry picked from commit 09a453a) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1583779
Gaprindashvili backport details:
|
@martinpovolny @hstastna was this really necessary? The whole point of that I would have thought that extending the helper to take a Proc that decides would have been more in line with that goal... (And if not, setting |
@himdel @martinpovolny Yes, of course, I can look into that in a follow up PR. Thanks! |
related PR: ManageIQ#3721 Move setting toolbar filename to Ansible Playbook/Credential/Repository controllers by defining new toolbar method which takes care also about setting toolbar name while displaying nested lists from summary pages.
related PR: ManageIQ#3721 Move setting toolbar filename to Ansible Playbook/Credential/Repository controllers by defining new toolbar method which takes care also about setting toolbar name while displaying nested lists from summary pages.
related PR: ManageIQ#3721 Move setting toolbar filename to Ansible Playbook/Credential/Repository controllers by defining new toolbar method which takes care also about setting toolbar name while displaying nested lists from summary pages.
related PR: ManageIQ#3721 Move setting toolbar filename to Ansible Playbook/Credential/Repository controllers by defining new toolbar method which takes care also about setting toolbar name while displaying nested lists from summary pages.
related PR: ManageIQ#3721 Move setting toolbar filename to Ansible Playbook/Credential/Repository controllers by defining new toolbar method which takes care also about setting toolbar name while displaying nested lists from summary pages.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1560482
Problem:
Incorrect tag page was opened for tagging Playbooks navigated through Repository summary page (of some repo under Automation > Ansible > Repositories) because
params[:pressed]
was not properly set ("ansible_repository_tag" instead of "embedded_configuration_script_payload_tag") and then also wrong parameter went totag
method. This was caused by wrong choosing of toolbar for the page - this was caused here: https://github.com/hstastna/manageiq-ui-classic/blob/master/app/controllers/ansible_repository_controller.rb#L14Solution:
The right toolbar for Playbooks has to be chosen, when navigating to Playbooks through Repository summary page.
Navigating to Playbooks through Repository summary page:
Navigating to Playbooks normally (Automation > Ansible > Playbooks), see the toolbar:
Note:
Original way of choosing toolbars for Ansible Playbooks/Repos/Credentials pages can cause more problems than mentioned in the BZ (link above). This is why this was changed for all of these pages, unified. Also another cases for
params[:pressed]
were added tobutton
methods in appropriate controllers.Done:
center_toolbar_filename_embedded_ansible
to toolbar chooser to choose toolbar for Ansible Playbooks/Repos/Credentials properlycenter_toolbar_filename_classic
method for proper choosing toolbar of Ansible Playbooks/Repos/Credentials pages if@display
variable is settoolbar
method from ansible playbook controller which was the original way of choosing toolbar, implemented in Add RBAC and Tagging Support to Ansible Playbooks #3522 (as the same way was already implemented in Ansible Credentials/Repositories pages)toolbar
method from ansible repository controller because this did not work well and add new case tobutton
method for tagging playbooks from nested listtoolbar
method from ansible credential controller because this did not work well and add new case tobutton
method for tagging repositories displayed in a nested list (incl. small change https://github.com/ManageIQ/manageiq-ui-classic/pull/3721/files#diff-127a850b7d7b20173ad3fba88f8a25e3R238)Before:
After: