Add global NAC page and refactor the per-device one (#15228)

* Adding a NAC global port page

* style

* filter_menu_entry

* typo

* ->when()

* device_id always returned

* use request

* laravel conversion, let see how it goes

* styleci

* ->with('device') to avoid 1 query per item processed

* and rewrote on @murrant advice

* any -> get

Suggested by @murrant

Co-authored-by: Tony Murray <murraytony@gmail.com>

* @push('scripts')

* style

* @endpush

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
PipoCanaja
2023-09-01 03:25:24 +02:00
committed by GitHub
parent 298d217a8b
commit 8eeb83928f
6 changed files with 164 additions and 5 deletions

View File

@@ -66,6 +66,8 @@ Route::middleware(['auth'])->group(function () {
Route::get('/', 'OverviewController@index')->name('home');
Route::view('vminfo', 'vminfo');
Route::get('nac', 'NacController@index');
// Device Tabs
Route::prefix('device/{device}')->namespace('Device\Tabs')->name('device.')->group(function () {
Route::put('notes', 'NotesController@update')->name('notes.update');
@@ -194,7 +196,7 @@ Route::middleware(['auth'])->group(function () {
Route::post('location', 'LocationController');
Route::post('mempools', 'MempoolsController');
Route::post('outages', 'OutagesController');
Route::post('port-nac', 'PortNacController');
Route::post('port-nac', 'PortNacController')->name('table.port-nac');
Route::post('port-stp', 'PortStpController');
Route::post('ports', 'PortsController')->name('table.ports');
Route::post('routes', 'RoutesTablesController');