mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Visual pass: add tooltips support for dashlets, and add initial tooltips for each item. Make a few colour and symbol tweaks on graphs.
This commit is contained in:
parent
8ca5b24d70
commit
7982b37a8f
@ -28,6 +28,10 @@ export class BaseDashlet {
|
|||||||
return "Someone forgot to set a title";
|
return "Someone forgot to set a title";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@ -41,6 +45,12 @@ export class BaseDashlet {
|
|||||||
this.setup(msg);
|
this.setup(msg);
|
||||||
}
|
}
|
||||||
this.setupDone = true;
|
this.setupDone = true;
|
||||||
|
|
||||||
|
// Tooltips everywhere!
|
||||||
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
||||||
|
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
||||||
|
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setup() {}
|
setup() {}
|
||||||
@ -69,6 +79,22 @@ export class BaseDashlet {
|
|||||||
title.classList.add("dashbox-title");
|
title.classList.add("dashbox-title");
|
||||||
title.innerText = this.title();
|
title.innerText = this.title();
|
||||||
|
|
||||||
|
let tt = this.tooltip();
|
||||||
|
if (tt !== null) {
|
||||||
|
let tooltip = document.createElement("span");
|
||||||
|
tooltip.style.marginLeft = "5px";
|
||||||
|
let button = document.createElement("a");
|
||||||
|
//button.type = "button";
|
||||||
|
//button.classList.add("btn", "btn-sm", "btn-info");
|
||||||
|
button.title = tt;
|
||||||
|
button.setAttribute("data-bs-toggle", "tooltip");
|
||||||
|
button.setAttribute("data-bs-placement", "top");
|
||||||
|
button.setAttribute("data-bs-html", "true");
|
||||||
|
button.innerHTML = "<i class='fas fa-info-circle'></i>";
|
||||||
|
tooltip.appendChild(button);
|
||||||
|
title.appendChild(tooltip);
|
||||||
|
}
|
||||||
|
|
||||||
div.appendChild(title);
|
div.appendChild(title);
|
||||||
|
|
||||||
return div;
|
return div;
|
||||||
|
@ -10,6 +10,10 @@ export class CpuDash extends BaseDashlet{
|
|||||||
return "CPU Utilization";
|
return "CPU Utilization";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>CPU Utilization</h5><p>Percentage of CPU time spent on user processes, system processes, and idle time. This includes both LibreQoS and anything else running on the server.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Cpu" ];
|
return [ "Cpu" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class Top10EndpointsByCountry extends BaseDashlet {
|
|||||||
return "Endpoints by Country";
|
return "Endpoints by Country";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Endpoints by Country</h5><p>Top 10 endpoints by country/region, ordered by download speed. This data is gathered from recently completed flows, and may be a little behind realtime.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "EndpointsByCountry" ];
|
return [ "EndpointsByCountry" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class EtherProtocols extends BaseDashlet {
|
|||||||
return "Ethernet Protocols";
|
return "Ethernet Protocols";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Ethernet Protocols</h5><p>Bytes and packets transferred over IPv4 and IPv6, and the round-trip time for each. This data is gathered from recently completed flows, and may be a little behind realtime.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "EtherProtocols" ];
|
return [ "EtherProtocols" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class IpProtocols extends BaseDashlet {
|
|||||||
return "IP Protocols";
|
return "IP Protocols";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>IP Protocols</h5><p>Bytes transferred over TCP/UDP/ICMP and port numbers, matched to common services when possible. This data is gathered from recently completed flows, and may be a little behind realtime.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "IpProtocols" ];
|
return [ "IpProtocols" ];
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,10 @@ export class QueueStatsTotalDash extends BaseDashlet {
|
|||||||
return "Cake Stats (Total)";
|
return "Cake Stats (Total)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Cake Stats (Total)</h5><p>Total number of fair queueing interventions per second. ECN Marks label packets as having possible congestion, signalling the flow to slow down. Drops discard selected packets to \"pace\" the queue for efficient, fair, low-latency throughput.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "QueueStatsTotal" ];
|
return [ "QueueStatsTotal" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class RamDash extends BaseDashlet{
|
|||||||
return "RAM Utilization";
|
return "RAM Utilization";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>RAM Utilization</h5><p>Percentage of RAM used and free. This includes both LibreQoS and anything else running on the server.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Ram" ];
|
return [ "Ram" ];
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,10 @@ export class RttHisto3dDash extends BaseDashlet{
|
|||||||
return "Round-Trip Time Histogram 3D";
|
return "Round-Trip Time Histogram 3D";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Round-Trip Time Histogram 3D</h5><p>Round-Trip Time Histogram, expanded to include time as a third dimension. This can be helpful for seeing how your performance is changing over time.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "RttHistogram" ];
|
return [ "RttHistogram" ];
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,10 @@ export class RttHistoDash extends BaseDashlet{
|
|||||||
return "Round-Trip Time Histogram";
|
return "Round-Trip Time Histogram";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Round-Trip Time Histogram</h5><p>Round-Trip Time Histogram, showing the distribution of round-trip times for packets in real-time.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "RttHistogram" ];
|
return [ "RttHistogram" ];
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ export class ShapedUnshapedDash extends BaseDashlet{
|
|||||||
return "Shaped/Unshaped Traffic";
|
return "Shaped/Unshaped Traffic";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Shaped/Unshaped Traffic</h5><p>Shows the amount of traffic that is shaped and unshaped. Shaped traffic is limited by the configured bandwidth limits, while unshaped traffic is not.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Throughput" ];
|
return [ "Throughput" ];
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ export class ThroughputBpsDash extends BaseDashlet{
|
|||||||
return "Throughput Bits/Second";
|
return "Throughput Bits/Second";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Throughput Bits/Second</h5><p>Shows the current throughput in bits per second. Traffic is divided between upload (from the ISP) and download (to the ISP) traffic.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Throughput" ];
|
return [ "Throughput" ];
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ export class ThroughputPpsDash extends BaseDashlet{
|
|||||||
return "Throughput Packets/Second";
|
return "Throughput Packets/Second";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Throughput Packets/Second</h5><p>Shows the current throughput in packets per second. Traffic is divided between upload (from the ISP) and download (to the ISP) traffic.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Throughput" ];
|
return [ "Throughput" ];
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,10 @@ export class ThroughputRingDash extends BaseDashlet{
|
|||||||
return "Last 5 Minutes Throughput";
|
return "Last 5 Minutes Throughput";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Last 5 Minutes Throughput</h5><p>Shaped (AQM controlled and limited) and Unshaped (not found in your Shaped Devices file) traffic over the last five minutes.</p>"
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "Throughput" ];
|
return [ "Throughput" ];
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,10 @@ export class Top10Downloaders extends BaseDashlet {
|
|||||||
return "Top 10 Downloaders";
|
return "Top 10 Downloaders";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Top 10 Downloaders</h5><p>Top 10 Downloaders by bits per second, including IP address, download and upload rates, round-trip time, TCP retransmits, and shaping plan.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "TopDownloads" ];
|
return [ "TopDownloads" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class Top10FlowsBytes extends BaseDashlet {
|
|||||||
return "Top 10 Flows (by total bytes)";
|
return "Top 10 Flows (by total bytes)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Top 10 Flows (by total bytes)</h5><p>Top 10 Flows by total bytes, including protocol, local and remote IP addresses, download and upload rates, total bytes, round-trip time, TCP retransmits, remote ASN, and country.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "TopFlowsBytes" ];
|
return [ "TopFlowsBytes" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class Top10FlowsRate extends BaseDashlet {
|
|||||||
return "Top 10 Flows (by rate)";
|
return "Top 10 Flows (by rate)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Top 10 Flows (by rate)</h5><p>Top 10 Flows by rate, including protocol, local and remote IP addresses, download and upload rates, total bytes, round-trip time, TCP retransmits, remote ASN, and country.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "TopFlowsRate" ];
|
return [ "TopFlowsRate" ];
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,10 @@ export class TopTreeSummary extends BaseDashlet {
|
|||||||
return "Network Tree";
|
return "Network Tree";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Network Tree</h5><p>Summary of the top-level network tree, including branch name, download and upload rates, TCP retransmits, Cake marks, and Cake drops.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "TreeSummary" ];
|
return [ "TreeSummary" ];
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ export class TrackedFlowsCount extends BaseDashlet{
|
|||||||
return "Tracked Flows";
|
return "Tracked Flows";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Tracked Flows</h5><p>Number of flows tracked by LibreQoS. Flows are either a TCP connection, or a UDP/ICMP connection with matching endpoints and port/request type numbers.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "FlowCount" ];
|
return [ "FlowCount" ];
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,10 @@ export class Worst10Downloaders extends BaseDashlet {
|
|||||||
return "Worst 10 Round-Trip Time";
|
return "Worst 10 Round-Trip Time";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Worst 10 Round-Trip Time</h5><p>Worst 10 Downloaders by round-trip time, including IP address, download and upload rates, round-trip time, TCP retransmits, and shaping plan.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "WorstRTT" ];
|
return [ "WorstRTT" ];
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,10 @@ export class Worst10Retransmits extends BaseDashlet {
|
|||||||
return "Worst 10 TCP Re-transmits";
|
return "Worst 10 TCP Re-transmits";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip() {
|
||||||
|
return "<h5>Worst 10 TCP Re-transmits</h5><p>Worst 10 Downloaders by TCP retransmits, including IP address, download and upload rates, round-trip time, TCP retransmits, and shaping plan.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
subscribeTo() {
|
subscribeTo() {
|
||||||
return [ "WorstRetransmits" ];
|
return [ "WorstRetransmits" ];
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,10 @@ export class FlowCountGraph extends DashboardGraph {
|
|||||||
name: 'flows',
|
name: 'flows',
|
||||||
data: [],
|
data: [],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
lineStyle: {
|
||||||
|
color: 'orange',
|
||||||
|
},
|
||||||
|
symbol: 'none',
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
|
@ -13,12 +13,12 @@ export class PacketsPerSecondBar extends DashboardGraph {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Up', 'Down'],
|
data: ['UP', 'DN'],
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: [0, 0]
|
data: [0, 0],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -27,7 +27,10 @@ export class PacketsPerSecondBar extends DashboardGraph {
|
|||||||
|
|
||||||
update(down, up) {
|
update(down, up) {
|
||||||
this.chart.hideLoading();
|
this.chart.hideLoading();
|
||||||
this.option.series[0].data = [up, down];
|
this.option.series[0].data = [
|
||||||
|
{ value: up, itemStyle: { color: 'orange' } },
|
||||||
|
{ value: down, itemStyle: { color: 'green' } }
|
||||||
|
];
|
||||||
this.chart.setOption(this.option);
|
this.chart.setOption(this.option);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -56,24 +56,28 @@ export class QueueStatsTotalGraph extends DashboardGraph {
|
|||||||
data: [],
|
data: [],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: { color: "green" },
|
lineStyle: { color: "green" },
|
||||||
|
symbol: 'none',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ECN Marks Up',
|
name: 'ECN Marks Up',
|
||||||
data: [],
|
data: [],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: { color: "green" },
|
lineStyle: { color: "green" },
|
||||||
|
symbol: 'none',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Cake Drops',
|
name: 'Cake Drops',
|
||||||
data: [],
|
data: [],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: { color: "orange" },
|
lineStyle: { color: "orange" },
|
||||||
|
symbol: 'none',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Cake Drops Up',
|
name: 'Cake Drops Up',
|
||||||
data: [],
|
data: [],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: { color: "orange" },
|
lineStyle: { color: "orange" },
|
||||||
|
symbol: 'none',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
Loading…
Reference in New Issue
Block a user