mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Move assets to 5.7 location * Add 5.7 SVGs * add cache data dir * update QUEUE_DRIVER -> QUEUE_CONNECTION * Update trusted proxy config * update composer.json * 5.5 command loading * @php and @endphp can't be inline * Laravel 5.6 logging, Nice! * Update blade directives * improved redirects * remove unneeded service providers * Improved debugbar loading * no need to emulate renderable exceptions anymore * merge updated 5.7 files (WIP) * Enable CSRF * database_path() call causes issue in init.php * fix old testcase name * generic phpunit 7 fixes * add missed file_get_contents Keep migrations table content * fix duplicate key * Drop old php versions from travis-ci * remove hhvm * fix code climate message * remove use of deprecated function assertInternalType * Disable CSRF, we'll enable it separately. All forms need to be updated to work. * Update document references
113 lines
4.8 KiB
PHP
113 lines
4.8 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
// Auth
|
|
Auth::routes();
|
|
|
|
// WebUI
|
|
Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
|
|
// Test
|
|
Route::get('/laravel', function () {
|
|
return view('laravel');
|
|
});
|
|
|
|
// pages
|
|
Route::get('locations', 'LocationController@index');
|
|
|
|
// old route redirects
|
|
Route::permanentRedirect('poll-log', 'pollers/tab=log/');
|
|
|
|
// Two Factor Auth
|
|
Route::get('2fa', 'TwoFactorController@showTwoFactorForm')->name('2fa.form');
|
|
Route::post('2fa', 'TwoFactorController@verifyTwoFactor')->name('2fa.verify');
|
|
Route::post('2fa/add', 'TwoFactorController@create');
|
|
Route::post('2fa/cancel', 'TwoFactorController@cancelAdd')->name('2fa.cancel');
|
|
Route::post('2fa/remove', 'TwoFactorController@destroy');
|
|
|
|
// Ajax routes
|
|
Route::group(['prefix' => 'ajax'], function () {
|
|
// page ajax controllers
|
|
Route::resource('location', 'LocationController', ['only' => ['update', 'destroy']]);
|
|
|
|
// misc ajax controllers
|
|
Route::group(['namespace' => 'Ajax'], function () {
|
|
Route::post('set_resolution', 'ResolutionController@set');
|
|
Route::get('netcmd', 'NetCommand@run');
|
|
Route::post('ripe/raw', 'RipeNccApiController@raw');
|
|
});
|
|
|
|
// form ajax handlers, perhaps should just be page controllers
|
|
Route::group(['prefix' => 'form', 'namespace' => 'Form'], function () {
|
|
Route::resource('widget-settings', 'WidgetSettingsController');
|
|
});
|
|
|
|
// js select2 data controllers
|
|
Route::group(['prefix' => 'select', 'namespace' => 'Select'], function () {
|
|
Route::get('application', 'ApplicationController');
|
|
Route::get('bill', 'BillController');
|
|
Route::get('device', 'DeviceController');
|
|
Route::get('device-field', 'DeviceFieldController');
|
|
Route::get('device-group', 'DeviceGroupController');
|
|
Route::get('eventlog', 'EventlogController');
|
|
Route::get('graph', 'GraphController');
|
|
Route::get('graph-aggregate', 'GraphAggregateController');
|
|
Route::get('graylog-streams', 'GraylogStreamsController');
|
|
Route::get('syslog', 'SyslogController');
|
|
Route::get('location', 'LocationController');
|
|
Route::get('munin', 'MuninPluginController');
|
|
Route::get('port', 'PortController');
|
|
Route::get('port-field', 'PortFieldController');
|
|
});
|
|
|
|
// jquery bootgrid data controllers
|
|
Route::group(['prefix' => 'table', 'namespace' => 'Table'], function () {
|
|
Route::post('customers', 'CustomersController');
|
|
Route::post('device', 'DeviceController');
|
|
Route::post('eventlog', 'EventlogController');
|
|
Route::post('fdb-tables', 'FdbTablesController');
|
|
Route::post('graylog', 'GraylogController');
|
|
Route::post('location', 'LocationController');
|
|
Route::post('port-nac', 'PortNacController');
|
|
Route::post('syslog', 'SyslogController');
|
|
});
|
|
|
|
// dashboard widgets
|
|
Route::group(['prefix' => 'dash', 'namespace' => 'Widgets'], function () {
|
|
Route::post('alerts', 'AlertsController');
|
|
Route::post('availability-map', 'AvailabilityMapController');
|
|
Route::post('component-status', 'ComponentStatusController');
|
|
Route::post('device-summary-horiz', 'DeviceSummaryHorizController');
|
|
Route::post('device-summary-vert', 'DeviceSummaryVertController');
|
|
Route::post('eventlog', 'EventlogController');
|
|
Route::post('generic-graph', 'GraphController');
|
|
Route::post('generic-image', 'ImageController');
|
|
Route::post('globe', 'GlobeController');
|
|
Route::post('graylog', 'GraylogController');
|
|
Route::post('placeholder', 'PlaceholderController');
|
|
Route::post('notes', 'NotesController');
|
|
Route::post('server-stats', 'ServerStatsController');
|
|
Route::post('syslog', 'SyslogController');
|
|
Route::post('top-devices', 'TopDevicesController');
|
|
Route::post('top-interfaces', 'TopInterfacesController');
|
|
Route::post('worldmap', 'WorldMapController');
|
|
});
|
|
});
|
|
|
|
// demo helper
|
|
Route::permanentRedirect('demo', '/');
|
|
|
|
// Legacy routes
|
|
Route::any('/{path?}', 'LegacyController@index')
|
|
->where('path', '^((?!_debugbar).)*');
|
|
});
|