proper code being added again

This commit is contained in:
Jack Greyhat 2021-01-26 15:56:07 +01:00
parent a6a2ddb8d0
commit 89a40eb6e0
3 changed files with 31 additions and 12 deletions

View File

@ -1,6 +1,20 @@
<html>
<body>
<div class="panel panel-default">
<div class="panel-body ">
<img src="plugins/Speedtest/speedtest-logo.png" title="Speedtest Logo" class="device-icon-header pull-left" style="height:100%;max-height: 100px;margin-top:5px">
<div class="pull-left" style="margin-top: 5px;">
<span style="font-size: 20px;">antnetscaler02.icl-ltd.com</span><br />
<span>POP (default)</span>
</div>
<div class="pull-right">
<img src="plugins/Speedtest/ookla-logo.png" title="Ookla Logo" style="height:100%;max-height: 100px;margin-top:5px">
</div>
</div>
</div>
<div style='clear: both;'>
<div style='margin: 5px;'>
<div class="panel panel-default">
@ -9,16 +23,16 @@
</div>
<div class="panel-body">
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-bandwidth-day.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-bandwidth-day.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-bandwidth-day.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-bandwidth-day.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-bandwidth-week.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-bandwidth-week.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-bandwidth-week.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-bandwidth-week.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-bandwidth-month.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-bandwidth-month.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-bandwidth-month.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-bandwidth-month.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-bandwidth-year.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-bandwidth-year.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-bandwidth-year.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-bandwidth-year.png" style="border: 0" /></a>
</div>
</div>
</div>
@ -28,16 +42,16 @@
</div>
<div class="panel-body">
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-latency-day.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-latency-day.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-latency-day.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-latency-day.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-latency-week.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-latency-week.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-latency-week.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-latency-week.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-latency-month.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-latency-month.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-latency-month.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-latency-month.png" style="border: 0" /></a>
</div>
<div class="col-md-3">
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/image/speedtest-latency-year.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/image/speedtest-latency-year.png" style="border: 0" /></a>
<a onmouseover="return overlib('<div class=\'overlib-contents\'><img src=\'plugins/Speedtest/png/speedtest-latency-year.png\' style=\'border:0;\' /></div>',FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e',WRAP,HAUTO,VAUTO); " onmouseout="return nd();"><img class="lazy img-responsive" data-original="plugins/Speedtest/png/speedtest-latency-year.png" style="border: 0" /></a>
</div>
</div>
</div>

View File

@ -0,0 +1,8 @@
<?php
class Speedtest {
public static function menu() {
echo('<li><a href="plugin/p='.get_class().'">'.get_class().'</a></li>');
}
}
?>

View File

@ -3,7 +3,7 @@
# LibreNMS Speedtest plugin #
#############################
# Main plugin dir
SpeedtestPluginDir=/opt/librenms/html/plugins
SpeedtestPluginDir=/opt/librenms/html/plugins/Speedtest
# Other data dirs
RRDGraphsDir=$SpeedtestPluginDir/rrd
PNGImagesDir=$SpeedtestPluginDir/png
@ -305,9 +305,6 @@ SpeedtestResultDir=$SpeedtestPluginDir/tmp
-c FONT#000000 \
--font LEGEND:8:DejaVuSansMono \
--font AXIS:7:DejaVuSansMono > /dev/null 2>&1
# Move PNGs to the LibreNMS plugin location
cp $PNGImagesDir/*.png /opt/librenms/html/plugins/Speedtest/png
;;
(*)