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