What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How Can I Define "per user Javascripts" in the AJAX WebGUI

Votes:

0

I have found some nice scripts I would like to use:

But it does not feel right to decide that for each user.

So what do you think about a "add-ons" folder where I can put javascripts (with a description) in and a user can decide for itself to enable or disable such an add-on.

So I can disable the second column and my colleague is able to let it enabled.

ajax customization javascript prtg script webgui

Created on Jan 16, 2012 10:23:55 AM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6



1 Reply

Accepted Answer

Votes:

1

I don't think we would implement such a feature soon, but here is a trick that can work:

Each user can select the refresh interval of the web interface (default is 30 seconds). Now you could add a custom script that enables/disables your desired scripts when the interval is set to 29 or 31 seconds. This will make not much of a difference in the usage, but enables you to define custom scripts.

Please find the file

customerscripts.js

in the

/website/javascript

folder, open it in a text editor, paste the following code into it, and save the file:

$(document).ready(function() 
{

	if (autoRefreshInterval==31) // do not show graphs on groups/probes/devices
	{
		$('#tab-1[loadurl*="groupoverview"] td.col2').remove();
	};

	if (autoRefreshInterval==32) // do not show graphs on groups/probes/devices AND hide help
	{
		$('#tab-1[loadurl*="groupoverview"] td.col2').remove();
		$("#openclosehandle").hide();
		$("#helpcontainer").hide();
	};

	if (autoRefreshInterval==33) // hide help
	{
		$("#openclosehandle").hide();
		$("#helpcontainer").hide();
	};

});

Now let your users select their refresh interval to be 30, 31, 32 or 33 seconds.

Created on Jan 16, 2012 10:26:27 AM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6

Last change on Jan 16, 2012 10:29:09 AM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.