mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated global search both design wise and added bgp support
This commit is contained in:
@@ -450,6 +450,11 @@ function generate_port_url($port, $vars=array())
|
||||
return generate_url(array('page' => 'device', 'device' => $port['device_id'], 'tab' => 'port', 'port' => $port['port_id']), $vars);
|
||||
}
|
||||
|
||||
function generate_peer_url($peer, $vars=array())
|
||||
{
|
||||
return generate_url(array('page' => 'device', 'device' => $peer['device_id'], 'tab' => 'routing', 'proto' => 'bgp'), $vars);
|
||||
}
|
||||
|
||||
function generate_port_image($args)
|
||||
{
|
||||
if (!$args['bg']) { $args['bg'] = "FFFFFF"; }
|
||||
|
@@ -472,14 +472,9 @@ if(is_file("includes/print-menubar-custom.inc.php"))
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li style="padding-top:10px">
|
||||
<form role="form" class="pull-left form-horizontal">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-10">
|
||||
<form role="search class="navbar-form navbar-left">
|
||||
<div class="form-group">
|
||||
<input class="input-large search-query" type="search" id="gsearch" name="gsearch" placeholder="Global Search" style="width: 250px">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
@@ -547,18 +542,26 @@ if ($_SESSION['authenticated'])
|
||||
{
|
||||
name: 'devices',
|
||||
remote : 'ajax_search.php?search=%QUERY&type=device',
|
||||
header: '<h5><strong>Devices</strong></h5>',
|
||||
template: '<p"><img src="{{device_image}}" border="0" class="img_left"> <small><a href="{{url}}"><strong>{{name}}</strong> | {{device_os}} | {{version}} | {{device_hardware}} with {{device_ports}} port(s) | {{location}}</a></small></p>',
|
||||
header : '<h5><strong> Devices</strong></h5>',
|
||||
template: '<p><img src="{{device_image}}" border="0" class="img_left"> <small><a href="{{url}}"><strong>{{name}}</strong> | {{device_os}} | {{version}} | {{device_hardware}} with {{device_ports}} port(s) | {{location}}</a></small></p>',
|
||||
valueKey:"name",
|
||||
engine: Hogan
|
||||
},
|
||||
{
|
||||
name: 'ports',
|
||||
remote : 'ajax_search.php?search=%QUERY&type=ports',
|
||||
header: '<h5><strong>Ports</strong></h5>',
|
||||
header : '<h5><strong> Ports</strong></h5>',
|
||||
template: '<p><small><a href="{{url}}"><img src="images/icons/port.png" /> <strong>{{name}}</strong> – {{hostname}}</a></small></p>',
|
||||
valueKey: "name",
|
||||
engine: Hogan
|
||||
},
|
||||
{
|
||||
name: 'bgp',
|
||||
remote : 'ajax_search.php?search=%QUERY&type=bgp',
|
||||
header : '<h5><strong> BGP</strong></h5>',
|
||||
template: '<p><small><a href="{{url}}"><img src="{{bgp_image}}" border="0" class="img_left">{{name}} - {{hostname}}<br />AS{{localas}} -> AS{{remoteas}}</a></small></p>',
|
||||
valueKey: 'name',
|
||||
engine: Hogan
|
||||
}
|
||||
]);
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user