Tree is fully redactable.

This commit is contained in:
Herbert Wolverson 2024-07-17 10:19:05 -05:00
parent 4580f499fc
commit 0770e9fe78
5 changed files with 6 additions and 4 deletions

View File

@ -18,6 +18,7 @@ export function redactCell(cell) {
}
function cssRedact() {
console.log("cssRedact called");
if (isRedacted()) {
let r = document.querySelector(':root');
r.style.setProperty('--redact', 'blur(4px)');

View File

@ -3,7 +3,6 @@ import {checkForUpgrades} from "./toasts/version_check";
import {initRedact} from "./helpers/redact";
import {sponsorTag} from "./toasts/sponsor_us";
initRedact();
checkForUpgrades("toasts");
sponsorTag("toasts")
const dashboard = new Dashboard("dashboard");

View File

@ -1,4 +1,5 @@
import {clearDiv} from "./helpers/builders";
import {initRedact} from "./helpers/redact";
function initDayNightMode() {
const currentTheme = localStorage.getItem('theme');
@ -149,6 +150,7 @@ function setupReload() {
initLogout();
initDayNightMode();
initRedact();
getDeviceCounts();
titleAndLts();
setupSearch();

View File

@ -114,14 +114,14 @@ function buildRow(i, depth=0) {
nodeName += "─";
}
if (depth > 0) nodeName += " ";
nodeName += "<a href='/tree.html?parent=" + nodeId + "'>";
nodeName += "<a href='/tree.html?parent=" + nodeId + "' class='redactable'>";
nodeName += node.name;
nodeName += "</a>";
if (node.type !== null) {
nodeName += " (" + node.type + ")";
}
col.innerHTML = nodeName;
col.classList.add("small", "redactable");
col.classList.add("small");
row.appendChild(col);
col = document.createElement("td");

View File

@ -1,6 +1,6 @@
<div class="row">
<div class="col-4">
<h5><i class="fa fa-tree"></i> Network Tree (<span id="nodeName"></span>)</h5>
<h5><i class="fa fa-tree"></i> Network Tree (<span id="nodeName" class="redactable"></span>)</h5>
<table class="table">
<tr>
<td style="font-weight: bold;">Limits:</td>