mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Ports UI update (#16115)
* WIP Device Ports porting to Laravel * WIP port links * Port Links WIP * Port Links * in_array -> isset * Add request to DeviceTab data * Add initial Pagination * Missing select component * Collapsed and expandable port neighbors New expandable component * Port sorting * Fix port transfer * Use menu entries to filter ports * Add translatable strings * style fixes and cleanup * update css * graph views and tidy controller basic port link view * cleanup * port row blade to reuse in legacy port view * Legacy tab url handling work properly in subdirectory remove includes from sub tab directory to prevent oddity * fallback to detail list when the view doesn't exist * Use named variable to simplify * Fix issue from file that was a symlink * Submenu handle sub items and query string urls * extract pageLinks to improve readability * fix typo * Apply fixes from StyleCI * phpstan was not happy using the relationship HasMany query * Don't allow *bps etc to be on a second line * Improve table on small screens * Fix sort --------- Co-authored-by: Tony Murray <[email protected]>
This commit is contained in:
co-authored by
Tony Murray
parent
a717e084f0
commit
075ba4c932
@@ -12,6 +12,7 @@ use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Interfaces\UI\DeviceTab;
|
||||
use LibreNMS\Util\Debug;
|
||||
use LibreNMS\Util\Graph;
|
||||
use LibreNMS\Util\Url;
|
||||
@@ -83,11 +84,14 @@ class DeviceController extends Controller
|
||||
$parent_id = Vminfo::guessFromDevice($device)->value('device_id');
|
||||
$overview_graphs = $this->buildDeviceGraphArrays($device);
|
||||
|
||||
/** @var DeviceTab[] $tabs */
|
||||
$tabs = array_map(function ($class) {
|
||||
return app()->make($class);
|
||||
}, array_filter($this->tabs, 'class_exists')); // TODO remove filter
|
||||
$title = $tabs[$current_tab]->name();
|
||||
$data = $tabs[$current_tab]->data($device);
|
||||
$tab_controller = $tabs[$current_tab];
|
||||
$title = $tab_controller->name();
|
||||
$data = $tab_controller->data($device, $request);
|
||||
$page_links = $data['page_links'] ?? [];
|
||||
|
||||
// Device Link Menu, select the primary link
|
||||
$device_links = $this->deviceLinkMenu($device, $current_tab);
|
||||
|
||||
Reference in New Issue
Block a user