When editing a regex domain that is just "." (single dot), the browser
interprets it as a relative path component ("current directory") and
resolves it away before sending the request. The server receives an
empty string, causing "Invalid request: Specify item in URI".
This happens because encodeURIComponent(".") returns "." unchanged —
dots are unreserved characters per RFC 3986. The browser only normalizes
literal "." and ".." path segments, not percent-encoded "%2E".
Add utils.encodePathSegment() which wraps encodeURIComponent and also
encodes dots to %2E, then apply it in groups-domains.js (the reported
bug) and groups.js (which was also missing encoding entirely).
Fixes#3308
Signed-off-by: Dominik <dl6er@dl6er.de>
instead of adding "Latest: N/A" per component, when at least one Pi-hole
component is missing the remote version info.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Also fix Unnecessary use of boolean literals in conditional expression.
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Add the 'color=true' query parameter to the gravity API call so that the
FTL backend will include ANSI escape codes for terminal color output.
This works in conjunction with FTL changes that make color codes opt-in
rather than always-on.
Addresses: pi-hole/FTL#2671
No need to check for null on endofTime, it will always have a values
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Without this, the icons won't show up on the initial table draw because the
asynchronous AJAX call usually only completes after that.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Also remove the old code used to read hideNonfatalDnsmasqWarnings_chkbox
from localstorage. This value was a leftover from v5 web interface.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
We need to add a small padding to avoid "clipping" the arc/slice.
This happens because when an arc/slice expands, it grows beyond the canvas
limits and get clipped.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
The link must send the "upstream" parameter in exactly the same format used
by the "suggestions" API.
The format is: "upstream=<IP>#<port> (<servername>)".
This will ensure that when a link is clicked, the correct server name will
be highlighted in the SELECT element on the queries.lp page and no other
OPTION element will be created.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
The outer `if` (line 92) already guarantees only 2 possible values.
If `isQueryTypeChart` is false, `isForwardDestinationChart` must be true.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>