Adding a new Security Rule to a Security Group shouldn't remove the sort on the table

Bug #1326132 reported by Matt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Ana Krivokapić
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

If I'm manually adding security rules to a security group, I don't think it's unreasonable for me to have the table sorted on Port or Protocol while I'm building out the group, but if I have the table sorted, each time you add a new rule, it reverts to the default sort of the table. (Side question, how is the table sorted by default? It doesn't appear to be port or direction or protocol, or ether type, or remote, or even when the rule was created. It just looks like a jumbled mess, hence why I want to keep it sorted...)

If I have the table sorted on Port, so I can keep track of which ones I've added already easily, it would be great if Horizon was smart enough to keep the sort applied, and just add the new rule, rather than forcing me to resort the table again, click add, create the rule, sort the table again, etc etc.

It would also be nice if there was a table sort indicator, but that's probably a topic for another bug :)

Revision history for this message
Matt (mreid) wrote :
Revision history for this message
Julie Pichon (jpichon) wrote :

I don't see a sort API option, but perhaps we could provide a reasonable default sort ourselves server-side.

https://github.com/openstack/horizon/blob/e790ac070e9b8b735c54c613d26e1ee92b7af0b0/openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py#L40

Currently it would be difficult to preserve the user-set sorting option as it is set client-side, while adding a rule reloads the page.

Revision history for this message
Matt (mreid) wrote :
Revision history for this message
Matt (mreid) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: nobody → Ana Krivokapić (akrivoka)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit e8c1f60eae7e3a76fd271dd5f14c80d06dfe6ebd
Author: Ana Krivokapic <email address hidden>
Date: Tue Jun 10 14:14:06 2014 +0200

    Sort security group rules by protocol and port

    When adding new rules to a security group, it is useful to have the
    rules sorted consistently across page reloads. This patch ensures
    that the rules are sorted by protocol first, then by port. It is still
    possible to manually sort the table using the client side capabilities,
    but by default the table is now sorted by protocol and port, server
    side.

    Change-Id: I36d29461a8437f5689425706a7faae3399c6bf23
    Closes-bug: #1326132

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Julie Pichon (jpichon) wrote :

This is the kind of simple patch that fixes annoying user experience behaviour we might want to consider backporting.

Changed in horizon:
milestone: none → juno-2
importance: Undecided → Medium
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/102180

Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/icehouse)

Reviewed: https://review.openstack.org/102180
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=e66fbc3b9f3cc0ab800c8d7caef8d8e61d5a9eb6
Submitter: Jenkins
Branch: stable/icehouse

commit e66fbc3b9f3cc0ab800c8d7caef8d8e61d5a9eb6
Author: Ana Krivokapic <email address hidden>
Date: Tue Jun 10 14:14:06 2014 +0200

    Sort security group rules by protocol and port

    When adding new rules to a security group, it is useful to have the
    rules sorted consistently across page reloads. This patch ensures
    that the rules are sorted by protocol first, then by port. It is still
    possible to manually sort the table using the client side capabilities,
    but by default the table is now sorted by protocol and port, server
    side.

    Change-Id: I36d29461a8437f5689425706a7faae3399c6bf23
    Closes-bug: #1326132
    (cherry picked from commit e8c1f60eae7e3a76fd271dd5f14c80d06dfe6ebd)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 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.