diff --git a/.dev/vagrant/provision.sh b/.dev/vagrant/provision.sh index 41b3fa920..38dc27ad8 100644 --- a/.dev/vagrant/provision.sh +++ b/.dev/vagrant/provision.sh @@ -19,7 +19,7 @@ export DEBIAN_FRONTEND=noninteractive debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password pterodactyl' debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password pterodactyl' # actually install -apt-get install -y php7.1 php7.1-cli php7.1-gd php7.1-mysql php7.1-pdo php7.1-mbstring php7.1-tokenizer php7.1-bcmath php7.1-xml php7.1-fpm php7.1-memcached php7.1-curl php7.1-zip php-xdebug mariadb-server nginx curl tar unzip git memcached > /dev/null +apt-get install -y php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-pdo php7.2-mbstring php7.2-tokenizer php7.2-bcmath php7.2-xml php7.2-fpm php7.2-memcached php7.2-curl php7.2-zip php-xdebug mariadb-server nginx curl tar unzip git memcached > /dev/null echo "Install composer" curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer @@ -32,8 +32,8 @@ systemctl enable mailhog.service systemctl start mailhog echo "Configure xDebug" -cp /var/www/html/pterodactyl/.dev/vagrant/xdebug.ini /etc/php/7.1/mods-available/ -systemctl restart php7.1-fpm +cp /var/www/html/pterodactyl/.dev/vagrant/xdebug.ini /etc/php/7.2/mods-available/ +systemctl restart php7.2-fpm echo "Configure nginx" cp /var/www/html/pterodactyl/.dev/vagrant/pterodactyl.conf /etc/nginx/sites-available/ diff --git a/.dev/vagrant/pterodactyl.conf b/.dev/vagrant/pterodactyl.conf index d83849a97..343cbad5f 100644 --- a/.dev/vagrant/pterodactyl.conf +++ b/.dev/vagrant/pterodactyl.conf @@ -31,7 +31,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # the fastcgi_pass path needs to be changed accordingly when using CentOS - fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M"; diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2f3c18c72..505094c62 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,14 +1,24 @@ -Please describe your issue in full below. Include what products are affected, as well as what version(s) you are running. Please also include information about your system, such as `uname -a` and `php -v` and `docker info` if applicable. + + + * Panel or Daemon: * Version of Panel/Daemon: * Server's OS: * Your Computer's OS & Browser: -## Add Details Below: +------------------------ + diff --git a/.gitignore b/.gitignore index 2422de18a..8c2fb9405 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,7 @@ docker-compose.yml # for image related files misc .phpstorm.meta.php -.php_cs.cache +.php_cs.cache + +# Vagrant +*.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 104256f65..3c69c8776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v0.7.3 (Derelict Dermodactylus) +### Fixed +* Fixes server creation API endpoint not passing the provided `external_id` to the creation service. +* Fixes a bug causing users to be un-editable on new installations once more than one user exists. +* Fixes default order of buttons in certain parts of the panel that would default to 'Delete' rather than 'Save' when pressing enter. + +### Added +* Adds ability to modify the external ID for a server through the API. + ## v0.7.2 (Derelict Dermodactylus) ### Fixed * Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint. diff --git a/README.md b/README.md index 358e74fa5..f6931c048 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,56 @@ [![Logo Image](https://cdn.pterodactyl.io/logos/Banner%20Logo%20Black@2x.png)](https://pterodactyl.io) -[![Build Status](https://travis-ci.org/Pterodactyl/Panel.svg?branch=develop)](https://travis-ci.org/Pterodactyl/Panel) [![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644) [![codecov](https://codecov.io/gh/Pterodactyl/Panel/branch/develop/graph/badge.svg)](https://codecov.io/gh/Pterodactyl/Panel) +[![Build Status](https://travis-ci.org/pterodactyl/panel.svg?branch=develop)](https://travis-ci.org/pterodactyl/panel) [![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644) [![codecov](https://codecov.io/gh/pterodactyl/panel/branch/develop/graph/badge.svg)](https://codecov.io/gh/Pterodactyl/Panel) -## Pterodactyl Panel -Pterodactyl Panel is the free, open-source, game agnostic, self-hosted control panel for users, networks, and game service providers. Pterodactyl supports games and servers such as Minecraft (including Spigot, Bungeecord, and Sponge), ARK: Evolution Evolved, CS:GO, Team Fortress 2, Insurgency, Teamspeak 3, Mumble, and many more. Control all of your games from one unified interface. +# Pterodactyl Panel +Pterodactyl is the open-source game server management panel built with PHP7, Nodejs, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to administrators and users. +What more are you waiting for? Make game servers a first class citizen on your platform today. + +![Image](https://cdn.pterodactyl.io/site-assets/mockup-macbook-grey.png) ## Support & Documentation -Support for using Pterodactyl can be found on our [Documentation Website](https://docs.pterodactyl.io) or via our [Discord Chat](https://discord.gg/QRDZvVm). +Support for using Pterodactyl can be found on our [Documentation Website](https://docs.pterodactyl.io), [Guides Website](https://guides.pterodactyl.io), or via our [Discord Chat](https://discord.gg/QRDZvVm). + +### Supported Games +We support a huge variety of games by utilizing Docker containers to isolate each instance, giving you the power to host your games across the world without having to bloat each physical machine with additional dependencies. + +Some of our core supported games include: + +* Minecraft — including Spigot, Sponge, Bungeecord, Waterfall, and more +* Rust +* Terraria +* Teamspeak +* Mumble +* Team Fortress 2 +* Counter Strike: GO +* Garrys Mod +* Ark: Survival Evolved + +In addition to our standard nest of supported games, our community is constantly pushing the limits of this software and there are plenty more games available provided by the community. Some of these games include: + +* Factorio +* San Andreas: MP +* Pocketmine MP +* Squad +* FiveM +* Xonotic +* Discord ATLBot + +## Credits +A huge thank you to [PhraseApp](https://phraseapp.com) who provide us the software to help translate this project. This software would not be possible +without the work of other open-source authors who provide tools such as: + +[Ace Editor](https://ace.c9.io), [AdminLTE](https://almsaeedstudio.com), [Animate.css](http://daneden.github.io/animate.css/), [AnsiUp](https://github.com/drudru/ansi_up), [Async.js](https://github.com/caolan/async), +[Bootstrap](http://getbootstrap.com), [Bootstrap Notify](http://bootstrap-notify.remabledesigns.com), [Chart.js](http://www.chartjs.org), [FontAwesome](http://fontawesome.io), +[FontAwesome Animations](https://github.com/l-lin/font-awesome-animation), [jQuery](http://jquery.com), [Laravel](https://laravel.com), [Lodash](https://lodash.com), +[Select2](https://select2.github.io), [Socket.io](http://socket.io), [Socket.io File Upload](https://github.com/vote539/socketio-file-upload), [SweetAlert](http://t4t5.github.io/sweetalert), +[Typeahead](https://github.com/bassjobsen/Bootstrap-3-Typeahead), and [Particles.js](http://vincentgarreau.com/particles.js). + +Some Javascript and CSS used within the panel is licensed under a `MIT` or `Apache 2.0` license. Please check their respective header files for more information. ## License ``` -Copyright (c) 2015 - 2017 Dane Everitt . +Copyright (c) 2015 - 2018 Dane Everitt . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30,48 +70,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` - -### Credits -![](http://static.s3.pterodactyl.io/PhraseApp-parrot.png) -A huge thanks to [PhraseApp](https://phraseapp.com) who provide us the software to help translate this project. - -Ace Editor — [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) — [homepage](https://ace.c9.io) - -AdminLTE — [license](https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) — [homepage](https://almsaeedstudio.com) - -Animate.css — [license](https://github.com/daneden/animate.css/blob/master/LICENSE) — [homepage](http://daneden.github.io/animate.css/) - -AnsiUp — [license](https://github.com/drudru/ansi_up/blob/master/Readme.md#license) — [homepage](https://github.com/drudru/ansi_up) - -Async.js — [license](https://github.com/caolan/async/blob/master/LICENSE) — [homepage](https://github.com/caolan/async/) - -Bootstrap — [license](https://github.com/twbs/bootstrap/blob/master/LICENSE) — [homepage](http://getbootstrap.com) - -BootStrap Notify — [license](https://github.com/mouse0270/bootstrap-notify/blob/master/LICENSE) — [homepage](http://bootstrap-notify.remabledesigns.com) - -Chart.js — [license](https://github.com/chartjs/Chart.js/blob/master/LICENSE.md) — [homepage](http://www.chartjs.org) - -FontAwesome — [license](http://fontawesome.io/license/) — [homepage](http://fontawesome.io) - -FontAwesome Animations — [license](https://github.com/l-lin/font-awesome-animation#license) — [homepage](https://github.com/l-lin/font-awesome-animation) - -jQuery — [license](https://github.com/jquery/jquery/blob/master/LICENSE.txt) — [homepage](http://jquery.com) - -Laravel Framework — [license](https://github.com/laravel/framework/blob/5.4/LICENSE.md) — [homepage](https://laravel.com) - -Lodash — [license](https://github.com/lodash/lodash/blob/master/LICENSE) — [homepage](https://lodash.com/) - -Select2 — [license](https://github.com/select2/select2/blob/master/LICENSE.md) — [homepage](https://select2.github.io) - -Socket.io — [license](https://github.com/socketio/socket.io/blob/master/LICENSE) — [homepage](http://socket.io) - -Socket.io File Upload — [license](https://github.com/vote539/socketio-file-upload/blob/master/server.js#L1-L27) — [homepage](https://github.com/vote539/socketio-file-upload) - -SweetAlert — [license](https://github.com/t4t5/sweetalert/blob/master/LICENSE) — [homepage](http://t4t5.github.io/sweetalert/) - -Typeahead — [license](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.js) — [homepage](https://github.com/bassjobsen/Bootstrap-3-Typeahead) - -particles.js — [license](https://github.com/VincentGarreau/particles.js/blob/master/LICENSE.md) — [homepage](http://vincentgarreau.com/particles.js/) - -### Additional License Information -Some Javascript and CSS used within the panel is licensed under a `MIT` or `Apache 2.0`. Please check their respective header files for more information. diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index 997c2e396..6d0d2ecf3 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -76,6 +76,7 @@ class StoreServerRequest extends ApplicationApiRequest $data = parent::validated(); return [ + 'external_id' => array_get($data, 'external_id'), 'name' => array_get($data, 'name'), 'description' => array_get($data, 'description'), 'owner_id' => array_get($data, 'user'), diff --git a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php index 4b75138b9..aa585bad6 100644 --- a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php +++ b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php @@ -13,9 +13,10 @@ class UpdateServerDetailsRequest extends ServerWriteRequest */ public function rules(): array { - $rules = Server::getUpdateRulesForId($this->route()->parameter('server')->id); + $rules = Server::getUpdateRulesForId($this->getModel(Server::class)->id); return [ + 'external_id' => $rules['external_id'], 'name' => $rules['name'], 'user' => $rules['owner_id'], 'description' => array_merge(['nullable'], $rules['description']), @@ -31,6 +32,7 @@ class UpdateServerDetailsRequest extends ServerWriteRequest public function validated(): array { return [ + 'external_id' => $this->input('external_id'), 'name' => $this->input('name'), 'owner_id' => $this->input('user'), 'description' => $this->input('description'), diff --git a/app/Models/User.php b/app/Models/User.php index 10c710f19..aff4f3287 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -121,6 +121,7 @@ class User extends Model implements * @var array */ protected $attributes = [ + 'external_id' => null, 'root_admin' => false, 'language' => 'en', 'use_totp' => false, diff --git a/config/app.php b/config/app.php index bb4b66015..50ab9f19c 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => '0.7.2', + 'version' => '0.7.3', /* |-------------------------------------------------------------------------- diff --git a/database/migrations/2018_02_25_160152_remove_default_null_value_on_table.php b/database/migrations/2018_02_25_160152_remove_default_null_value_on_table.php new file mode 100644 index 000000000..6469867f2 --- /dev/null +++ b/database/migrations/2018_02_25_160152_remove_default_null_value_on_table.php @@ -0,0 +1,38 @@ +string('external_id')->default(null)->change(); + }); + + DB::transaction(function () { + DB::table('users')->where('external_id', '=', 'NULL')->update([ + 'external_id' => null, + ]); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // This should not be rolled back. + } +} diff --git a/database/migrations/2018_02_25_160604_define_unique_index_on_users_external_id.php b/database/migrations/2018_02_25_160604_define_unique_index_on_users_external_id.php new file mode 100644 index 000000000..0a9b8afe2 --- /dev/null +++ b/database/migrations/2018_02_25_160604_define_unique_index_on_users_external_id.php @@ -0,0 +1,32 @@ +index(['external_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropIndex(['external_id']); + }); + } +} diff --git a/resources/lang/de/server.php b/resources/lang/de/server.php index d207dc4ad..355802b5e 100644 --- a/resources/lang/de/server.php +++ b/resources/lang/de/server.php @@ -124,7 +124,7 @@ return [ 'title' => 'Send Console Command', 'description' => 'Der User darf die Konsole benutzen.', ], - 'view_sftp' => [ + 'access_sftp' => [ 'title' => 'SFTP erlaubt', 'description' => 'Ermöglicht dem Benutzer, eine Verbindung mit dem vom Daemon bereitgestellten SFTP-Server herzustellen.', ], diff --git a/resources/lang/en/server.php b/resources/lang/en/server.php index 0d266835a..cd89e1f85 100644 --- a/resources/lang/en/server.php +++ b/resources/lang/en/server.php @@ -128,7 +128,7 @@ return [ 'title' => 'Send Console Command', 'description' => 'Allows sending a command from the console. If the user does not have stop or restart permissions they cannot send the application\'s stop command.', ], - 'view_sftp' => [ + 'access_sftp' => [ 'title' => 'SFTP Allowed', 'description' => 'Allows user to connect to the SFTP server provided by the daemon.', ], diff --git a/resources/lang/es/server.php b/resources/lang/es/server.php index 41aca3558..1cbe4701a 100644 --- a/resources/lang/es/server.php +++ b/resources/lang/es/server.php @@ -124,7 +124,7 @@ return [ 'title' => 'Enviar Comandos De La Consola', 'description' => 'Permite el envío de un comando desde la consola. Si el usuario no tiene permiso para detener o reiniciar, no puede enviar el comando de detención de la aplicación.', ], - 'view_sftp' => [ + 'access_sftp' => [ 'title' => 'SFTP permitido', 'description' => 'Permite al usuario conectarse al servidor SFTP proporcionado por el daemon.', ], diff --git a/resources/themes/pterodactyl/admin/databases/view.blade.php b/resources/themes/pterodactyl/admin/databases/view.blade.php index db7db1c48..41a2d7901 100644 --- a/resources/themes/pterodactyl/admin/databases/view.blade.php +++ b/resources/themes/pterodactyl/admin/databases/view.blade.php @@ -79,8 +79,8 @@ diff --git a/resources/themes/pterodactyl/admin/eggs/variables.blade.php b/resources/themes/pterodactyl/admin/eggs/variables.blade.php index bd18e05cf..40ee82c8b 100644 --- a/resources/themes/pterodactyl/admin/eggs/variables.blade.php +++ b/resources/themes/pterodactyl/admin/eggs/variables.blade.php @@ -86,8 +86,8 @@ diff --git a/resources/themes/pterodactyl/admin/eggs/view.blade.php b/resources/themes/pterodactyl/admin/eggs/view.blade.php index 2e0fdcc83..c2f687799 100644 --- a/resources/themes/pterodactyl/admin/eggs/view.blade.php +++ b/resources/themes/pterodactyl/admin/eggs/view.blade.php @@ -31,7 +31,7 @@
-
+
Notice: Editing an Egg or any of the Process Management fields requires that each Daemon be rebooted in order to apply the changes.
@@ -159,14 +159,19 @@
+
+
+ Notice: Editing an Egg or any of the Process Management fields requires that each Daemon be rebooted in order to apply the changes. +
+
@endsection diff --git a/resources/themes/pterodactyl/admin/locations/view.blade.php b/resources/themes/pterodactyl/admin/locations/view.blade.php index fdb791754..2264ee694 100644 --- a/resources/themes/pterodactyl/admin/locations/view.blade.php +++ b/resources/themes/pterodactyl/admin/locations/view.blade.php @@ -39,8 +39,8 @@ diff --git a/resources/themes/pterodactyl/admin/packs/modal.blade.php b/resources/themes/pterodactyl/admin/packs/modal.blade.php index 2ce57f2b1..dbf2044e0 100644 --- a/resources/themes/pterodactyl/admin/packs/modal.blade.php +++ b/resources/themes/pterodactyl/admin/packs/modal.blade.php @@ -38,8 +38,8 @@ diff --git a/resources/themes/pterodactyl/admin/packs/view.blade.php b/resources/themes/pterodactyl/admin/packs/view.blade.php index 0f4a38e7b..e530bc9c4 100644 --- a/resources/themes/pterodactyl/admin/packs/view.blade.php +++ b/resources/themes/pterodactyl/admin/packs/view.blade.php @@ -98,8 +98,8 @@ diff --git a/resources/themes/pterodactyl/server/schedules/view.blade.php b/resources/themes/pterodactyl/server/schedules/view.blade.php index 87b15ad5f..370b4f0b0 100644 --- a/resources/themes/pterodactyl/server/schedules/view.blade.php +++ b/resources/themes/pterodactyl/server/schedules/view.blade.php @@ -122,14 +122,14 @@

@lang('server.schedule.task_help')

-
- -
{!! csrf_field() !!}
+
+ +