Fix regex adding `v` flag and fix line breaks to respect maximum lenght
Note: these issues were not previously reported because there was a merge
conflict. The prettier test was only executed after the merge conflict was
resolved.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Resolve merge conflict in style/pi-hole.css (keep both StaticDHCPTable
styles and DNSSEC query log styles).
Address outstanding reviewer feedback:
- Change save button icon from floppy-disk to checkmark to clarify it
confirms the row edit, not a final save
- Update hint text to mention "Save & Apply" is still needed
- Add hostname validation on the hostname cell (rejects spaces, commas,
and other characters invalid in DNS names)
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>
The information from `mg.request_info.request_uri` depends on the URL typed
by the user. This information was used without any sanitization, allowing
an attacker to send crafted links containing anything, including javascript
code, which could be loaded and executed in a few pages.
Replacing this value with `scriptname` variable fixes the issue, since this
variable contains the name of the file currently being executed. This
information cannot be externally manipulated and it is safe to be used on
the page.
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>