|
|
@@ -1,228 +0,0 @@
|
|
|
-<?php
|
|
|
-
|
|
|
-use Illuminate\Support\Facades\Route;
|
|
|
-use App\Module\ThirdParty\AdminControllers\ThirdPartyServiceController;
|
|
|
-use App\Module\ThirdParty\AdminControllers\ThirdPartyCredentialController;
|
|
|
-use App\Module\ThirdParty\AdminControllers\ThirdPartyLogController;
|
|
|
-use App\Module\ThirdParty\AdminControllers\ThirdPartyQuotaController;
|
|
|
-use App\Module\ThirdParty\AdminControllers\ThirdPartyMonitorController;
|
|
|
-
|
|
|
-/**
|
|
|
- * ThirdParty模块后台管理路由
|
|
|
- *
|
|
|
- * 路由前缀: /admin/thirdparty
|
|
|
- */
|
|
|
-
|
|
|
-// 第三方服务管理
|
|
|
-Route::resource('services', ThirdPartyServiceController::class);
|
|
|
-
|
|
|
-// 第三方服务扩展路由
|
|
|
-Route::prefix('services')->name('services.')->group(function () {
|
|
|
- // 健康检查
|
|
|
- Route::get('health-check', [ThirdPartyServiceController::class, 'healthCheck'])->name('health-check');
|
|
|
- Route::post('{id}/health-check', [ThirdPartyServiceController::class, 'performHealthCheck'])->name('perform-health-check');
|
|
|
-
|
|
|
- // 服务测试
|
|
|
- Route::get('{id}/test', [ThirdPartyServiceController::class, 'testService'])->name('test');
|
|
|
- Route::post('{id}/test', [ThirdPartyServiceController::class, 'performTest'])->name('perform-test');
|
|
|
-
|
|
|
- // 统计报告
|
|
|
- Route::get('stats', [ThirdPartyServiceController::class, 'stats'])->name('stats');
|
|
|
-
|
|
|
- // 批量操作
|
|
|
- Route::post('batch-activate', [ThirdPartyServiceController::class, 'batchActivate'])->name('batch-activate');
|
|
|
- Route::post('batch-deactivate', [ThirdPartyServiceController::class, 'batchDeactivate'])->name('batch-deactivate');
|
|
|
-
|
|
|
- // 导入导出
|
|
|
- Route::get('export', [ThirdPartyServiceController::class, 'export'])->name('export');
|
|
|
- Route::post('import', [ThirdPartyServiceController::class, 'import'])->name('import');
|
|
|
-});
|
|
|
-
|
|
|
-// 认证凭证管理
|
|
|
-Route::resource('credentials', ThirdPartyCredentialController::class);
|
|
|
-
|
|
|
-// 认证凭证扩展路由
|
|
|
-Route::prefix('credentials')->name('credentials.')->group(function () {
|
|
|
- // 过期凭证
|
|
|
- Route::get('expired', [ThirdPartyCredentialController::class, 'expired'])->name('expired');
|
|
|
-
|
|
|
- // 凭证测试
|
|
|
- Route::get('test', [ThirdPartyCredentialController::class, 'testCredentials'])->name('test');
|
|
|
- Route::get('{id}/test', [ThirdPartyCredentialController::class, 'testCredential'])->name('test-single');
|
|
|
- Route::post('{id}/test', [ThirdPartyCredentialController::class, 'performTest'])->name('perform-test');
|
|
|
-
|
|
|
- // 使用统计
|
|
|
- Route::get('{id}/usage', [ThirdPartyCredentialController::class, 'usage'])->name('usage');
|
|
|
-
|
|
|
- // 批量操作
|
|
|
- Route::post('batch-activate', [ThirdPartyCredentialController::class, 'batchActivate'])->name('batch-activate');
|
|
|
- Route::post('batch-deactivate', [ThirdPartyCredentialController::class, 'batchDeactivate'])->name('batch-deactivate');
|
|
|
- Route::post('batch-delete-expired', [ThirdPartyCredentialController::class, 'batchDeleteExpired'])->name('batch-delete-expired');
|
|
|
-
|
|
|
- // 凭证轮换
|
|
|
- Route::post('{id}/rotate', [ThirdPartyCredentialController::class, 'rotate'])->name('rotate');
|
|
|
-
|
|
|
- // 导入导出
|
|
|
- Route::get('export', [ThirdPartyCredentialController::class, 'export'])->name('export');
|
|
|
- Route::post('import', [ThirdPartyCredentialController::class, 'import'])->name('import');
|
|
|
-});
|
|
|
-
|
|
|
-// 调用日志管理
|
|
|
-Route::resource('logs', ThirdPartyLogController::class)->except(['create', 'store', 'edit', 'update']);
|
|
|
-
|
|
|
-// 调用日志扩展路由
|
|
|
-Route::prefix('logs')->name('logs.')->group(function () {
|
|
|
- // 统计分析
|
|
|
- Route::get('stats', [ThirdPartyLogController::class, 'stats'])->name('stats');
|
|
|
-
|
|
|
- // 导出日志
|
|
|
- Route::get('export', [ThirdPartyLogController::class, 'export'])->name('export');
|
|
|
- Route::post('export', [ThirdPartyLogController::class, 'performExport'])->name('perform-export');
|
|
|
-
|
|
|
- // 清理日志
|
|
|
- Route::get('cleanup', [ThirdPartyLogController::class, 'cleanup'])->name('cleanup');
|
|
|
- Route::post('cleanup', [ThirdPartyLogController::class, 'performCleanup'])->name('perform-cleanup');
|
|
|
-
|
|
|
- // 重试失败请求
|
|
|
- Route::post('{id}/retry', [ThirdPartyLogController::class, 'retry'])->name('retry');
|
|
|
-
|
|
|
- // 批量操作
|
|
|
- Route::post('batch-delete', [ThirdPartyLogController::class, 'batchDelete'])->name('batch-delete');
|
|
|
-
|
|
|
- // 实时日志
|
|
|
- Route::get('realtime', [ThirdPartyLogController::class, 'realtime'])->name('realtime');
|
|
|
-
|
|
|
- // 错误分析
|
|
|
- Route::get('errors', [ThirdPartyLogController::class, 'errors'])->name('errors');
|
|
|
- Route::get('errors/analysis', [ThirdPartyLogController::class, 'errorAnalysis'])->name('error-analysis');
|
|
|
-});
|
|
|
-
|
|
|
-// 配额管理
|
|
|
-Route::resource('quotas', ThirdPartyQuotaController::class);
|
|
|
-
|
|
|
-// 配额管理扩展路由
|
|
|
-Route::prefix('quotas')->name('quotas.')->group(function () {
|
|
|
- // 超限配额
|
|
|
- Route::get('exceeded', [ThirdPartyQuotaController::class, 'exceeded'])->name('exceeded');
|
|
|
-
|
|
|
- // 配额重置
|
|
|
- Route::get('reset-all', [ThirdPartyQuotaController::class, 'resetAll'])->name('reset-all');
|
|
|
- Route::post('reset-all', [ThirdPartyQuotaController::class, 'performResetAll'])->name('perform-reset-all');
|
|
|
- Route::post('{id}/reset', [ThirdPartyQuotaController::class, 'reset'])->name('reset');
|
|
|
-
|
|
|
- // 增加配额
|
|
|
- Route::get('{id}/increase', [ThirdPartyQuotaController::class, 'increase'])->name('increase');
|
|
|
- Route::post('{id}/increase', [ThirdPartyQuotaController::class, 'performIncrease'])->name('perform-increase');
|
|
|
-
|
|
|
- // 使用详情
|
|
|
- Route::get('{id}/usage', [ThirdPartyQuotaController::class, 'usage'])->name('usage');
|
|
|
-
|
|
|
- // 使用统计
|
|
|
- Route::get('stats', [ThirdPartyQuotaController::class, 'stats'])->name('stats');
|
|
|
-
|
|
|
- // 批量操作
|
|
|
- Route::post('batch-reset', [ThirdPartyQuotaController::class, 'batchReset'])->name('batch-reset');
|
|
|
- Route::post('batch-activate', [ThirdPartyQuotaController::class, 'batchActivate'])->name('batch-activate');
|
|
|
- Route::post('batch-deactivate', [ThirdPartyQuotaController::class, 'batchDeactivate'])->name('batch-deactivate');
|
|
|
-
|
|
|
- // 告警设置
|
|
|
- Route::get('alerts', [ThirdPartyQuotaController::class, 'alerts'])->name('alerts');
|
|
|
- Route::post('alerts', [ThirdPartyQuotaController::class, 'updateAlerts'])->name('update-alerts');
|
|
|
-});
|
|
|
-
|
|
|
-// 监控记录管理
|
|
|
-Route::resource('monitors', ThirdPartyMonitorController::class)->except(['create', 'store', 'edit', 'update']);
|
|
|
-
|
|
|
-// 监控记录扩展路由
|
|
|
-Route::prefix('monitors')->name('monitors.')->group(function () {
|
|
|
- // 执行健康检查
|
|
|
- Route::get('health-check', [ThirdPartyMonitorController::class, 'healthCheck'])->name('health-check');
|
|
|
- Route::post('health-check', [ThirdPartyMonitorController::class, 'performHealthCheck'])->name('perform-health-check');
|
|
|
-
|
|
|
- // 重新检查
|
|
|
- Route::post('{id}/recheck', [ThirdPartyMonitorController::class, 'recheck'])->name('recheck');
|
|
|
-
|
|
|
- // 监控统计
|
|
|
- Route::get('stats', [ThirdPartyMonitorController::class, 'stats'])->name('stats');
|
|
|
-
|
|
|
- // 清理记录
|
|
|
- Route::get('cleanup', [ThirdPartyMonitorController::class, 'cleanup'])->name('cleanup');
|
|
|
- Route::post('cleanup', [ThirdPartyMonitorController::class, 'performCleanup'])->name('perform-cleanup');
|
|
|
-
|
|
|
- // 批量操作
|
|
|
- Route::post('batch-delete', [ThirdPartyMonitorController::class, 'batchDelete'])->name('batch-delete');
|
|
|
-
|
|
|
- // 监控仪表板
|
|
|
- Route::get('dashboard', [ThirdPartyMonitorController::class, 'dashboard'])->name('dashboard');
|
|
|
-
|
|
|
- // 告警历史
|
|
|
- Route::get('alerts', [ThirdPartyMonitorController::class, 'alerts'])->name('alerts');
|
|
|
-
|
|
|
- // 性能趋势
|
|
|
- Route::get('performance', [ThirdPartyMonitorController::class, 'performance'])->name('performance');
|
|
|
-
|
|
|
- // 可用性报告
|
|
|
- Route::get('availability', [ThirdPartyMonitorController::class, 'availability'])->name('availability');
|
|
|
-});
|
|
|
-
|
|
|
-// 全局统计和报告
|
|
|
-Route::prefix('reports')->name('reports.')->group(function () {
|
|
|
- // 综合报告
|
|
|
- Route::get('overview', [ThirdPartyServiceController::class, 'overview'])->name('overview');
|
|
|
-
|
|
|
- // 服务健康报告
|
|
|
- Route::get('health', [ThirdPartyServiceController::class, 'healthReport'])->name('health');
|
|
|
-
|
|
|
- // 使用统计报告
|
|
|
- Route::get('usage', [ThirdPartyServiceController::class, 'usageReport'])->name('usage');
|
|
|
-
|
|
|
- // 错误分析报告
|
|
|
- Route::get('errors', [ThirdPartyLogController::class, 'errorReport'])->name('errors');
|
|
|
-
|
|
|
- // 性能分析报告
|
|
|
- Route::get('performance', [ThirdPartyMonitorController::class, 'performanceReport'])->name('performance');
|
|
|
-
|
|
|
- // 配额使用报告
|
|
|
- Route::get('quota', [ThirdPartyQuotaController::class, 'quotaReport'])->name('quota');
|
|
|
-});
|
|
|
-
|
|
|
-// 系统管理
|
|
|
-Route::prefix('system')->name('system.')->group(function () {
|
|
|
- // 配置管理
|
|
|
- Route::get('config', [ThirdPartyServiceController::class, 'config'])->name('config');
|
|
|
- Route::post('config', [ThirdPartyServiceController::class, 'updateConfig'])->name('update-config');
|
|
|
-
|
|
|
- // 缓存管理
|
|
|
- Route::get('cache', [ThirdPartyServiceController::class, 'cache'])->name('cache');
|
|
|
- Route::post('cache/clear', [ThirdPartyServiceController::class, 'clearCache'])->name('clear-cache');
|
|
|
-
|
|
|
- // 队列管理
|
|
|
- Route::get('queue', [ThirdPartyServiceController::class, 'queue'])->name('queue');
|
|
|
- Route::post('queue/restart', [ThirdPartyServiceController::class, 'restartQueue'])->name('restart-queue');
|
|
|
-
|
|
|
- // 日志管理
|
|
|
- Route::get('logs', [ThirdPartyServiceController::class, 'systemLogs'])->name('logs');
|
|
|
-
|
|
|
- // 备份恢复
|
|
|
- Route::get('backup', [ThirdPartyServiceController::class, 'backup'])->name('backup');
|
|
|
- Route::post('backup', [ThirdPartyServiceController::class, 'performBackup'])->name('perform-backup');
|
|
|
- Route::post('restore', [ThirdPartyServiceController::class, 'restore'])->name('restore');
|
|
|
-});
|
|
|
-
|
|
|
-// API接口(用于AJAX调用)
|
|
|
-Route::prefix('api')->name('api.')->group(function () {
|
|
|
- // 服务状态检查
|
|
|
- Route::get('services/{id}/status', [ThirdPartyServiceController::class, 'getStatus'])->name('service-status');
|
|
|
-
|
|
|
- // 实时统计数据
|
|
|
- Route::get('stats/realtime', [ThirdPartyServiceController::class, 'realtimeStats'])->name('realtime-stats');
|
|
|
-
|
|
|
- // 配额使用情况
|
|
|
- Route::get('quotas/{id}/usage', [ThirdPartyQuotaController::class, 'getUsage'])->name('quota-usage');
|
|
|
-
|
|
|
- // 监控数据
|
|
|
- Route::get('monitors/latest', [ThirdPartyMonitorController::class, 'getLatest'])->name('monitor-latest');
|
|
|
-
|
|
|
- // 日志统计
|
|
|
- Route::get('logs/stats', [ThirdPartyLogController::class, 'getStats'])->name('log-stats');
|
|
|
-});
|