Project

General

Profile

Actions

Todo #16950

open

Add upgrade code to normalize widget sequence data

Added by Jim Pingle about 9 hours ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
26.10
Release Notes:
Default

Description

The default configuration has contained an invalid widget sequence tag for quite some time, so there are likely numerous configurations out there that have widget sequences which function, but are not correct.

I fixed the default configuration in commit 6d3d4da0cb6e47b821c82382a40e220f99f8da49.

The incorrect sequence data is:

<sequence>system_information:col1:show,disks:col1:show,netgate_services_and_support:col2:show,interfaces:col2:show</sequence>

And the correct version of that data is:

<sequence>system_information:col1:open:0,disks:col1:open:0,netgate_services_and_support:col2:open:0,interfaces:col2:open:0</sequence>

The differences are:

  • The state is show when it should be open -- this should have been corrected by upgrade_126_to_127() in source:src/etc/inc/upgrade_config.inc#L3946 but the default wasn't updated after that point.
  • There is no widget instance counter. If it is NULL, it should be 0.
  • Not present here but if the colX value is empty or invalid, it should assume col1 for the system_information widget and col2 for anything else. After that, backward compatibility code around source:src/usr/local/www/index.php#L233 can also be removed.

Once this is fixed, the validation code added in #16947 could be adjusted to no longer allow the outdated sequence data.

No data to display

Actions

Also available in: Atom PDF