Improved redaction for Sankey displays

This commit is contained in:
Herbert Wolverson 2024-07-29 10:57:49 -05:00
parent f41e4c9133
commit cabbcf92c0
3 changed files with 5 additions and 4 deletions

View File

@ -98,7 +98,7 @@ function start() {
fontSize: 6,
color: "#999"
};
if (redact) label.fontSize = 0;
if (redact) label.backgroundColor = label.color;
nodes.push({
name: data[i][1].name,

View File

@ -1,6 +1,5 @@
import {BaseDashlet} from "./base_dashlet";
import {clearDiv, simpleRowHtml, theading} from "../helpers/builders";
import {formatThroughput, formatRetransmit, formatCakeStat, lerpGreenToRedViaOrange} from "../helpers/scaling";
import {lerpGreenToRedViaOrange} from "../helpers/scaling";
import {DashboardGraph} from "../graphs/dashboard_graph";
import {isRedacted} from "../helpers/redact";
@ -92,7 +91,7 @@ export class TopTreeSankey extends BaseDashlet {
fontSize: 9,
color: "#999"
};
if (redact) label.fontSize = 0;
if (redact) label.backgroundColor = label.color;
let name = r[1].name;
let bytes = r[1].current_throughput[0];

View File

@ -1,5 +1,6 @@
import {DashboardGraph} from "./dashboard_graph";
import {lerpColor, lerpGreenToRedViaOrange, scaleNumber} from "../helpers/scaling";
import {isRedacted} from "../helpers/redact";
export class TopNSankey extends DashboardGraph {
constructor(id) {
@ -59,6 +60,7 @@ export class TopNSankey extends DashboardGraph {
fontSize: 9,
color: "#999"
};
if (isRedacted()) label.backgroundColor = label.color;
let name = r.ip_address+ " (" + scaleNumber(r.bits_per_second.down, 0) + ", " + r.tcp_retransmits.down + "/" + r.tcp_retransmits.up + ")";
let bytes = r.bits_per_second.down / 8;