Configuration Example

Cacti – Superlinks not working

René Jorissen on August 18, 2010 0 Comments • Tags: #cacti #superlinks

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 Architect at QMonkeys
René Jorissen works as Solution Architect for QMonkeys in the Netherlands. Network Infrastructures are the primary focus. René works with equipment of multiple vendors, like HPE Networks, FortiNet, SentinelOne, Phished, Holm Security, Microsoft services and many more. René is Aruba Certified Edge Expert (ACEX #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.

Leave a comment

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.