mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Relocate Alerts menu
Plugins menu is moved to the Overview menu (this is basically just weathermap anyway)
This commit is contained in:
@ -58,6 +58,7 @@ class Plugins
|
||||
include $file;
|
||||
$pluginFullName = 'LibreNMS\\Plugins\\' . $pluginName;
|
||||
if (class_exists($pluginFullName)) {
|
||||
$pluginName = $pluginFullName;
|
||||
$plugin = new $pluginFullName;
|
||||
} elseif (class_exists($pluginName)) {
|
||||
$plugin = new $pluginName;
|
||||
|
@ -48,46 +48,40 @@ if ($config['title_image']) {
|
||||
<li class="dropdown">
|
||||
<a href="<?php echo(generate_url(array('page'=>'overview'))); ?>" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-lightbulb-o fa-fw fa-lg fa-nav-icons hidden-md"></i> <span class="hidden-sm">Overview</span></a>
|
||||
<ul class="dropdown-menu multi-level" role="menu">
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'overview'))); ?>"><i class="fa fa-lightbulb-o fa-fw fa-lg"></i> Overview</a></li>
|
||||
<li class="dropdown-submenu">
|
||||
<a><i class="fa fa-exclamation-circle fa-fw fa-lg"> </i> Alerts</a>
|
||||
<ul class="dropdown-menu scrollable-menu">
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alerts'))); ?>"><i class="fa fa-bell fa-fw fa-lg"></i> Notifications</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-log'))); ?>"><i class="fa fa-th-list fa-fw fa-lg"></i> Historical Log</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-stats'))); ?>"><i class="fa fa-bar-chart fa-fw fa-lg"></i> Statistics</a></li>
|
||||
<?php
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
?>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-rules'))); ?>"><i class="fa fa-tasks fa-fw fa-lg"></i> Rules</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-schedule'))); ?>"><i class="fa fa-calendar fa-fw fa-lg"></i> Maintenance Windows</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-map'))); ?>"><i class="fa fa-link fa-fw fa-lg"></i> Rule Mapping</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'templates'))); ?>"><i class="fa fa-sitemap fa-fw fa-lg"></i> Templates</a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="<?php echo(generate_url(array('page'=>'overview'))); ?>"><i class="fa fa-sitemap fa-fw fa-lg"></i> Maps</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'availability-map'))); ?>"><i class="fa fa-arrow-circle-up fa-fw fa-lg"></i> Availability</a></li>
|
||||
<li>
|
||||
<a href="<?php echo(generate_url(array('page'=>'map'))); ?>"><i class="fa fa-desktop fa-fw fa-lg"></i> Network</a>
|
||||
</li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'overview'))); ?>"><i class="fa fa-lightbulb-o fa-fw fa-lg"></i> Overview</a></li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="<?php echo(generate_url(array('page'=>'overview'))); ?>"><i class="fa fa-sitemap fa-fw fa-lg"></i> Maps</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'availability-map'))); ?>"><i class="fa fa-arrow-circle-up fa-fw fa-lg"></i> Availability</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'map'))); ?>"><i class="fa fa-desktop fa-fw fa-lg"></i> Network</a></li>
|
||||
<?php
|
||||
|
||||
require_once '../includes/device-groups.inc.php';
|
||||
$devices_groups = GetDeviceGroups();
|
||||
if (count($devices_groups) > 0) {
|
||||
echo '<li class="dropdown-submenu"><a href="#"><i class="fa fa-th fa-fw fa-lg"></i> Device Groups Maps</a><ul class="dropdown-menu scrollable-menu">';
|
||||
foreach ($devices_groups as $group) {
|
||||
echo '<li><a href="'.generate_url(array('page'=>'map','group'=>$group['id'])).'" alt="'.$group['desc'].'"><i class="fa fa-th fa-fw fa-lg"></i> '.ucfirst($group['name']).'</a></li>';
|
||||
echo '<li><a href="'.generate_url(array('page'=>'map','group'=>$group['id'])).'" title="'.$group['desc'].'"><i class="fa fa-th fa-fw fa-lg"></i> '.ucfirst($group['name']).'</a></li>';
|
||||
}
|
||||
unset($group);
|
||||
echo '</ul></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a><i class="fa fa-plug fa-fw fa-lg"></i> <span class="hidden-sm">Plugins</span></a>
|
||||
<ul class="dropdown-menu scrollable-menu">
|
||||
<?php
|
||||
\LibreNMS\Plugins::call('menu');
|
||||
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
if (dbFetchCell("SELECT COUNT(*) from `plugins` WHERE plugin_active = '1'") > 0) {
|
||||
echo('<li role="presentation" class="divider"></li>');
|
||||
}
|
||||
echo('<li><a href="plugin/view=admin"> <i class="fa fa-lock fa-fw fa-lg"></i>Plugin Admin</a></li>');
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="<?php echo(generate_url(array('page'=>'overview'))); ?>"><i class="fa fa-wrench fa-fw fa-lg"></i> Tools</a>
|
||||
@ -161,7 +155,7 @@ foreach (dbFetchRows($sql, $param) as $devtype) {
|
||||
if (count($devices_groups) > 0) {
|
||||
echo '<li class="dropdown-submenu"><a href="#"><i class="fa fa-th fa-fw fa-lg"></i> Device Groups</a><ul class="dropdown-menu scrollable-menu">';
|
||||
foreach ($devices_groups as $group) {
|
||||
echo '<li><a href="'.generate_url(array('page'=>'devices','group'=>$group['id'])).'" alt="'.$group['desc'].'"><i class="fa fa-th fa-fw fa-lg"></i> '.ucfirst($group['name']).'</a></li>';
|
||||
echo '<li><a href="'.generate_url(array('page'=>'devices','group'=>$group['id'])).'" title="'.$group['desc'].'"><i class="fa fa-th fa-fw fa-lg"></i> '.ucfirst($group['name']).'</a></li>';
|
||||
}
|
||||
unset($group);
|
||||
echo '</ul></li>';
|
||||
@ -499,21 +493,24 @@ if ($bgp_alerts) {
|
||||
}
|
||||
?>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-plug fa-fw fa-lg fa-nav-icons hidden-md"></i> <span class="hidden-sm">Plugins</span></a>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-exclamation-circle fa-fw fa-lg fa-nav-icons hidden-md"> </i> Alerts</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
\LibreNMS\Plugins::call('menu');
|
||||
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
if (dbFetchCell("SELECT COUNT(*) from `plugins` WHERE plugin_active = '1'") > 0) {
|
||||
echo('<li role="presentation" class="divider"></li>');
|
||||
}
|
||||
echo('<li><a href="plugin/view=admin"> <i class="fa fa-lock fa-fw fa-lg"></i>Plugin Admin</a></li>');
|
||||
}
|
||||
?>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alerts'))); ?>"><i class="fa fa-bell fa-fw fa-lg"></i> Notifications</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-log'))); ?>"><i class="fa fa-th-list fa-fw fa-lg"></i> Historical Log</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-stats'))); ?>"><i class="fa fa-bar-chart fa-fw fa-lg"></i> Statistics</a></li>
|
||||
<?php
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
?>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-rules'))); ?>"><i class="fa fa-tasks fa-fw fa-lg"></i> Rules</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-schedule'))); ?>"><i class="fa fa-calendar fa-fw fa-lg"></i> Maintenance Windows</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'alert-map'))); ?>"><i class="fa fa-link fa-fw fa-lg"></i> Rule Mapping</a></li>
|
||||
<li><a href="<?php echo(generate_url(array('page'=>'templates'))); ?>"><i class="fa fa-sitemap fa-fw fa-lg"></i> Templates</a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
// Custom menubar entries.
|
||||
|
@ -7,7 +7,7 @@ class Test
|
||||
|
||||
public function menu()
|
||||
{
|
||||
echo '<li><a href="plugin/p='.get_class().'">'.get_class().'</a></li>';
|
||||
echo '<li><a href="plugin/p=Test">Test</a></li>';
|
||||
}//end menu()
|
||||
|
||||
|
||||
|
@ -30,5 +30,11 @@
|
||||
set $config['alert_log_purge'] to a custom value (set in days).</description>
|
||||
<pubDate>Mon, 02 May 2016 20:00:00 +0000</pubDate>
|
||||
</item>
|
||||
<item>
|
||||
<title>The Alerts Menu has moved</title>
|
||||
<description>The Alerts menu has been relocated to a top level menu on the far right. To make room for this, Plugins have been moved
|
||||
to the overview menu.</description>
|
||||
<pubDate>Mon, 12 Sep 2016 20:00:00 +0000</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
Reference in New Issue
Block a user