2017-04-02 01:01:10 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Pterodactyl - Panel
|
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
|
|
*
|
2017-09-26 02:43:01 +00:00
|
|
|
* This software is licensed under the terms of the MIT license.
|
|
|
|
* https://opensource.org/licenses/MIT
|
2017-04-02 01:01:10 +00:00
|
|
|
*/
|
2017-09-03 02:35:33 +00:00
|
|
|
Route::get('/', 'ConsoleController@index')->name('server.index');
|
|
|
|
Route::get('/console', 'ConsoleController@console')->name('server.console');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Settings Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /server/{server}/settings
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'settings'], function () {
|
2017-10-21 02:32:57 +00:00
|
|
|
Route::get('/allocation', 'Settings\AllocationController@index')->name('server.settings.allocation');
|
|
|
|
Route::patch('/allocation', 'Settings\AllocationController@update');
|
|
|
|
|
2017-04-02 01:01:10 +00:00
|
|
|
Route::get('/sftp', 'ServerController@getSFTP')->name('server.settings.sftp');
|
|
|
|
Route::get('/startup', 'ServerController@getStartup')->name('server.settings.startup');
|
|
|
|
|
|
|
|
Route::post('/sftp', 'ServerController@postSettingsSFTP');
|
|
|
|
Route::post('/startup', 'ServerController@postSettingsStartup');
|
|
|
|
});
|
|
|
|
|
2017-10-19 03:32:19 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Database Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /server/{server}/databases
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'databases'], function () {
|
|
|
|
Route::get('/', 'DatabaseController@index')->name('server.databases.index');
|
|
|
|
|
|
|
|
Route::patch('/password', 'DatabaseController@update')->middleware('server..database')->name('server.databases.password');
|
|
|
|
});
|
|
|
|
|
2017-04-02 01:01:10 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server File Manager Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /server/{server}/files
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'files'], function () {
|
2017-09-03 21:32:52 +00:00
|
|
|
Route::get('/', 'Files\FileActionsController@index')->name('server.files.index');
|
|
|
|
Route::get('/add', 'Files\FileActionsController@create')->name('server.files.add');
|
|
|
|
Route::get('/edit/{file}', 'Files\FileActionsController@update')->name('server.files.edit')->where('file', '.*');
|
|
|
|
Route::get('/download/{file}', 'Files\DownloadController@index')->name('server.files.edit')->where('file', '.*');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-09-03 21:32:52 +00:00
|
|
|
Route::post('/directory-list', 'Files\RemoteRequestController@directory')->name('server.files.directory-list');
|
|
|
|
Route::post('/save', 'Files\RemoteRequestController@store')->name('server.files.save');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Subuser Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /server/{server}/users
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => 'users'], function () {
|
2017-04-09 23:13:22 +00:00
|
|
|
Route::get('/', 'SubuserController@index')->name('server.subusers');
|
|
|
|
Route::get('/new', 'SubuserController@create')->name('server.subusers.new');
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::get('/view/{subuser}', 'SubuserController@view')->middleware('server..subuser')->name('server.subusers.view');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-04-09 23:13:22 +00:00
|
|
|
Route::post('/new', 'SubuserController@store');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::patch('/view/{subuser}', 'SubuserController@update')->middleware('server..subuser');
|
2017-09-04 23:12:13 +00:00
|
|
|
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::delete('/view/{subuser}/delete', 'SubuserController@delete')->middleware('server..subuser')->name('server.subusers.delete');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Server Task Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /server/{server}/tasks
|
|
|
|
|
|
|
|
|
*/
|
2017-09-13 04:45:19 +00:00
|
|
|
Route::group(['prefix' => 'schedules'], function () {
|
2017-09-14 02:46:43 +00:00
|
|
|
Route::get('/', 'Tasks\TaskManagementController@index')->name('server.schedules');
|
|
|
|
Route::get('/new', 'Tasks\TaskManagementController@create')->name('server.schedules.new');
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::get('/view/{schedule}', 'Tasks\TaskManagementController@view')->middleware('server..schedule')->name('server.schedules.view');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-09-10 04:55:21 +00:00
|
|
|
Route::post('/new', 'Tasks\TaskManagementController@store');
|
2017-04-02 01:01:10 +00:00
|
|
|
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::patch('/view/{schedule}', 'Tasks\TaskManagementController@update')->middleware('server..schedule');
|
|
|
|
Route::patch('/view/{schedule}/toggle', 'Tasks\TaskToggleController@index')->middleware('server..schedule')->name('server.schedules.toggle');
|
2017-09-10 04:55:21 +00:00
|
|
|
|
2017-10-19 03:32:19 +00:00
|
|
|
Route::delete('/view/{schedule}/delete', 'Tasks\TaskManagementController@delete')->middleware('server..schedule')->name('server.schedules.delete');
|
2017-04-02 01:01:10 +00:00
|
|
|
});
|