Skip to content
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

VMs and Templates: broken filtering on EmsFolders #2632

Closed
martinpovolny opened this issue Nov 4, 2017 · 0 comments
Closed

VMs and Templates: broken filtering on EmsFolders #2632

martinpovolny opened this issue Nov 4, 2017 · 0 comments
Labels

Comments

@martinpovolny
Copy link
Member

martinpovolny commented Nov 4, 2017

  • Go to Compute --> Infra --> VMs
  • Make sure the Vms & Template accordion/tree is selected
  • Click on a folder

Problem: too many Vms and templates are displayed the EmsFolder criteria is ignored.

The data passed to /report_data is:

{"model_name":"VmOrTemplate",
"model":"VmOrTemplate",
"active_tree":"vandt_tree",
"explorer":true,
"additional_options":{"named_scope":["with_ems"],
"gtl_dbname":null,
"model":"VmOrTemplate",
"match_via_descendants":null,
"parent_id":10000000000010,
"parent_method":null,
"association":"all_vms_and_templates",
"view_suffix":null}}

It has parent_id set inside additional_options but not in the root params. However setting it would not help because the parend model is not being transfered. It is being guessed in
https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller.rb#L463

@karelhala: This looks very hacky to me and I don't see how the parent model shold be transfered in a systematic way.

@tumido : this comes from:
https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/vm_common.rb#L1141
I wonder if we could match the folders using a named scope instead?

Options for fixing:

@karelhala, @tumido : thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant