2017-04-02 01:01:10 +00:00
|
|
|
<?php
|
2017-12-15 03:05:26 +00:00
|
|
|
|
2019-11-24 20:50:16 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2022-05-14 19:51:05 +00:00
|
|
|
use Pterodactyl\Http\Controllers\Admin;
|
2019-11-24 20:50:16 +00:00
|
|
|
use Pterodactyl\Http\Middleware\Admin\Servers\ServerInstalled;
|
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\BaseController::class, 'index'])->name('admin.index');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2018-01-19 03:36:15 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Location Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/api
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'api'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\ApiController::class, 'index'])->name('admin.api.index');
|
|
|
|
Route::get('/new', [Admin\ApiController::class, 'create'])->name('admin.api.new');
|
2018-01-19 03:36:15 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::post('/new', [Admin\ApiController::class, 'store']);
|
2018-01-19 03:36:15 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::delete('/revoke/{identifier}', [Admin\ApiController::class, 'delete'])->name('admin.api.delete');
|
2018-01-19 03:36:15 +00:00
|
|
|
});
|
|
|
|
|
2017-04-02 01:01:10 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Location Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/locations
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'locations'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\LocationController::class, 'index'])->name('admin.locations');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{location:id}', [Admin\LocationController::class, 'view'])->name('admin.locations.view');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::post('/', [Admin\LocationController::class, 'create']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{location:id}', [Admin\LocationController::class, 'update']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Database Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/databases
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'databases'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\DatabaseController::class, 'index'])->name('admin.databases');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{host:id}', [Admin\DatabaseController::class, 'view'])->name('admin.databases.view');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::post('/', [Admin\DatabaseController::class, 'create']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{host:id}', [Admin\DatabaseController::class, 'update']);
|
|
|
|
Route::delete('/view/{host:id}', [Admin\DatabaseController::class, 'delete']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Settings Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/settings
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'settings'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\Settings\IndexController::class, 'index'])->name('admin.settings');
|
|
|
|
Route::get('/mail', [Admin\Settings\MailController::class, 'index'])->name('admin.settings.mail');
|
|
|
|
Route::get('/advanced', [Admin\Settings\AdvancedController::class, 'index'])->name('admin.settings.advanced');
|
|
|
|
|
|
|
|
Route::post('/mail/test', [Admin\Settings\MailController::class, 'test'])->name('admin.settings.mail.test');
|
|
|
|
|
|
|
|
Route::patch('/', [Admin\Settings\IndexController::class, 'update']);
|
|
|
|
Route::patch('/mail', [Admin\Settings\MailController::class, 'update']);
|
|
|
|
Route::patch('/advanced', [Admin\Settings\AdvancedController::class, 'update']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| User Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/users
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'users'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\UserController::class, 'index'])->name('admin.users');
|
|
|
|
Route::get('/accounts.json', [Admin\UserController::class, 'json'])->name('admin.users.json');
|
|
|
|
Route::get('/new', [Admin\UserController::class, 'create'])->name('admin.users.new');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{user:id}', [Admin\UserController::class, 'view'])->name('admin.users.view');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::post('/new', [Admin\UserController::class, 'store']);
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{user:id}', [Admin\UserController::class, 'update']);
|
|
|
|
Route::delete('/view/{user:id}', [Admin\UserController::class, 'delete']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/servers
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'servers'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\Servers\ServerController::class, 'index'])->name('admin.servers');
|
|
|
|
Route::get('/new', [Admin\Servers\CreateServerController::class, 'index'])->name('admin.servers.new');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{server:id}', [Admin\Servers\ServerViewController::class, 'index'])->name('admin.servers.view');
|
2019-11-24 20:50:16 +00:00
|
|
|
|
|
|
|
Route::group(['middleware' => [ServerInstalled::class]], function () {
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{server:id}/details', [Admin\Servers\ServerViewController::class, 'details'])->name('admin.servers.view.details');
|
|
|
|
Route::get('/view/{server:id}/build', [Admin\Servers\ServerViewController::class, 'build'])->name('admin.servers.view.build');
|
|
|
|
Route::get('/view/{server:id}/startup', [Admin\Servers\ServerViewController::class, 'startup'])->name('admin.servers.view.startup');
|
|
|
|
Route::get('/view/{server:id}/database', [Admin\Servers\ServerViewController::class, 'database'])->name('admin.servers.view.database');
|
|
|
|
Route::get('/view/{server:id}/mounts', [Admin\Servers\ServerViewController::class, 'mounts'])->name('admin.servers.view.mounts');
|
2019-11-24 20:50:16 +00:00
|
|
|
});
|
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{server:id}/manage', [Admin\Servers\ServerViewController::class, 'manage'])->name('admin.servers.view.manage');
|
|
|
|
Route::get('/view/{server:id}/delete', [Admin\Servers\ServerViewController::class, 'delete'])->name('admin.servers.view.delete');
|
2022-05-14 19:51:05 +00:00
|
|
|
|
|
|
|
Route::post('/new', [Admin\Servers\CreateServerController::class, 'store']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::post('/view/{server:id}/build', [Admin\ServersController::class, 'updateBuild']);
|
|
|
|
Route::post('/view/{server:id}/startup', [Admin\ServersController::class, 'saveStartup']);
|
|
|
|
Route::post('/view/{server:id}/database', [Admin\ServersController::class, 'newDatabase']);
|
|
|
|
Route::post('/view/{server:id}/mounts/{mount:id}', [Admin\ServersController::class, 'addMount'])->name('admin.servers.view.mounts.toggle');
|
|
|
|
Route::post('/view/{server:id}/manage/toggle', [Admin\ServersController::class, 'toggleInstall'])->name('admin.servers.view.manage.toggle');
|
|
|
|
Route::post('/view/{server:id}/manage/suspension', [Admin\ServersController::class, 'manageSuspension'])->name('admin.servers.view.manage.suspension');
|
|
|
|
Route::post('/view/{server:id}/manage/reinstall', [Admin\ServersController::class, 'reinstallServer'])->name('admin.servers.view.manage.reinstall');
|
|
|
|
Route::post('/view/{server:id}/manage/transfer', [Admin\Servers\ServerTransferController::class, 'transfer'])->name('admin.servers.view.manage.transfer');
|
|
|
|
Route::post('/view/{server:id}/delete', [Admin\ServersController::class, 'delete']);
|
|
|
|
|
|
|
|
Route::patch('/view/{server:id}/details', [Admin\ServersController::class, 'setDetails']);
|
|
|
|
Route::patch('/view/{server:id}/database', [Admin\ServersController::class, 'resetDatabasePassword']);
|
|
|
|
|
|
|
|
Route::delete('/view/{server:id}/database/{database:id}/delete', [Admin\ServersController::class, 'deleteDatabase'])->name('admin.servers.view.database.delete');
|
|
|
|
Route::delete('/view/{server:id}/mounts/{mount:id}', [Admin\ServersController::class, 'deleteMount']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Node Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/nodes
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'nodes'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\Nodes\NodeController::class, 'index'])->name('admin.nodes');
|
|
|
|
Route::get('/new', [Admin\NodesController::class, 'create'])->name('admin.nodes.new');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{node:id}', [Admin\Nodes\NodeViewController::class, 'index'])->name('admin.nodes.view');
|
|
|
|
Route::get('/view/{node:id}/settings', [Admin\Nodes\NodeViewController::class, 'settings'])->name('admin.nodes.view.settings');
|
|
|
|
Route::get('/view/{node:id}/configuration', [Admin\Nodes\NodeViewController::class, 'configuration'])->name('admin.nodes.view.configuration');
|
|
|
|
Route::get('/view/{node:id}/allocation', [Admin\Nodes\NodeViewController::class, 'allocations'])->name('admin.nodes.view.allocation');
|
|
|
|
Route::get('/view/{node:id}/servers', [Admin\Nodes\NodeViewController::class, 'servers'])->name('admin.nodes.view.servers');
|
|
|
|
Route::get('/view/{node:id}/system-information', Admin\Nodes\SystemInformationController::class);
|
2022-05-14 19:51:05 +00:00
|
|
|
|
|
|
|
Route::post('/new', [Admin\NodesController::class, 'store']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::post('/view/{node:id}/allocation', [Admin\NodesController::class, 'createAllocation']);
|
|
|
|
Route::post('/view/{node:id}/allocation/remove', [Admin\NodesController::class, 'allocationRemoveBlock'])->name('admin.nodes.view.allocation.removeBlock');
|
|
|
|
Route::post('/view/{node:id}/allocation/alias', [Admin\NodesController::class, 'allocationSetAlias'])->name('admin.nodes.view.allocation.setAlias');
|
|
|
|
Route::post('/view/{node:id}/settings/token', Admin\NodeAutoDeployController::class)->name('admin.nodes.view.configuration.token');
|
2022-05-14 19:51:05 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{node:id}/settings', [Admin\NodesController::class, 'updateSettings']);
|
2022-05-14 19:51:05 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::delete('/view/{node:id}/delete', [Admin\NodesController::class, 'delete'])->name('admin.nodes.view.delete');
|
|
|
|
Route::delete('/view/{node:id}/allocation/remove/{allocation:id}', [Admin\NodesController::class, 'allocationRemoveSingle'])->name('admin.nodes.view.allocation.removeSingle');
|
|
|
|
Route::delete('/view/{node:id}/allocations', [Admin\NodesController::class, 'allocationRemoveMultiple'])->name('admin.nodes.view.allocation.removeMultiple');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
2020-05-20 23:29:03 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Mount Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/mounts
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'mounts'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\MountController::class, 'index'])->name('admin.mounts');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{mount:id}', [Admin\MountController::class, 'view'])->name('admin.mounts.view');
|
2020-05-21 00:55:59 +00:00
|
|
|
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::post('/', [Admin\MountController::class, 'create']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::post('/{mount:id}/eggs', [Admin\MountController::class, 'addEggs'])->name('admin.mounts.eggs');
|
|
|
|
Route::post('/{mount:id}/nodes', [Admin\MountController::class, 'addNodes'])->name('admin.mounts.nodes');
|
2020-05-21 02:50:56 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{mount:id}', [Admin\MountController::class, 'update']);
|
2020-05-21 02:50:56 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::delete('/{mount:id}/eggs/{egg_id}', [Admin\MountController::class, 'deleteEgg']);
|
|
|
|
Route::delete('/{mount:id}/nodes/{node_id}', [Admin\MountController::class, 'deleteNode']);
|
2020-05-20 23:29:03 +00:00
|
|
|
});
|
|
|
|
|
2017-04-02 01:01:10 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
2017-10-07 04:57:53 +00:00
|
|
|
| Nest Controller Routes
|
2017-04-02 01:01:10 +00:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2017-10-07 04:57:53 +00:00
|
|
|
| Endpoint: /admin/nests
|
2017-04-02 01:01:10 +00:00
|
|
|
|
|
|
|
|
*/
|
2017-10-07 04:57:53 +00:00
|
|
|
Route::group(['prefix' => 'nests'], function () {
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/', [Admin\Nests\NestController::class, 'index'])->name('admin.nests');
|
|
|
|
Route::get('/new', [Admin\Nests\NestController::class, 'create'])->name('admin.nests.new');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/view/{nest:id}', [Admin\Nests\NestController::class, 'view'])->name('admin.nests.view');
|
2022-05-14 19:51:05 +00:00
|
|
|
Route::get('/egg/new', [Admin\Nests\EggController::class, 'create'])->name('admin.nests.egg.new');
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::get('/egg/{egg:id}', [Admin\Nests\EggController::class, 'view'])->name('admin.nests.egg.view');
|
|
|
|
Route::get('/egg/{egg:id}/export', [Admin\Nests\EggShareController::class, 'export'])->name('admin.nests.egg.export');
|
|
|
|
Route::get('/egg/{egg:id}/variables', [Admin\Nests\EggVariableController::class, 'view'])->name('admin.nests.egg.variables');
|
|
|
|
Route::get('/egg/{egg:id}/scripts', [Admin\Nests\EggScriptController::class, 'index'])->name('admin.nests.egg.scripts');
|
2022-05-14 19:51:05 +00:00
|
|
|
|
|
|
|
Route::post('/new', [Admin\Nests\NestController::class, 'store']);
|
|
|
|
Route::post('/import', [Admin\Nests\EggShareController::class, 'import'])->name('admin.nests.egg.import');
|
|
|
|
Route::post('/egg/new', [Admin\Nests\EggController::class, 'store']);
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::post('/egg/{egg:id}/variables', [Admin\Nests\EggVariableController::class, 'store']);
|
2022-05-14 19:51:05 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::put('/egg/{egg:id}', [Admin\Nests\EggShareController::class, 'update']);
|
2022-05-14 19:51:05 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::patch('/view/{nest:id}', [Admin\Nests\NestController::class, 'update']);
|
|
|
|
Route::patch('/egg/{egg:id}', [Admin\Nests\EggController::class, 'update']);
|
|
|
|
Route::patch('/egg/{egg:id}/scripts', [Admin\Nests\EggScriptController::class, 'update']);
|
|
|
|
Route::patch('/egg/{egg:id}/variables/{variable:id}', [Admin\Nests\EggVariableController::class, 'update'])->name('admin.nests.egg.variables.edit');
|
2022-05-14 19:51:05 +00:00
|
|
|
|
2022-05-22 22:56:22 +00:00
|
|
|
Route::delete('/view/{nest:id}', [Admin\Nests\NestController::class, 'destroy']);
|
|
|
|
Route::delete('/egg/{egg:id}', [Admin\Nests\EggController::class, 'destroy']);
|
|
|
|
Route::delete('/egg/{egg:id}/variables/{variable:id}', [Admin\Nests\EggVariableController::class, 'destroy']);
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|