Action popup windows default size

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Action popup windows default size

Post by WillemDH »

Where can I set a custom size for the actions component popup windows. I need to make it larger somehow. tx
Nagios XI 5.8.1
https://outsideit.net
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Action popup windows default size

Post by mcapra »

That's hard-coded within /usr/local/nagiosxi/html/includes/components/actions/actions.inc.php. Specifically around line 895 for hosts and line 1040 for services:

Code: Select all

else {
            $link = '<div class="commandimage"><a onclick="javascript:void window.open(\''.$url.'\', \''.time().'\', \'width=700, height=400, toolbar=0, menubar=0, location=0, status=0, scrollbars=1, resizable=1, left=\'+($(window).width()/2-350)+\', top=\'+($(window).height()/2-200)); return false;" target="' . $target . '" ' . $hrefopts . '><img src="' . $img . '" alt="' . encode_form_val($text) . '" title="' . encode_form_val($text) . '"></div><div class="commandtext">' . encode_form_val($text) . '</a></div>';
        }
You would need to alter the width and height attributes.
Former Nagios employee
https://www.mcapra.com/
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Action popup windows default size

Post by WillemDH »

Changed it to width=1200, height=800 but no change. Restarted httpd and nagios service, cleared cache. Anything else that needs to be done before it updates?
Nagios XI 5.8.1
https://outsideit.net
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Action popup windows default size

Post by mcapra »

Strictly speaking there shouldn't be any caching issues since the Javascript window.open function is dynamically generated. I would think you could do a generic replace on width=700 and height=400 in that entire document (actions.inc.php) and that should catch everything. There's a few places in that particular page where the window width+height gets adjusted. The one I used might not be applicable to your specific Action configuration.
Former Nagios employee
https://www.mcapra.com/
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Action popup windows default size

Post by WillemDH »

This thread can be closed. Tx!
Nagios XI 5.8.1
https://outsideit.net
Locked