2015-03-02 17:02:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* LibreNMS
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version. Please see LICENSE.txt at the top level of
|
|
|
|
* the source code distribution for details.
|
|
|
|
*/
|
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
$no_refresh = true;
|
2015-03-21 21:30:55 +00:00
|
|
|
|
2018-10-26 15:04:30 -05:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
echo '<ul class="nav nav-tabs">';
|
2015-03-02 17:02:28 +00:00
|
|
|
|
2018-10-26 15:04:30 -05:00
|
|
|
$poll_tabs = [
|
|
|
|
[
|
2015-07-13 20:10:26 +02:00
|
|
|
'name' => 'Pollers',
|
2017-01-25 19:42:26 +02:00
|
|
|
'icon' => 'fa-th-large',
|
2018-10-26 15:04:30 -05:00
|
|
|
],
|
|
|
|
];
|
2017-11-13 18:18:07 +00:00
|
|
|
|
2018-10-26 15:04:30 -05:00
|
|
|
if (\LibreNMS\Config::get('distributed_poller')) {
|
2017-11-13 18:18:07 +00:00
|
|
|
$poll_tabs[] = array(
|
2015-07-13 20:10:26 +02:00
|
|
|
'name' => 'Groups',
|
2017-01-25 19:42:26 +02:00
|
|
|
'icon' => 'fa-th',
|
2017-11-13 18:18:07 +00:00
|
|
|
);
|
|
|
|
}
|
2015-03-02 17:02:28 +00:00
|
|
|
|
2018-10-26 15:04:30 -05:00
|
|
|
$poll_tabs[] = [
|
|
|
|
'name' => 'Performance',
|
|
|
|
'icon' => 'fa-line-chart',
|
|
|
|
];
|
|
|
|
$poll_tabs[] = [
|
|
|
|
'name' => 'Log',
|
|
|
|
'icon' => 'fa-file-text',
|
|
|
|
];
|
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
$current_tab = basename($vars['tab'] ?? 'pollers');
|
2018-10-26 15:04:30 -05:00
|
|
|
|
2015-03-15 21:44:35 +00:00
|
|
|
foreach ($poll_tabs as $tab) {
|
2018-10-26 15:04:30 -05:00
|
|
|
$taburl = strtolower($tab['name']);
|
|
|
|
echo '<li role="presentation" ' . ($current_tab == $taburl ? ' class="active"' : '') . '><a href="';
|
|
|
|
echo generate_url(['page' => 'pollers', 'tab' => $taburl]);
|
|
|
|
echo '"><i class="fa ' . $tab['icon'] . ' fa-lg icon-theme" aria-hidden="true"></i> ' . $tab['name'];
|
|
|
|
echo '</a></li>';
|
2015-03-02 17:02:28 +00:00
|
|
|
}
|
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
echo '</ul>';
|
2015-03-02 17:02:28 +00:00
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
include_once "includes/html/pages/pollers/$current_tab.inc.php";
|