Sharable links include all sorts of extra unused params

Bug #1572766 reported by Matthew Treinish
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Health
Fix Released
Undecided
Tim Buckley

Bug Description

When navigating between pages on openstack-health the params you set on previous pages are sticky in the url and transfer between consecutive view. In other words if you set a groupkey param on the home page but then change to the second page view or the tests page the groupkey parameter is still in the url and it doesn't mean anything except on the first page. When you jump around between a couple of pages the urls can get kinda lengthy for no reason.

Revision history for this message
Tim Buckley (timothy-jas-buckley) wrote :

There's a couple things we can do to clean this up:
 - Controllers should listen for $destroy events and remove any page-specific parameters like 'search', 'limit', 'offset', etc (this is an issue for tests detail pagination)
 - Parameters at their default values shouldn't be shown in the URL at all (e.g. resolutionKey=hour, groupKey=project, etc should only be included if explicitly changed). The 'end' parameter could probably also be left out though after a period of time it would stop showing the same data.

I'll look into implementing these.

Changed in openstack-health:
assignee: nobody → Tim Buckley (timothy-jas-buckley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-health (master)

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

Changed in openstack-health:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-health (master)

Reviewed: https://review.openstack.org/308750
Committed: https://git.openstack.org/cgit/openstack/openstack-health/commit/?id=9bb57ab0b452b675adc1c866b32fcb0382ee996e
Submitter: Jenkins
Branch: master

commit 9bb57ab0b452b675adc1c866b32fcb0382ee996e
Author: Tim Buckley <email address hidden>
Date: Wed Apr 20 23:00:47 2016 -0600

    Only add parameters to the URL when changed from defaults

    Currently, page state parameters like 'end', 'resolutionKey', and
    'groupKey' are sync'd to the page URL on every page change
    unconditionally. This results in a lot of unnecessary information that
    we can assume by default until a user actually requests a different
    value.

    This patch modifies the current parameter sync implementation so that
    it only maintains page parameters after their initial values have been
    explicitly set by a user, and assumes default values otherwise. In
    most cases, this should significantly shorten shared URL length.

    Change-Id: Ife271444817bdfa8d19c0b69ca6039c5c7c290db
    Closes-Bug: #1572766

Changed in openstack-health:
status: In Progress → Fix Released
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.