Hello everyone,
Is it possible to make my plugin appear in the “Ports” tab just after Errors (Mini) like this …| Errors (Mini) | MyPlugin ?
I’ve looked at the 3 current possibilities:
- public static function menu()
- public function device_overview_container($device_id)
- public function port_container($device, $port)
Would you need a fourth one like this?
- public function device_ports ($device) or ($device_id)
Thanks in advance to the community
No, that functionality doesn’t exist. The closest there is is adding a portstab, which displays when you go into a port. You can find an example of all the existing plugin hooks here: librenms/app/Plugins/ExamplePlugin at master · librenms/librenms · GitHub
Thank you @electrocret
I don’t know how to make a new hook properly, I modified directly the file /librenms/includes/html/pages/device/ports.inc.php
line 96
*//START ADD CODE *
- echo ’ | ';*
- echo generate_link(‘BIER’, $link_array, [‘view’ => ‘bier’]);*
print_optionbar_end();
// If Bier is clicked
if ($vars[‘view’] == “bier”) {
- include ‘html/plugins/BIER/print-interface-bier.inc.php’;*
}
//END ADD CODE
The result of the plugin can be found here
https://community.librenms.org/t/view-ports-customize-basic-mini/21413/5?u=lynch4fr
