Project

General

Profile

Bug #6903

services_dnsmasq_edit.php: Configuration XML hosts section order appears randomized

Added by Kevin Wojniak about 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Backup/restore
Target version:
Start date:
11/08/2016
Due date:
% Done:

100%

Affected Version:
2.3.x
Affected Architecture:

Description

Related to #6893 - when I view the diff of the configuration XML after a change to DNS Resolver's Host Overrides section, the <unbound><hosts> entries appear to be randomized when they get written out to the XML. This makes viewing the diff confusing as it shows several lines modified, when in reality only a single change may have taken place.

It would be nice if the order of the XML elements matched the order displayed in the GUI.

Associated revisions

Revision 8e7fea67
Added by Steve Beaver about 1 year ago

Fixed #6903
hosts and domains sorted on display, not on save to config

Revision dcae03a3
Added by Steve Beaver about 1 year ago

Fixed #6903
hosts and domains sorted on display, not on save to config

History

#1 Updated by Steve Beaver about 1 year ago

  • Assignee set to Steve Beaver

#2 Updated by Steve Beaver about 1 year ago

  • Subject changed from Configuration XML hosts section order appears randomized to services_dnsmasq_edit.php: Configuration XML hosts section order appears randomized
  • Status changed from New to Feedback

It is certainly not "randomized", but since the two tables may be sorted (by clicking the column headers) the hosts can appear in whichever order you want.

Currently on saving a new override the hosts are sorted alphabetically by host name, so they should always appear in a consistent order when the page is first loaded, and this seems a desirable feature. Of course it also means that if you add a new override and its name begins with 'A', it will be added to the start of the list and all existing hosts will move down one.

A better approach might be to leave the list unsorted on save, but sort it when rendering the display?

A change to that effect has been pushed. Please test in the next snapshot.

#3 Updated by Steve Beaver about 1 year ago

  • % Done changed from 0 to 100

#4 Updated by Steve Beaver about 1 year ago

  • Status changed from Feedback to Resolved

#5 Updated by Jim Pingle 10 months ago

  • Target version set to 2.3.3

Also available in: Atom PDF