mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Plugin Update Extract interfaces for use in plugin packages # Conflicts: # composer.lock * Fix some issues settings_view -> content_view
26 lines
568 B
PHP
26 lines
568 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Plugin;
|
|
use LibreNMS\Interfaces\Plugins\PluginManagerInterface;
|
|
|
|
class PluginAdminController extends Controller
|
|
{
|
|
public function __invoke(PluginManagerInterface $manager): \Illuminate\Contracts\View\View
|
|
{
|
|
// legacy v1 plugins
|
|
\LibreNMS\Plugins::scanNew();
|
|
\LibreNMS\Plugins::scanRemoved();
|
|
|
|
// v2 cleanup
|
|
$manager->cleanupPlugins();
|
|
|
|
$plugins = Plugin::get();
|
|
|
|
return view('plugins.admin', [
|
|
'plugins' => $plugins,
|
|
]);
|
|
}
|
|
}
|