mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* use Blade view and Eloquent models for plugins * move views * fix style * fix style * revert mistake * Update Plugin.php delete test property "name" * rename plugin function to settings * last but not least - rename in Test.php * Rename Test to Example * fix typo * fix style * fix style * fix style * fix style - I hate tabs... * Extract view calls * fix method calls and style * Move Models the the abstract class * fix style * Convert to traits * Change the Example description * Fix style * Fix style * Fix style * Convert plugin function to Model static methods and delete .inc.php * fix style * fix style * Use scope * final methods blows up legacy code * Config > \LibreNMS\Config * convert the static string to a static method * Correct placement in the page * fix tabs * fix style * Rename from tait to hook to make it easier to understand and be complient * rename file * Typo * Started to change the docu * change to a more usefully Device_Overview example * and activate of course * PluginManager * fix .gitignore * only php files in the root folder * corrected .gitignore with all files :) * Rename the Hooks and ExampleClass for better readability * Fix style * Fix style * Exception handling (especially if DB is not present) * Fix style and update schema * fix indentation * actually correct indent * fix migration collation check include utf8mb4_bin * stop phpstan whining * A view lines documentation * add typeHints * Allow return null on handle * lint * fix return types * fix logic of column collation check * Fix MenuEntryHook * switch to longtext instead of json type for now :D * try phpstan on PHP 7.3 * set phpstan target version to 7.3 * all the typehints * optional * more * Use namespace to prevent view collisions disambiguate plugin and hook no magic guessing of names in PluginManager, bad assumptions remove unused plugins from the DB * cleanup plugin menu * cleanup on shutdown and ignore but log query error on cleanup * instanceof must be called against an instance * Allow multiple hooks per plugin * Port plugin ui code to Laravel * page instead of settings for v1 plugins * actually working settings pages a little url cleanup plugin/admin -> plugin/settings * fix style * Add page hook * PHPstan * Try to fix Illuminate\Http\RedirectResponse * typehint * Rewrite the doc * Fix style Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
43 lines
2.2 KiB
PHP
43 lines
2.2 KiB
PHP
@extends('layouts.librenmsv1')
|
|
|
|
@section('title', trans('plugins.admin_page'))
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="panel panel-default panel-condensed col-md-6 col-md-offset-3 col-xs-12 col-sm-8 col-sm-offset-2" style="padding: 0">
|
|
<div class="panel-heading">
|
|
<strong>@lang('plugins.admin_title')</strong>
|
|
</div>
|
|
|
|
<table class="table table-condensed">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
@foreach($plugins as $plugin)
|
|
<tr class="{{ $plugin->plugin_active ? 'bg-success' : 'bg-danger' }}">
|
|
<td>{{ $plugin->plugin_name }}</td>
|
|
<td>
|
|
<form class="form-inline" role="form" action="{{ route('plugin.update', ['plugin' => $plugin->plugin_name]) }}" method="post" id="{{ $plugin->plugin_id }}" name="{{ $plugin->plugin_id }}">
|
|
@csrf
|
|
@if($plugin->plugin_active)
|
|
<input type="hidden" name="plugin_active" value="0">
|
|
<button type="submit" class="btn btn-sm btn-danger" style="min-width: 66px">@lang('Disable')</button>
|
|
@else
|
|
<input type="hidden" name="plugin_active" value="1">
|
|
<button type="submit" class="btn btn-sm btn-success" style="min-width: 66px">@lang('Enable')</button>
|
|
@endif
|
|
@if($plugin->version == 1)
|
|
<a href="{{ route('plugin.legacy', $plugin->plugin_name) }}" class="btn btn-sm btn-primary" style="min-width: 72px">@lang('Page')</a>
|
|
@else
|
|
<a href="{{ route('plugin.settings', $plugin->plugin_name) }}" class="btn btn-sm btn-primary" style="min-width: 72px">@lang('Settings')</a>
|
|
@endif
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|