mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Moved plugins menu and enabled Test plugin by default
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@ config.php
|
||||
logs
|
||||
patches
|
||||
rrd
|
||||
html/plugins/*
|
||||
!html/plugins/Test/
|
||||
|
@@ -460,7 +460,25 @@ if ($packages)
|
||||
</li>
|
||||
<?php
|
||||
} # if ($packages)
|
||||
?>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"> Plugins<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
Plugins::call('menu');
|
||||
?>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<?php
|
||||
if ($_SESSION['userlevel'] >= '10')
|
||||
{
|
||||
echo(' <li><a href="plugin/view=admin">Plugin Admin</a></li>');
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
// Custom menubar entries.
|
||||
if(is_file("includes/print-menubar-custom.inc.php"))
|
||||
{
|
||||
@@ -483,21 +501,6 @@ if(is_file("includes/print-menubar-custom.inc.php"))
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"> Plugins<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
Plugins::call('menu');
|
||||
?>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<?php
|
||||
if ($_SESSION['userlevel'] >= '10')
|
||||
{
|
||||
echo(' <li><a href="plugin/view=admin">Plugin Admin</a></li>');
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><img src="images/16/wrench.png" border="0" align="absmiddle" /> System<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
2
html/plugins/.gitignore
vendored
2
html/plugins/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
5
html/plugins/Test/Test.inc.php
Normal file
5
html/plugins/Test/Test.inc.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
echo('Well done, the plugin system is up and running');
|
||||
|
||||
?>
|
9
html/plugins/Test/Test.php
Normal file
9
html/plugins/Test/Test.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public function menu() {
|
||||
echo('<li><a href="plugin/p='.get_class().'">'.get_class().'</a></li>');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user