Reviewed: https://review.opendev.org/754658 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6b79cdcc1b92a968c967286cc267bac39803c85e Submitter: Zuul Branch: master
commit 6b79cdcc1b92a968c967286cc267bac39803c85e Author: vinay_m <[email protected]> Date: Mon Sep 28 14:22:18 2020 +0530 Non-api filters not working with admin instance tab The issue was that the filtering opts like project_name, image_name, flavor_name that are not supported by nova API (non-api filters) do not work expectedly. These filters are mapped to their IDs [1], but an instance list retrieved before resolving non-API filters is used [2]. This commit changes the logic to resolve non-API filters first and then retrieve instances using the updated search_opts. Note that the image list is handled a bit specially. If 'image_name' is specified as a filter, we retrieve a corresponding image detail first before fetching instances to resolve the image name into its ID. Otherwise, we retrieve images only related to instances retrieved and this happens after retrieving instances. [1] https://opendev.org/openstack/horizon/src/commit/f90c3cd50174af4927737e29e2765cd2d7ca507f/openstack_dashboard/dashboards/admin/instances/views.py#L166 [2] https://opendev.org/openstack/horizon/src/commit/f90c3cd50174af4927737e29e2765cd2d7ca507f/openstack_dashboard/dashboards/admin/instances/views.py#L154 Closes-Bug: #1888490 Co-Authored-By: Akihiro Motoki <[email protected]> Change-Id: Id43adbd44778d3375c0d49da3f7530cbb99e16fe ** Changed in: horizon Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Dashboard (Horizon). https://bugs.launchpad.net/bugs/1888490 Title: wrong FilterAction instance is being created during filtering Status in OpenStack Dashboard (Horizon): Fix Released Bug description: Suppose we have deployed Openstack with several projects. Step to reproduce: - open Horizon dashboard and log in as an administrator; - go to Admin > Overview > Compute > Instances; - type name of any project in filter bar and click "filter"; - in result table appear instances of project whose name doesn't match search string; This behaviour can be clearly seen on the screenshot that I attach to the issue. I've been discovering the reason of this and figured out that actually by clicking on "filter" button (even with "Project name =" selected in dropdown) eventually a method of `FilterAction` instance is being called instead of concrete one which would contain some logic in `filter()`. Please look at: https://opendev.org/openstack/horizon/src/branch/stable/train/horizon/tables/actions.py#L524 this is the one I've described beyond. Method just return the whole data. It is overridden in subclasses but as I mentioned it creates the base class (`FilterAction`) instead of correct one for some filter field chosen in dropdown. To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1888490/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

