Page 1 of 1
Action popup windows default size
Posted: Mon Nov 28, 2016 6:07 am
by WillemDH
Where can I set a custom size for the actions component popup windows. I need to make it larger somehow. tx
Re: Action popup windows default size
Posted: Mon Nov 28, 2016 12:33 pm
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.
Re: Action popup windows default size
Posted: Tue Nov 29, 2016 11:14 am
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?
Re: Action popup windows default size
Posted: Tue Nov 29, 2016 12:01 pm
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.
Re: Action popup windows default size
Posted: Tue Jan 17, 2017 11:58 am
by WillemDH
This thread can be closed. Tx!