mirror of
https://github.com/pi-hole/web.git
synced 2025-12-19 18:28:24 +00:00
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
This commit is contained in:
@@ -15,7 +15,7 @@ function eventsource() {
|
||||
const outputElement = document.getElementById("output");
|
||||
const gravityBtn = document.getElementById("gravityBtn");
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute("content");
|
||||
const url = `${document.body.dataset.apiurl}/action/gravity`;
|
||||
const url = `${document.body.dataset.apiurl}/action/gravity?color=true`;
|
||||
|
||||
if (outputElement.innerHTML.length > 0) {
|
||||
outputElement.innerHTML = "";
|
||||
|
||||
Reference in New Issue
Block a user