Project

General

Profile

Actions

Feature #15079

closed

Remove spaces from filenames generated by status.php

Added by Craig Coonrad over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Diagnostics
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default

Description

This eases filename expansion on the command line, and simplifies iterating over the files with commands or scripts. It also makes the filenames consistent. For instance current version has:

status_cmd_define("DHCP-IPv4 Configuration", '/usr/bin/sed "s/\([[:blank:]]secret \).*/\1<redacted>/" /var/dhcpd/etc/dhcpd.conf');
status_cmd_define("DHCP-IPv6-Configuration", '/usr/bin/sed "s/\([[:blank:]]secret \).*/\1<redacted>/" /var/dhcpd/etc/dhcpdv6.conf');

This requires one edit to /usr/local/pfSense/include/www/status_output.inc:

-               $descr .= "-Last {$number} entries";
+               $descr .= "-Last-{$number}-entries";

I have attached the updated status.php from master, as well as a diff. So it should be ready to go. Tested on 23.09.1-RELEASE.


Files

status.php (14.2 KB) status.php Craig Coonrad, 12/09/2023 07:33 PM
git-diff (14.7 KB) git-diff Craig Coonrad, 12/09/2023 07:34 PM
Actions #1

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Rejected

I don't see the value in this. Properly quoting filenames or escaping spaces is trivial in this day and age, and changing to dashes makes the filenames more difficult to read for humans, who are the intended audience for the status output files. You have the exact same issues with tab expansion with/without spaces as any other character.

Actions #2

Updated by Craig Coonrad over 1 year ago

Every file in the status output has one or more dashes except one: Config History.txt. This change makes that consistent across the filename. If the objecive is human readability then all those dashes should be removed.

Actions

Also available in: Atom PDF