Connecting the world…

Cacti – Superlinks not working

After upgrading Cacti, like shown in the previous post, the Superlinks plugin stopped working correctly. When opening a Superlink tab I got a blank page in Google Chrome or a half page in Internet Explorer and Opera, like shown below.

superlinks-cacti

After some Googling I found the solution for this problem on a Cacti forum. The solution describes change some scripting within the file superlinks.php. The changes are displayed below.

Replace

print ‘<iframe src=”‘ . $page[‘contentfile’] . ‘” width=”100%” height=”100%” frameborder=”0″></iframe>’;

by

print ‘<iframe id=”frame” src=”‘ . $page[‘contentfile’] .'” width=”100%” height=”100%” frameborder=”0″></iframe>’;
print “<script type=’text/javascript’>
function resizeIframe() {
var height=window.innerWidth;//Firefox
if (document.documentElement.clientHeight) {
height=document.documentElement.clientHeight;//IE
};
document.getElementById(‘frame’).style.height=parseInt(height-document.getElementById(‘frame’).offsetTop-72)+’px’;
};
document.getElementById(‘frame’).onload = resizeIframe;
window.onresize = resizeIframe;
</script>”;

Superlinks is working fine again after applying the change.

The following two tabs change content below.

René Jorissen

Co-owner and Solution Specialist at 4IP Solutions
René Jorissen works as Solution Specialist for 4IP in the Netherlands. Network Infrastructures are the primary focus. René works with equipment of multiple vendors, like Cisco, Aruba Networks, FortiNet, HP Networking, Juniper Networks, RSA SecurID, AeroHive, Microsoft and many more. René is Aruba Mobility First Expert (AMFX #26), Aruba Certified Mobility Expert (ACMX #438), Aruba Certified ClearPass Expert (ACCX #725), Aruba Certified Design Expert (ACDX #760), CCNP R&S, FCNSP and Certified Ethical Hacker (CEF) certified. You can follow René on Twitter and LinkedIn.

Latest posts by René Jorissen (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.