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>