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() { function cssRedact() {
console.log("cssRedact called");
if (isRedacted()) { if (isRedacted()) {
let r = document.querySelector(':root'); let r = document.querySelector(':root');
r.style.setProperty('--redact', 'blur(4px)'); r.style.setProperty('--redact', 'blur(4px)');

View File

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

View File

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

View File

@@ -114,14 +114,14 @@ function buildRow(i, depth=0) {
nodeName += "─"; nodeName += "─";
} }
if (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 += node.name;
nodeName += "</a>"; nodeName += "</a>";
if (node.type !== null) { if (node.type !== null) {
nodeName += " (" + node.type + ")"; nodeName += " (" + node.type + ")";
} }
col.innerHTML = nodeName; col.innerHTML = nodeName;
col.classList.add("small", "redactable"); col.classList.add("small");
row.appendChild(col); row.appendChild(col);
col = document.createElement("td"); col = document.createElement("td");

View File

@@ -1,6 +1,6 @@
<div class="row"> <div class="row">
<div class="col-4"> <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"> <table class="table">
<tr> <tr>
<td style="font-weight: bold;">Limits:</td> <td style="font-weight: bold;">Limits:</td>