From 2583e5113aa9d4098781331d709cd15c93167531 Mon Sep 17 00:00:00 2001 From: Maddie Zhan Date: Mon, 27 Sep 2021 11:11:08 +0800 Subject: [PATCH] Use default html assets --- web/assets/example-multipleServers-full.html | 490 +++++++++ .../example-multipleServers-pretty.html | 245 +++++ web/assets/example-singleServer-basic.html | 38 + web/assets/example-singleServer-chart.html | 256 +++++ .../example-singleServer-customSettings.html | 174 ++++ web/assets/example-singleServer-full.html | 365 +++++++ web/assets/example-singleServer-gauges.html | 262 +++++ web/assets/example-singleServer-pretty.html | 192 ++++ .../example-singleServer-progressBar.html | 212 ++++ web/assets/index.html | 941 +++++++++--------- web/assets/linode.html | 508 ---------- 11 files changed, 2688 insertions(+), 995 deletions(-) create mode 100755 web/assets/example-multipleServers-full.html create mode 100755 web/assets/example-multipleServers-pretty.html create mode 100755 web/assets/example-singleServer-basic.html create mode 100755 web/assets/example-singleServer-chart.html create mode 100755 web/assets/example-singleServer-customSettings.html create mode 100755 web/assets/example-singleServer-full.html create mode 100755 web/assets/example-singleServer-gauges.html create mode 100755 web/assets/example-singleServer-pretty.html create mode 100755 web/assets/example-singleServer-progressBar.html mode change 100644 => 100755 web/assets/index.html delete mode 100644 web/assets/linode.html diff --git a/web/assets/example-multipleServers-full.html b/web/assets/example-multipleServers-full.html new file mode 100755 index 0000000..125edf5 --- /dev/null +++ b/web/assets/example-multipleServers-full.html @@ -0,0 +1,490 @@ + + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+

Selecting a server...

+
+ + + + diff --git a/web/assets/example-multipleServers-pretty.html b/web/assets/example-multipleServers-pretty.html new file mode 100755 index 0000000..4316eab --- /dev/null +++ b/web/assets/example-multipleServers-pretty.html @@ -0,0 +1,245 @@ + + + + + + +LibreSpeed Example + + + + + + +

LibreSpeed Example

+
+
Selecting server...
+
+
+
+
Download
+
+
Mbps
+
+
+
Upload
+
+
Mbps
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/web/assets/example-singleServer-basic.html b/web/assets/example-singleServer-basic.html new file mode 100755 index 0000000..810c548 --- /dev/null +++ b/web/assets/example-singleServer-basic.html @@ -0,0 +1,38 @@ + + + + + LibreSpeed Example + + + + +

LibreSpeed Example

+ +

IP Address

+

+ +

Download

+

+ +

Upload

+

+ +

Latency

+

+ + + + Source code + + + diff --git a/web/assets/example-singleServer-chart.html b/web/assets/example-singleServer-chart.html new file mode 100755 index 0000000..d0040e3 --- /dev/null +++ b/web/assets/example-singleServer-chart.html @@ -0,0 +1,256 @@ + + + + + LibreSpeed Example + + + + + + + + +

LibreSpeed - Chart.js example

+ + Run speedtest +

Charts by Chart.js

Source code + + diff --git a/web/assets/example-singleServer-customSettings.html b/web/assets/example-singleServer-customSettings.html new file mode 100755 index 0000000..b1c0cfb --- /dev/null +++ b/web/assets/example-singleServer-customSettings.html @@ -0,0 +1,174 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
Download
+
+
Mbps
+
+
+
Upload
+
+
Mbps
+
+
+
+Source code + + + diff --git a/web/assets/example-singleServer-full.html b/web/assets/example-singleServer-full.html new file mode 100755 index 0000000..823ef9f --- /dev/null +++ b/web/assets/example-singleServer-full.html @@ -0,0 +1,365 @@ + + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+

+ Privacy +
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+
+
Download
+ +
+
Mbps
+
+
+
Upload
+ +
+
Mbps
+
+
+
+ +
+ +
+ Source code +
+ + + + diff --git a/web/assets/example-singleServer-gauges.html b/web/assets/example-singleServer-gauges.html new file mode 100755 index 0000000..9a49705 --- /dev/null +++ b/web/assets/example-singleServer-gauges.html @@ -0,0 +1,262 @@ + + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+
+
Download
+ +
+
Mbps
+
+
+
Upload
+ +
+
Mbps
+
+
+
+ +
+
+ Source code +
+ + + diff --git a/web/assets/example-singleServer-pretty.html b/web/assets/example-singleServer-pretty.html new file mode 100755 index 0000000..7715535 --- /dev/null +++ b/web/assets/example-singleServer-pretty.html @@ -0,0 +1,192 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
Download
+
+
Mbps
+
+
+
Upload
+
+
Mbps
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/web/assets/example-singleServer-progressBar.html b/web/assets/example-singleServer-progressBar.html new file mode 100755 index 0000000..f9e7007 --- /dev/null +++ b/web/assets/example-singleServer-progressBar.html @@ -0,0 +1,212 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
+
Download
+
+
Mbps
+
+
+
Upload
+
+
Mbps
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/web/assets/index.html b/web/assets/index.html old mode 100644 new mode 100755 index 673147b..125edf5 --- a/web/assets/index.html +++ b/web/assets/index.html @@ -1,479 +1,449 @@ - - - - - - + - - - zzz.cat Speedtest + }; + s.start(); + } +} +//this function reads the data sent back by the test and updates the UI +function updateUI(forced){ + if(!forced&&s.getState()!=3) return; + if(uiData==null) return; + var status=uiData.testState; + I("ip").textContent=uiData.clientIp; + I("dlText").textContent=(status==1&&uiData.dlStatus==0)?"...":format(uiData.dlStatus); + drawMeter(I("dlMeter"),mbpsToAmount(Number(uiData.dlStatus*(status==1?oscillate():1))),meterBk,dlColor,Number(uiData.dlProgress),progColor); + I("ulText").textContent=(status==3&&uiData.ulStatus==0)?"...":format(uiData.ulStatus); + drawMeter(I("ulMeter"),mbpsToAmount(Number(uiData.ulStatus*(status==3?oscillate():1))),meterBk,ulColor,Number(uiData.ulProgress),progColor); + I("pingText").textContent=format(uiData.pingStatus); + I("jitText").textContent=format(uiData.jitterStatus); +} +function oscillate(){ + return 1+0.02*Math.sin(Date.now()/100); +} +//update the UI every frame +window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||(function(callback,element){setTimeout(callback,1000/60);}); +function frame(){ + requestAnimationFrame(frame); + updateUI(); +} +frame(); //start frame loop +//function to (re)initialize UI +function initUI(){ + drawMeter(I("dlMeter"),0,meterBk,dlColor,0); + drawMeter(I("ulMeter"),0,meterBk,ulColor,0); + I("dlText").textContent=""; + I("ulText").textContent=""; + I("pingText").textContent=""; + I("jitText").textContent=""; + I("ip").textContent=""; +} + + +LibreSpeed Example - -
-

-
-
-
-
-
-
Download
- -
-
Mbit/s
-
-
-
Upload
- -
-
Mbit/s
-
-
-
Ping
- -
-
ms
-
- -
-
Jitter
- -
-
ms
-
-
-
- -
-
Privacy
- -
+ +

LibreSpeed Example

+
+

Selecting a server...

+
+ - - diff --git a/web/assets/linode.html b/web/assets/linode.html deleted file mode 100644 index eed122d..0000000 --- a/web/assets/linode.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - zzz.cat Speedtest - - - - - - - -
-

-
-
-
-
Download
- -
-
Mbit/s
-
-
-
Upload
- -
-
Mbit/s
-
-
-
Ping
- -
-
ms
-
- -
-
Jitter
- -
-
ms
-
-
-
- IP Address: -
- -
-
- -
Privacy
-
- - - -