mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-25 10:32:31 +01:00
Minor fixes
This commit is contained in:
parent
4a43c53e07
commit
82b3cbc246
11
CHANGELOG.md
11
CHANGELOG.md
@ -3,6 +3,17 @@ 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.6.0-pre.6 (Courageous Carniadactylus)
|
||||
### Fixed
|
||||
* `[pre.5]` — Console based server rebuild tool now actually rebuilds the servers with the correct information.
|
||||
* `[pre.5]` — Fixes typo and wrong docker contaienr for certain applications.
|
||||
|
||||
### Changed
|
||||
* Removed all old theme JS and CSS folders to cleanup and avoid confusion in the future.
|
||||
|
||||
### Added
|
||||
* `[pre.5]` — Added foreign key to `pack_id` to ensure nothing eds up breaking there.
|
||||
|
||||
## v0.6.0-pre.5 (Courageous Carniadactylus)
|
||||
### Changed
|
||||
* New theme applied to Admin CP. Many graphical changes were made, some data was moved around and some display data changed. Too much was changed to feasibly log it all in here. Major breaking changes or notable new features will be logged.
|
||||
|
@ -65,16 +65,18 @@ class RebuildServer extends Command
|
||||
public function handle()
|
||||
{
|
||||
if ($this->option('all')) {
|
||||
$servers = Server::with('node', 'option.variables')->get();
|
||||
$servers = Server::all();
|
||||
} elseif ($this->option('node')) {
|
||||
$servers = Server::with('node', 'option.variables')->where('node_id', $this->option('node'))->get();
|
||||
$servers = Server::where('node_id', $this->option('node'))->get();
|
||||
} elseif ($this->option('server')) {
|
||||
$servers = Server::with('node', 'option.variables')->where('id', $this->option('server'))->get();
|
||||
$servers = Server::where('id', $this->option('server'))->get();
|
||||
} else {
|
||||
$this->error('You must pass a flag to determine which server(s) to rebuild.');
|
||||
return;
|
||||
}
|
||||
|
||||
$servers->load('node', 'service', 'option.variables', 'pack');
|
||||
|
||||
$this->line('Beginning processing, do not exit this script.');
|
||||
$bar = $this->output->createProgressBar(count($servers));
|
||||
$results = collect([]);
|
||||
@ -98,6 +100,11 @@ class RebuildServer extends Command
|
||||
'image' => $server->image,
|
||||
'env|overwrite' => $environment->pluck('value', 'variable')->merge(['STARTUP' => $server->startup]),
|
||||
],
|
||||
'service' => [
|
||||
'type' => $server->service->folder,
|
||||
'option' => $server->option->tag,
|
||||
'pack' => ! is_null($server->pack) ? $server->pack->uuid : null,
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddForeignKeyToPacks extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->foreign('pack_id')->references('id')->on('packs');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropForeign(['pack_id']);
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user