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;
|
|
|
|
|
2020-09-19 23:40:53 +00:00
|
|
|
Route::get('/', 'BaseController@index')->name('admin.index')->fallback();
|
2020-12-28 17:42:34 +00:00
|
|
|
Route::get('/{react}', 'BaseController@index')
|
|
|
|
->where('react', '.+');
|
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 () {
|
2018-01-20 03:47:06 +00:00
|
|
|
Route::post('/new', 'ApiController@store');
|
2018-01-19 03:36:15 +00:00
|
|
|
|
2018-01-20 03:47:06 +00:00
|
|
|
Route::delete('/revoke/{identifier}', 'ApiController@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 () {
|
|
|
|
Route::post('/', 'LocationController@create');
|
2017-06-25 00:49:09 +00:00
|
|
|
Route::patch('/view/{location}', 'LocationController@update');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Database Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/databases
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'databases'], function () {
|
|
|
|
Route::post('/', 'DatabaseController@create');
|
2017-06-18 00:48:31 +00:00
|
|
|
Route::patch('/view/{host}', 'DatabaseController@update');
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::delete('/view/{host}', 'DatabaseController@delete');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Settings Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/settings
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'settings'], function () {
|
2017-12-15 03:05:26 +00:00
|
|
|
Route::patch('/', 'Settings\IndexController@update');
|
|
|
|
Route::patch('/mail', 'Settings\MailController@update');
|
|
|
|
Route::patch('/advanced', 'Settings\AdvancedController@update');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| User Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/users
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'users'], function () {
|
2017-04-09 23:13:22 +00:00
|
|
|
Route::post('/new', 'UserController@store');
|
2017-06-11 03:28:44 +00:00
|
|
|
Route::patch('/view/{user}', 'UserController@update');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-06-11 03:28:44 +00:00
|
|
|
Route::delete('/view/{user}', 'UserController@delete');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/servers
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'servers'], function () {
|
2019-11-16 21:08:46 +00:00
|
|
|
Route::post('/new', 'Servers\CreateServerController@store');
|
2017-07-23 19:51:18 +00:00
|
|
|
Route::post('/view/{server}/build', 'ServersController@updateBuild');
|
|
|
|
Route::post('/view/{server}/startup', 'ServersController@saveStartup');
|
|
|
|
Route::post('/view/{server}/database', 'ServersController@newDatabase');
|
2020-05-21 20:23:12 +00:00
|
|
|
Route::post('/view/{server}/mounts/{mount}', 'ServersController@addMount')->name('admin.servers.view.mounts.toggle');
|
2017-07-23 19:51:18 +00:00
|
|
|
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 03:45:37 +00:00
|
|
|
Route::post('/view/{server}/manage/transfer', 'Servers\ServerTransferController@transfer')->name('admin.servers.view.manage.transfer');
|
2017-07-23 19:51:18 +00:00
|
|
|
Route::post('/view/{server}/delete', 'ServersController@delete');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-07-23 01:15:01 +00:00
|
|
|
Route::patch('/view/{server}/details', 'ServersController@setDetails');
|
2017-07-23 19:51:18 +00:00
|
|
|
Route::patch('/view/{server}/database', 'ServersController@resetDatabasePassword');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-07-23 19:51:18 +00:00
|
|
|
Route::delete('/view/{server}/database/{database}/delete', 'ServersController@deleteDatabase')->name('admin.servers.view.database.delete');
|
2020-05-21 20:23:12 +00:00
|
|
|
Route::delete('/view/{server}/mounts/{mount}', 'ServersController@deleteMount');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Node Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /admin/nodes
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'nodes'], function () {
|
2017-04-09 23:13:22 +00:00
|
|
|
Route::post('/new', 'NodesController@store');
|
2017-08-05 22:20:07 +00: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 01:01:10 +00:00
|
|
|
|
2017-08-05 22:20:07 +00: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 04:43:18 +00:00
|
|
|
Route::delete('/view/{node}/allocations', 'NodesController@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 () {
|
2020-05-21 00:55:59 +00:00
|
|
|
Route::post('/', 'MountController@create');
|
2020-05-21 02:50:56 +00:00
|
|
|
Route::post('/{mount}/eggs', 'MountController@addEggs')->name('admin.mounts.eggs');
|
|
|
|
Route::post('/{mount}/nodes', 'MountController@addNodes')->name('admin.mounts.nodes');
|
|
|
|
|
2020-05-21 01:35:30 +00:00
|
|
|
Route::patch('/view/{mount}', 'MountController@update');
|
2020-05-21 02:50:56 +00:00
|
|
|
|
|
|
|
Route::delete('/{mount}/eggs/{egg_id}', 'MountController@deleteEgg');
|
|
|
|
Route::delete('/{mount}/nodes/{node_id}', 'MountController@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 () {
|
|
|
|
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 04:50:52 +00:00
|
|
|
Route::put('/egg/{egg}', 'Nests\EggShareController@update');
|
|
|
|
|
2017-10-07 04:57:53 +00: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 01:01:10 +00:00
|
|
|
});
|