Adam Warner
e2d711f547
Request ANSI colour codes when calling gravity API
...
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
2025-11-19 21:28:47 +00:00
yubiuser
febc2b870a
Escape all lines to also prevent XSS for non-domain entries
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-10-12 15:44:23 +02:00
yubiuser
55e8e4a328
Use \u001B instead of (hidden) ESC character
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-07-19 21:53:45 +02:00
yubiuser
b4af886192
HTML escape adlist URL before printing it in gravity stream
...
Co-authored-by: DL6ER <dl6er@dl6er.de >
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-07-19 21:53:45 +02:00
yubiuser
1c753f7cc6
Use innerHTML instead of append to fix gravity color output
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-07-16 09:03:23 +02:00
XhmikosR
ef4f97610b
gravity: convert to vanilla JS and refactor code
...
Only the alerts are using jQuery for now
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-06-28 08:28:33 +03:00
yubiuser
f11ac8f944
Processs line squentially to always close the right number of <span> once we hit {COL_NC}
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 22:32:31 +02:00
yubiuser
9618f327e4
Use mapping
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 21:42:03 +02:00
yubiuser
9ad85da4cf
Disable eslint prettier/prettier rule for the block too keep it readable
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 20:32:39 +02:00
yubiuser
785494e60b
Add <span> counter
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 20:19:04 +02:00
yubiuser
b884688a84
Replace ANSI escape codes with HTML tags
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 19:22:32 +02:00
yubiuser
4e5d4cfa8d
Add some color to gravity output
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2025-06-24 15:10:42 +02:00
XhmikosR
44226e1bec
Use for...of in more places
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-05-12 18:46:36 +03:00
XhmikosR
7342abc169
gravity: remove the unused ?go code
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-05-01 21:19:26 +03:00
XhmikosR
756239a6dd
xo: enable strict mode
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-04-23 20:50:12 +03:00
XhmikosR
f8a0a1d4ec
Tighten xo rules
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-04-23 07:53:13 +03:00
DL6ER
b524a2f4b6
Always use document.body.dataset.apiurl instead of the intermediate const apiUrl
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2025-03-31 22:00:16 +02:00
XhmikosR
ac24b73312
Use pretty URLs when possible
...
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-03-29 09:54:05 +02:00
DL6ER
6a6a3911f0
Merge branch 'development' into new/web_prefix
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2025-03-18 06:58:10 +01:00
XhmikosR
4c6b927cd3
Update browserslistc
...
Aligns better with what's actually supported
Signed-off-by: XhmikosR <xhmikosr@gmail.com >
2025-03-13 08:40:06 +02:00
DL6ER
a7f1ca7800
Allow path prefix multiplexing the dashboard and API. See https://github.com/pi-hole/FTL/pull/2319 for further details
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2025-03-02 20:20:10 +01:00
yubiuser
e7f97baab1
Fix prefer-global-this error
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2024-12-07 16:11:35 +01:00
yubiuser
1e922a8b29
Move all files from /scripts/pi-hole/ to /scripts/
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2024-10-28 20:22:09 +01:00