Rewrite netcmd and ripe whois tools (#9724)

* Port RIPE whois to Laravel

* remove netcmd.php and port to laravel.
Escape CLI and set it to stream output live.

* fix browser buffer bust on a few browsers.
This commit is contained in:
Tony Murray
2019-01-25 15:30:58 -06:00
committed by GitHub
parent 003f3bdce0
commit ce6fae8dd1
17 changed files with 482 additions and 173 deletions

View File

@@ -21,6 +21,7 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
return view('laravel');
});
// pages
Route::get('locations', 'LocationController@index');
// old route redirects
@@ -37,13 +38,22 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
// Ajax routes
Route::group(['prefix' => 'ajax'], function () {
Route::post('set_resolution', 'ResolutionController@set');
// 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');
@@ -59,6 +69,7 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
Route::get('port-field', 'PortFieldController');
});
// jquery bootgrid data controllers
Route::group(['prefix' => 'table', 'namespace' => 'Table'], function () {
Route::post('customers', 'CustomersController');
Route::post('eventlog', 'EventlogController');
@@ -69,6 +80,7 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
Route::post('syslog', 'SyslogController');
});
// dashboard widgets
Route::group(['prefix' => 'dash', 'namespace' => 'Widgets'], function () {
Route::post('alerts', 'AlertsController');
Route::post('availability-map', 'AvailabilityMapController');