mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Include fading in the top N
This commit is contained in:
@@ -121,6 +121,9 @@ export function topNTableHeader() {
|
||||
export function topNTableRow(r) {
|
||||
let row = document.createElement("tr");
|
||||
row.classList.add("small");
|
||||
let opacity = (10.0 - r.lastSeen) / 10.0;
|
||||
//console.log(opacity, r.lastSeen);
|
||||
row.style.opacity = opacity.toFixed(1);
|
||||
|
||||
if (r.circuit_id !== "") {
|
||||
let td = document.createElement("td");
|
||||
|
||||
@@ -40,7 +40,9 @@ export class TimedCache {
|
||||
|
||||
// Map to only have the value
|
||||
entries = entries.map((v) => {
|
||||
return v.value;
|
||||
let x = v.value;
|
||||
x.lastSeen = (Date.now() - v.lastSeen) / 1000;
|
||||
return x;
|
||||
});
|
||||
|
||||
// Return the top 10
|
||||
|
||||
Reference in New Issue
Block a user