mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added new plugin menu_option in the "port" page, which contain hook calling public function port_container($device, $port) in plugins * Cleaning after pre-commit error * New method in Plugins.php to allow counting all plugins implementing a specific hook. This allow conditionnal display of the plugin menu_option in the port view. * Typo after rebase * Update plugins.inc.php * Updating the documentation with device_overview_container and port_container hooks.
25 lines
920 B
PHP
25 lines
920 B
PHP
<?php
|
|
|
|
namespace LibreNMS\Plugins;
|
|
|
|
class Test
|
|
{
|
|
public static function menu()
|
|
{
|
|
echo '<li><a href="plugin/p=Test">Test</a></li>';
|
|
}//end menu()
|
|
|
|
|
|
public function device_overview_container($device) {
|
|
echo('<div class="container-fluid"><div class="row"> <div class="col-md-12"> <div class="panel panel-default panel-condensed"> <div class="panel-heading"><strong>'.get_class().' Plugin </strong> </div>');
|
|
echo(' Example plugin in "Device - Overview" tab <br>');
|
|
echo('</div></div></div></div>');
|
|
}
|
|
|
|
public function port_container($device, $port) {
|
|
echo('<div class="container-fluid"><div class="row"> <div class="col-md-12"> <div class="panel panel-default panel-condensed"> <div class="panel-heading"><strong>'.get_class().' plugin in "Port" tab</strong> </div>');
|
|
echo ('Example display in Port tab</br>');
|
|
echo('</div></div></div></div>');
|
|
}
|
|
}
|