Description of problem: When you are on the "New Provider Account" page, if you use the dropdown to change the provider type, that section of the page is replaced by ProviderAccounts#index, seemingly the full page including headers. (See attached screenshot.) It seems like it's returning a full HTML document instead of a partial, but I haven't been able to look into this yet. Version-Release number of selected component (if applicable): This is happening at the tip of next, and in the -testing RPMs. 2a5a633ab6b7106725835d93ddfb116e8e52d204 is the most recent commit. How reproducible: 100% Steps to Reproduce: 1. As an administrator, go to the Provider Accounts page 2. Click "New Provider Account" 3. Change the value in the "Provider" dropdown to anything else. Actual results: List of provider accounts is shown Expected results: Form is updated to show correct fields for that provider. Additional info:
Created attachment 504555 [details] Screenshot after changing provider type in dropdown
Created attachment 504590 [details] on_clicking_add On selecting any provider the page displays an ADD button. Clicking on Add button displays the following error . undefined method `[]' for nil:NilClass Screenshot attached.
FYI, there's also an overlapping Redmine task for this bug: https://www.aeolusproject.org/redmine/issues/1761
*** Bug 713005 has been marked as a duplicate of this bug. ***
So I've been looking at this with my almost non-existent javascript knowledge. Here's what I see happening: When you click on the drop-down in the provider accounts page, there is a piece of javascript that gets invoked to reload the page with appropriate UI elements. This piece of javascript looks like this: $(document).ready(function(){ var selected_provider; $("#provider_account_provider_id").change(function() { selected_provider = $("option:selected").attr('value'); $.get("https://lemur.usersys.redhat.com/conductor/provider_accounts/set_selected_provider", {'provider_account[provider_id]':selected_provider}, function(result) { $("#provider_type").html(result); } ); }); }); However, notice that it is an anonymous function, and further notice that it is loaded on .ready(). From what I've read, that means it gets loaded in during page load time. The next part is what I'm not really sure about. I think what happens is that during a click on the drop-down, a "change" event gets sent, which invokes this piece of javascript. But the problem is that option:selected isn't specific enough; it doesn't mention which form that we should be choosing this option from. I believe what happens is that it actually takes the selected element of the *first* form on the page, which happens to be admin-select drop-down. It then uses the value of that (which is /conductor/user) as the account_id, and things go down from there. While the details of the preceding paragraph might not be 100% correct, the output in the rails process does bear out the results: Processing ProviderAccountsController#set_selected_provider (for 10.16.19.47 at 2011-06-14 12:15:31) [GET] Parameters: {"action"=>"set_selected_provider", "controller"=>"provider_accounts", "provider_account"=>{"provider_id"=>"/conductor/users"}} That provider_account[provider_id] is totally bogus. I'm not quite sure how to fix this yet. Chris Lalancette
Got it. The javascript just needs a tweak to pull from the right select statement. I'll be posting a patch presently. Chris Lalancette
Bugfix in git repo, commit hash 299144cc793a9dd821755360a3965faa06245ccc
Created attachment 505108 [details] ss This is fixed in [root@ibm-x3650-03 ~]# rpm -qa | grep aeolus aeolus-conductor-devel-0.3.0-0.el6.20110616154040gited9b37c.noarch aeolus-configure-2.0.1-0.el6.20110602110128git5cb9257.noarch aeolus-conductor-0.3.0-0.el6.20110616154040gited9b37c.noarch aeolus-conductor-daemons-0.3.0-0.el6.20110616154040gited9b37c.noarch aeolus-conductor-doc-0.3.0-0.el6.20110616154040gited9b37c.noarch aeolus-all-0.3.0-0.el6.20110616154040gited9b37c.noarch [root@ibm-x3650-03 ~]# able to create provider accounts for both us-east and us-west changing the combo box does cause an error
removing ce-p2-beta
second attempt to remove ce-p2-beta
release pending...
closing out old bugs
perm close