diff options
| author | Dan Fandrich <danf@mageia.org> | 2025-11-15 17:19:09 -0800 |
|---|---|---|
| committer | Dan Fandrich <danf@mageia.org> | 2025-11-15 18:30:35 -0800 |
| commit | af3a1403571bde5f05a1ffc69080789bf2cc2e2e (patch) | |
| tree | 968305ffeaf5703d686c2cf494db2339c394b6e9 | |
| parent | 0779f9eafae9153507194cb757896917590f5c0e (diff) | |
| download | mgamirrors-af3a1403571bde5f05a1ffc69080789bf2cc2e2e.tar mgamirrors-af3a1403571bde5f05a1ffc69080789bf2cc2e2e.tar.gz mgamirrors-af3a1403571bde5f05a1ffc69080789bf2cc2e2e.tar.bz2 mgamirrors-af3a1403571bde5f05a1ffc69080789bf2cc2e2e.tar.xz mgamirrors-af3a1403571bde5f05a1ffc69080789bf2cc2e2e.zip | |
Expect bytes-per-second in getStrokeWeight()
The value actually provided is numeric, not the human-readable form.
| -rw-r--r-- | root/html/pages/report/index.tt | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/root/html/pages/report/index.tt b/root/html/pages/report/index.tt index ddb1871..5a8875a 100644 --- a/root/html/pages/report/index.tt +++ b/root/html/pages/report/index.tt @@ -34,12 +34,24 @@ div.infow p { margin: 0; } * * @param string bw * @return integer + * + * mirrors=> select * from bandwidth order by value; + * name | value + * ----------+-------------- + * 10Mbits | 10485760 + * 100Mbits | 104857600 + * 1Gbits | 1073741824 + * 2Gbits | 2147483648 + * 10Gbits | 10737418240 + * 20Gbits | 21474836480 + * 100Gbits | 107374182400 + * 200Gbits | 214748364800 */ function getStrokeWeight(bw) { - var bws = { "1Mbits": 1, "10Mbits": 1, "100Mbits": 1, - "1Gbits": 2, "2Gbits": 2, - "10Gbits": 3, "20Gbits": 3, - "100Gbits": 4, "200Gbits": 4 + var bws = { "1048576": 1, "10485760": 1, "104857600": 1, + "1073741824": 2, "2147483648": 2, + "10737418240": 3, "21474836480": 3, + "107374182400": 4, "214748364800": 4 }; return (bw in bws) ? bws[bw] : 1; } |
