Refactored into a more manageable JS project.

This commit is contained in:
Herbert Wolverson
2024-06-21 10:44:34 -05:00
parent d02db8de43
commit 887c53aacd
3 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -e
scripts=( index.js template.js )
for script in "${scripts[@]}"
do

View File

@@ -1,6 +1,6 @@
import {subscribeWS} from "./ws";
import {BitsPerSecondGauge} from "./graphs/bits_gauge.js";
import {PacketsBar} from "./graphs/packets_bar";
import {subscribeWS} from "./pubsub/ws";
import {BitsPerSecondGauge} from "./graphs/bits_gauge";
import {PacketsPerSecondBar} from "./graphs/packets_bar";
let tpbits = null;
let tppackets = null;
@@ -10,7 +10,7 @@ function onMessage(msg) {
case "join": {
if (msg.channel === "throughput") {
tpbits = new BitsPerSecondGauge("tpBits");
tppackets = new PacketsBar("tpPackets");
tppackets = new PacketsPerSecondBar("tpPackets");
}
}
break;