Port Validation Page to Laravel (#13921)

* Revamp validate web page
 to load page then validate, instead of validate then load page

* style fixes

* lint cleanups

* fixes

* translations and a couple fixes

* style fixes

* move result serialization into the class.
This commit is contained in:
Tony Murray
2022-04-14 11:22:40 -05:00
committed by GitHub
parent e495769f17
commit 0a84098211
20 changed files with 344 additions and 445 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Contracts\View\View;
use Illuminate\Http\JsonResponse;
use LibreNMS\Validator;
class ValidateController extends Controller
{
public function index(): View
{
return view('validate.index');
}
public function runValidation(): JsonResponse
{
$validator = new Validator();
$validator->validate();
return response()->json($validator->toArray());
}
}