mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Shaped Devices is redactable
This commit is contained in:
@@ -26,8 +26,11 @@ export function theading(text, colspan=0, tooltip="", id="") {
|
||||
return th;
|
||||
}
|
||||
|
||||
export function simpleRow(text) {
|
||||
export function simpleRow(text, redact=false) {
|
||||
let td = document.createElement("td");
|
||||
if (redact) {
|
||||
td.classList.add("redactable");
|
||||
}
|
||||
td.innerText = text;
|
||||
return td;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,9 @@ export function redactCell(cell) {
|
||||
}
|
||||
|
||||
function cssRedact() {
|
||||
console.log("cssRedact called");
|
||||
if (isRedacted()) {
|
||||
let r = document.querySelector(':root');
|
||||
r.style.setProperty('--redact', 'blur(4px)');
|
||||
r.style.setProperty('--redact', 'blur(8px)');
|
||||
} else {
|
||||
let r = document.querySelector(':root');
|
||||
r.style.setProperty('--redact', 'none');
|
||||
|
||||
@@ -16,19 +16,21 @@ function tableRow(device) {
|
||||
let link = document.createElement("a");
|
||||
link.href = "circuit.html?id=" + device.circuit_id;
|
||||
link.innerText = device.circuit_name;
|
||||
link.classList.add("redactable");
|
||||
let td = document.createElement("td");
|
||||
td.appendChild(link);
|
||||
tr.appendChild(td);
|
||||
|
||||
link = document.createElement("a");
|
||||
link.href = "device.html?id=" + device.device_id;
|
||||
link.href = "circuit.html?id=" + device.circuit_id;
|
||||
link.innerText = device.device_name;
|
||||
link.classList.add("redactable");
|
||||
td = document.createElement("td");
|
||||
td.appendChild(link);
|
||||
tr.appendChild(td);
|
||||
|
||||
tr.appendChild(simpleRow(device.download_max_mbps + " / " + device.upload_max_mbps));
|
||||
tr.appendChild(simpleRow(device.parent_node));
|
||||
tr.appendChild(simpleRow(device.parent_node, true));
|
||||
let ipList = "";
|
||||
device.ipv4.forEach((ip) => {
|
||||
ipList += ip[0] + "/" + ip[1] + "<br />";
|
||||
|
||||
Reference in New Issue
Block a user