WebPagetest Forums
Grouping of location dropdown - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: Grouping of location dropdown (/showthread.php?tid=12115)

Grouping of location dropdown - andydavies - 03-16-2013 06:21 PM

Hi Pat,

Have you given any thought to grouping of the locations by region e.g.

- Dulles
- San Jose
- etc.
- Amsterdam
- Dublin
- etc.

Given the current structure of locations.ini I'm guess adding a region= setting to location would be needed?

I plan to have a dabble with re-implementing locations.ini in TOML (https://github.com/mojombo/toml) - I've taken a brief look at the code that reads locations.ini but haven't got much further yet. (got other things to finish first)

RE: Grouping of location dropdown - pmeenan - 03-19-2013 12:57 AM

Yeah, I've considered it a bit but it's mostly an issue just for the public instance so I haven't put a whole lot of work into it, mostly because the dropdown lists don't have particularly good support for making it look better. I'll take a look again and see if things got any better.

RE: Grouping of location dropdown - andydavies - 03-19-2013 03:23 AM

I reckon <optgroup> is what you need


(this isn't high priority for me either)

RE: Grouping of location dropdown - pmeenan - 03-20-2013 02:08 AM

Thanks - that did the trick. Give it a try and let me know if it looks ok.

You can add a group=blah to locations (or just the first location for any grouping) and all of the locations until the group label changes will be grouped together.

RE: Grouping of location dropdown - andydavies - 03-20-2013 02:17 AM

Thanks, it looks great!