Web UI - Search Bar Always Expanded
Posted: Mon Dec 16, 2019 11:19 am
How would i be able to make it so that the search bar is always expanded, which would then not require me to click on the magnifying glass icon every time?
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
<div class="header-right search">
<div class="search-field hide">
<form method="post" target="maincontentframe" action="<?php echo get_base_url(); ?>includes/components/xicore/status.php?show=services">
<input type="hidden" name="navbarsearch" value="1"/>
<input type="text" class="search-query form-control" name="search" id="navbarSearchBox" value="" placeholder="<?php echo _('Search...'); ?>"/>
</form>
</div>
<a href="#" id="open-search" title="<?php echo _('Search'); ?>"><i class="fa fa-search"></i></a>
</div>
Code: Select all
// Hostgroups
$args = array(
"hostgroup_name" => "lk:" . $query . ";alias=lk:" . $query,
"brevity" => 1,
"is_active" => 1,
'orderby' => 'hostgroup_name:a',
'records' => 10,
);
$res1 = get_hostgroup_objects_xml_output($args);
$xres1 = simplexml_load_string($res1);
if ($xres1) {
foreach ($xres1->hostgroup as $obj) {
$names[] = (object) array('url' => get_base_url().'/includes/components/xicore/status.php?show=hostgroups&hostgroup='.urlencode(strval($obj->hostgroup_name)),
'value' => strval($obj->hostgroup_name),
'category' => _('Hostgroup'),
'label' => (stripos(strval($obj->hostgroup_name),$query) !== false) ? strval($obj->hostgroup_name) : _('[A] '). strval($obj->alias));
}
}