Plugin Update (#16291)

* Plugin Update
Extract interfaces for use in plugin packages

# Conflicts:
#	composer.lock

* Fix some issues
settings_view -> content_view
This commit is contained in:
Tony Murray
2024-08-15 15:26:47 -05:00
committed by GitHub
parent f6fe0cf2da
commit 70c2c543f3
19 changed files with 79 additions and 58 deletions

View File

@@ -1,6 +1,6 @@
<?php
use App\Plugins\Hooks\DeviceOverviewHook;
use LibreNMS\Interfaces\Plugins\Hooks\DeviceOverviewHook;
$overview = 1;
@@ -20,9 +20,9 @@ require 'includes/html/dev-groups-overview-data.inc.php';
require 'overview/puppet_agent.inc.php';
echo LibreNMS\Plugins::call('device_overview_container', [$device]);
PluginManager::call(DeviceOverviewHook::class, ['device' => DeviceCache::getPrimary()])->each(function ($view) {
foreach (PluginManager::call(DeviceOverviewHook::class, ['device' => DeviceCache::getPrimary()]) as $view) {
echo $view;
});
}
require 'overview/ports.inc.php';

View File

@@ -13,7 +13,7 @@
* @author PipoCanaja <pipocanaja@gmail.com>
*/
use App\Plugins\Hooks\PortTabHook;
use LibreNMS\Interfaces\Plugins\Hooks\PortTabHook;
$pagetitle[] = 'Plugins';
$no_refresh = true;
@@ -23,6 +23,6 @@ $no_refresh = true;
<hr>
<?php
echo \LibreNMS\Plugins::call('port_container', [$device, $port]);
PluginManager::call(PortTabHook::class, ['port' => $portModel])->each(function ($view) {
foreach (PluginManager::call(PortTabHook::class, ['port' => $portModel]) as $view) {
echo $view;
});
};