mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
use existings webui option (global_search_result_limit) to set typeahead limit instead of introducing new config option
This commit is contained in:
@@ -3,8 +3,9 @@ require $config['install_dir'].'/includes/object-cache.inc.php';
|
||||
|
||||
// FIXME - this could do with some performance improvements, i think. possible rearranging some tables and setting flags at poller time (nothing changes outside of then anyways)
|
||||
|
||||
$service_status = get_service_status();
|
||||
$if_alerts = dbFetchCell("SELECT COUNT(port_id) FROM `ports` WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND `ignore` = '0'");
|
||||
$service_status = get_service_status();
|
||||
$typeahead_limit = $config['webui']['global_search_result_limit'];
|
||||
$if_alerts = dbFetchCell("SELECT COUNT(port_id) FROM `ports` WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND `ignore` = '0'");
|
||||
|
||||
if ($_SESSION['userlevel'] >= 5) {
|
||||
$links['count'] = dbFetchCell("SELECT COUNT(*) FROM `links`");
|
||||
@@ -717,7 +718,7 @@ $('#gsearch').typeahead({
|
||||
},
|
||||
{
|
||||
source: devices.ttAdapter(),
|
||||
limit: '<?php echo($config['typeahead_limit']); ?>',
|
||||
limit: '<?php echo($typeahead_limit); ?>',
|
||||
async: true,
|
||||
display: 'name',
|
||||
valueKey: 'name',
|
||||
@@ -728,7 +729,7 @@ $('#gsearch').typeahead({
|
||||
},
|
||||
{
|
||||
source: ports.ttAdapter(),
|
||||
limit: '<?php echo($config['typeahead_limit']); ?>',
|
||||
limit: '<?php echo($typeahead_limit); ?>',
|
||||
async: true,
|
||||
display: 'name',
|
||||
valueKey: 'name',
|
||||
@@ -739,7 +740,7 @@ $('#gsearch').typeahead({
|
||||
},
|
||||
{
|
||||
source: bgp.ttAdapter(),
|
||||
limit: '<?php echo($config['typeahead_limit']); ?>',
|
||||
limit: '<?php echo($typeahead_limit); ?>',
|
||||
async: true,
|
||||
display: 'name',
|
||||
valueKey: 'name',
|
||||
@@ -752,3 +753,4 @@ $('#gsearch').bind('typeahead:open', function(ev, suggestion) {
|
||||
$('#gsearch').addClass('search-box');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user