Filter does not work when table name has space

Bug #1311789 reported by mariam john
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
mariam john

Bug Description

Problem Description:

  When the DataTable name (as defined in the 'name' field of the Meta class in tables.py) has a space, filters defined on that table using FilterActions wont work.

Cause:
    -table name is used as the table id in the html
    -the elements_to_search parameter for quicksearch plugin uses the following: table#<table id> tbody tr

For example: if the table name specified in the Meta class of tables.py is 'foo bar', then the elements_to_search parameter for the quicksearch plugin will be: table#foo bar tbody tr.

mariam john (mariamj)
Changed in horizon:
assignee: nobody → mariam john (mariamj)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/89914

Changed in horizon:
status: New → In Progress
Cindy Lu (clu-m)
Changed in horizon:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/89914
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=b5e7b0766db2b6011316694ffd8fd8b9c574fcaa
Submitter: Jenkins
Branch: master

commit b5e7b0766db2b6011316694ffd8fd8b9c574fcaa
Author: <email address hidden> <email address hidden>
Date: Wed Apr 23 14:17:44 2014 -0400

    Filter does not work when table name has spaces

    Problem Description:

      When the DataTable name (as defined in the 'name' field of the
      Meta class in tables.py) has blank space, filters defined on that
      table using FilterActions wont work.

    Cause:
        -table name is used as the table id in the html
        -the table selector used in the quicksearch plugin has the
         following format:
      table#<table id> tbody tr

         For example: if the table name specified in the Meta class of
         tables.py is 'foo bar', then the table selector will be:
             table#foo bar tbody tr.

    Solution:
        Slugify the table name and use the slug name as the table id
        instead of original table name.

    Change-Id: I9d7c0ea3519c8bebb2f1ac5831cb271557908ba9
    Closes-Bug: 1311789

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → juno-rc1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.