Modernized the plugin

Implemented fixes from Gitlab issues
from Marc Hagen & Trent Robinson (https://gitlab.com/jackgreyhat/librenms-speedtest/-/issues/2)
and fixes from m0nsieur Psych0 (https://gitlab.com/jackgreyhat/librenms-speedtest/-/issues/6)

I added support for darkmode, this is done by generating the graphs with white text, then using CSS to invert the image, for light mode users.

I also moved branding PNGs to vectors for higher resolutions

I will not be opening a PR at https://gitlab.com/jackgreyhat/librenms-speedtest as this seems to have been abbandoned.
This commit is contained in:
2023-09-15 15:59:51 -07:00
parent a0747a0fab
commit 8a516b8664
7 changed files with 295 additions and 28 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

1
images/ookla-logo.svg Normal file
View File

@ -0,0 +1 @@
<svg width="200" height="66" xmlns="http://www.w3.org/2000/svg"><path d="M137.297 1.082l-33.674 33.897 2.777 2.776 30.897-31.087zm-8.012.032L99.6 30.989l2.81 2.776 26.906-27.097zm.064 15.99l-21.736 21.864 2.808 2.777 18.96-19.087zM66.662 21.83c-12.48.032-21.29 9.415-21.257 21.544.032 12.13 8.905 21.45 21.385 21.417 12.48-.032 21.289-9.416 21.257-21.544-.032-12.13-8.905-21.45-21.385-21.417zm-45.068.127C9.114 21.988.304 31.372.336 43.5c.032 12.13 8.905 21.45 21.385 21.418 12.48-.032 21.29-9.416 21.258-21.545-.032-12.129-8.905-21.45-21.385-21.417zm161.09.511l-6.033.032-17.076 40.95 6.224-.032 13.63-33.768h.127l13.852 33.705 6.256-.032zm-50.878.16l.128 40.918 25.886-.096v-5.202l-20.364.064-.096-35.684zm-35.238.119l-5.617.018.13 40.887 5.618-.018zm-29.906 4.253c9.352-.032 15.448 7.31 15.48 16.247.032 8.937-6 16.31-15.384 16.341-9.352.032-15.448-7.309-15.48-16.246 0-8.97 6.032-16.31 15.384-16.342zm-45.068.128c9.352-.032 15.448 7.31 15.48 16.246.032 8.97-6.001 16.31-15.353 16.342-9.352.032-15.448-7.31-15.48-16.246-.032-8.97 6-16.31 15.353-16.342zm76.922 4.947l.032 5.554 26.077 25.917h5.554zm.032 7.916v5.65l18.066 17.937h5.649zm.032 8.075v5.586l10.054 9.958 5.554-.032z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1 @@
<svg width="208" height="25" xmlns="http://www.w3.org/2000/svg"><path d="M14.967.17C6.861.17.557 6.73.557 14.708c0 3.346 1.158 6.69 3.346 9.264l.9 1.028 1.672-1.67-.643-.903c-1.8-2.188-2.702-4.89-2.702-7.72A12.08 12.08 0 0115.225 2.614a12.08 12.08 0 0112.094 12.095c0 2.83-1.03 5.531-2.704 7.72l-.64.901L25.646 25l.9-1.028c1.801-2.702 2.958-5.918 2.958-9.264C29.505 6.73 23.073.17 14.967.17zM44.43 3.128c-4.117 0-7.076 2.446-7.076 5.92 0 3.859 2.444 5.145 6.818 6.174 3.86.772 4.634 1.673 4.634 3.088 0 1.545-1.417 2.574-3.604 2.574-2.573 0-4.63-1.03-6.56-2.702l-2.19 2.573c2.446 2.188 5.534 3.217 8.622 3.217 4.247 0 7.333-2.316 7.333-6.177 0-3.473-2.187-5.016-6.562-6.045-3.988-.901-4.888-1.674-4.888-3.218 0-1.416 1.286-2.444 3.345-2.444 1.8 0 3.73.644 5.532 2.06l2.06-2.446c-2.059-1.672-4.505-2.574-7.464-2.574zm11.064 0v20.457h3.603v-6.562h4.119c4.503 0 8.233-2.444 8.233-7.076 0-4.117-3.088-6.82-7.848-6.82zm19.044 0v20.586h15.438v-3.217H78.139v-5.532h10.294V11.75H78.139V6.345h11.71V3.128zm19.17 0v20.586h15.438v-3.217H97.309v-5.532h10.294V11.75H97.309V6.345h11.709V3.128zm19.042 0v20.586h7.718c6.434 0 10.937-4.503 10.937-10.292 0-5.79-4.503-10.294-10.937-10.294zm20.713 0v3.347h6.564v17.24h3.6V6.474h6.563V3.128zm20.459 0v20.586h15.437v-3.217h-11.835v-5.532h10.292V11.75h-10.292V6.345h11.708V3.128zm26.374 0c-4.118 0-7.077 2.446-7.077 5.92 0 3.859 2.445 5.145 6.82 6.174 3.86.772 4.632 1.673 4.632 3.088 0 1.545-1.415 2.574-3.602 2.574-2.574 0-4.632-1.03-6.562-2.702l-2.188 2.573c2.444 2.188 5.405 3.217 8.75 3.474 4.245 0 7.332-2.315 7.332-6.175 0-3.474-2.186-5.02-6.56-6.049-3.988-.9-4.89-1.671-4.89-3.215 0-1.415 1.287-2.445 3.345-2.445 1.801 0 3.732.643 5.533 2.06l1.93-2.703c-2.059-1.672-4.504-2.574-7.463-2.574zm10.293 0v3.347h6.562v17.24h3.602V6.474h6.563V3.128zM59.097 6.345h4.247c2.83 0 4.502 1.287 4.502 3.732 0 2.187-1.8 3.73-4.502 3.73h-4.247zm57.383.257h4.118c4.375 0 7.205 2.96 7.205 6.948 0 3.988-2.83 6.947-7.205 6.947h-4.118zM20.242 8.275l-8.105 6.433 2.83 2.83L21.4 9.433z" fill="#fff" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB