LAR_Maintenance/routes/web.php

74 lines
4.9 KiB
PHP
Raw Permalink Normal View History

2024-07-30 08:44:45 +00:00
<?php
2024-09-10 13:40:53 +00:00
use Illuminate\Support\Facades\Auth;
2024-07-30 08:44:45 +00:00
use Illuminate\Support\Facades\Route;
2024-07-30 16:13:21 +00:00
Route::auth();
2024-08-16 16:20:45 +00:00
Route::get('/', function () {
2024-09-10 13:40:53 +00:00
if (Auth::check()){
return redirect()->route('maintenance.planned');
}
2024-08-16 16:20:45 +00:00
return redirect()->route('login');
});
2024-07-30 16:13:21 +00:00
2024-07-31 15:04:33 +00:00
Route::get('/maintenance/planned', [App\Http\Controllers\MaintenanceController::class, 'planned'])->name('maintenance.planned');
2024-07-31 16:45:14 +00:00
Route::get('/maintenance/planned/{maintenance_history}', [App\Http\Controllers\MaintenanceController::class, 'plannedDetail'])->name('maintenance.planned.detail');
2024-08-07 05:52:07 +00:00
Route::put('/maintenance/planned/{maintenance_history}', [App\Http\Controllers\MaintenanceController::class, 'plannedDetailPut'])->name('maintenance.planned.detail.put');
2024-08-16 21:37:42 +00:00
Route::get('/maintenance/planned/{maintenance_history}/start', [App\Http\Controllers\MaintenanceController::class, 'start'])->name('maintenance.start');
2024-08-09 06:37:00 +00:00
Route::post('/maintenance/planned/{maintenance_history}/finished', [App\Http\Controllers\MaintenanceController::class, 'plannedDetailFinishPost'])->name('maintenance.planned.finished');
Route::get('/maintenance/history/', [App\Http\Controllers\MaintenanceController::class, 'history'])->name('maintenance.history');
2024-08-09 06:37:00 +00:00
Route::get('/maintenance/history/{maintenance_history}', [App\Http\Controllers\MaintenanceController::class, 'historyDetail'])->name('maintenance.history.detail');
2024-07-31 15:04:33 +00:00
2024-07-30 16:13:21 +00:00
Route::get('/host', [App\Http\Controllers\HostController::class, 'index'])->name('host');
2024-08-16 16:20:45 +00:00
Route::get('/host/sync', [App\Http\Controllers\HostController::class, 'sync'])->name('host.sync');
2024-09-25 20:09:13 +00:00
Route::get('/host_groups', [App\Http\Controllers\HostGroupController::class, 'index'])->name('host_groups');
2024-08-16 16:20:45 +00:00
2024-07-30 16:13:21 +00:00
Route::get('/maintenance', [App\Http\Controllers\MaintenanceController::class, 'index'])->name('maintenance');
2024-08-06 06:31:51 +00:00
Route::get('/tasks', [App\Http\Controllers\TaskController::class, 'index'])->name('tasks');
2024-07-30 16:13:21 +00:00
Route::prefix('profile')->name('profile.')->middleware(['auth'])->group(function () {
Route::get('/', [App\Http\Controllers\Auth\ProfileController::class, 'index'])->middleware('auth')->name('index');
Route::put('/update', [App\Http\Controllers\Auth\ProfileController::class, 'update'])->middleware('auth')->name('update');
Route::get('/api', [App\Http\Controllers\Auth\ProfileController::class, 'api'])->middleware('auth')->name('api');
Route::post('/api/create', [App\Http\Controllers\Auth\ProfileController::class, 'createApiToken'])->middleware('auth')->name('api.create');
Route::delete('/api/remove', [App\Http\Controllers\Auth\ProfileController::class, 'removeApiToken'])->middleware('auth')->name('api.remove');
});
Route::prefix('system')->name('system.')->middleware(['auth'])->group(function () {
Route::get('/audit', [App\Http\Controllers\System\AuditController::class, 'index'])->name('audit.index');
Route::get('/user', [App\Http\Controllers\System\UserController::class, 'index'])->name('user.index');
Route::get('/subscription', [App\Http\Controllers\System\SubscriptionController::class, 'index'])->name('subscription.index');
Route::get('/api', [App\Http\Controllers\System\ApiController::class, 'index'])->name('api.index');
Route::prefix('jobs')->name('jobs.')->group(function () {
Route::get('/', [App\Http\Controllers\System\JobsController::class, 'index'])->name('index');
Route::get('/clear', [App\Http\Controllers\System\JobsController::class, 'clear'])->name('clear');
Route::get('/call/{job}', [App\Http\Controllers\System\JobsController::class, 'call'])->name('call');
});
Route::prefix('cache')->name('cache.')->group(function () {
Route::get('/', [App\Http\Controllers\System\CacheController::class, 'index'])->name('index');
Route::get('/clear', [App\Http\Controllers\System\CacheController::class, 'clear'])->name('clear');
});
Route::prefix('log')->name('log.')->group(function () {
Route::get('/', [App\Http\Controllers\System\LogController::class, 'index'])->name('index');
Route::get('/detail/{file}', [App\Http\Controllers\System\LogController::class, 'detail'])->name('detail');
Route::get('/download/{file}', [App\Http\Controllers\System\LogController::class, 'download'])->name('download');
Route::get('/clear', [App\Http\Controllers\System\LogController::class, 'clear'])->name('clear');
});
Route::prefix('backup')->name('backup.')->group(function () {
Route::get('/', [App\Http\Controllers\System\BackupController::class, 'index'])->name('index');
Route::get('/run', [App\Http\Controllers\System\BackupController::class, 'run'])->name('run');
Route::get('/delete/{backup_date}', [App\Http\Controllers\System\BackupController::class, 'delete'])->name('delete');
Route::get('/download/{file_name}', [App\Http\Controllers\System\BackupController::class, 'download'])->name('download');
Route::get('/download', [App\Http\Controllers\System\BackupController::class, 'download'])->name('download.latest');
});
});