Truy cập đến thư mục Speedtest chứa file Speedtest.inc.php
cd /opt/librenms/html/plugins/Speedtest/
Vim Speedtest.inc.php
hotfix:
edit Speedtest.inc.php and modify for both speedtest and latency results as such:
<div class="col-md-3"> <img src="https://YOURHOST/plugins/Speedtest/png/speedtest-bandwidth-day.png" width="900" height="500"> <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>
Remember it’s just a hotfix, nothing more. Does the job for me.
Thêm vào dòng <img src....> ở 2 mục bandwidth và Latency như dòng in đậm, chỉnh sửa host của bạn cho phù hợp.
</div>
<div style='clear: both;'>
<div style='margin: 5px;'>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Bandwidth</h3>
</div>
<div class="panel-body">
<div class="col-md-3">
<img src="http://librenms.abc.com/plugins/Speedtest/png/speedtest-bandwidth-day.png" width="900" height="500">
<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/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/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/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>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Latency during Speedtest</h3>
</div>
<div class="panel-body">
<div class="col-md-3">
<img src="http://librenms.abc.com/plugins/Speedtest/png/speedtest-bandwidth-day.png" width="900" height="500">
<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/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/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/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>
</div>
</div>
<?php
?>
</body>
</html>
Nhận xét
Đăng nhận xét