Enable to add tag for configuration provider #3528
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1549488
Enable to add tag for configuration provider from 'All Rad Hat Satellites
Providers', in Configuration > Management > Providers accordion.
Important: the problem in the screen occurs right AFTER clicking on Save button in tagging screen, so it means that tagging screen opens without problems, it is possible to edit tags in the screen, but not to save them properly.
Before: (right after saving tags)
Original screenshot from the BZ, for better understanding/reproducing the problem:
After:
Details:
If we go to Configuration > Management > Providers accordion, we are normally on
root
node, it is All Configuration Manager Providers node, in the tree. After selecting some provider(s) in the list and clicking on Edit Tags (under Configuration), we are able to tag the provider and save the changes we made, without any problems. During this process (saving the tags), we enterclass_for_provider_node
method in provider foreman controller, which returnsManageIQ::Providers::ConfigurationManager
. So we know that this works, when tagging a provider. BUT if we enter other node in the tree, for example All Red Hat Satellites Providers or Foreman Providers node (as in my screenshots above), we are no longer on root node soclass_for_provider_node
returns wrong class (but only when saving tags; ). It looks like it has never worked with that class. If we just enter tagging screen (after clicking on Edit Tags),tagging_edit
method gets differentdb
as an argument, comparing to what it gets when saving the tags!