Skip to content

Commit d4e331c

Browse files
committed
Merge branch 'develop' into feature/client-api
2 parents 4c41bd9 + a765e0d commit d4e331c

File tree

13 files changed

+106
-28
lines changed

13 files changed

+106
-28
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ This file is a running track of new features and fixes to each version of the pa
33

44
This project follows [Semantic Versioning](http://semver.org) guidelines.
55

6+
## v0.7.4 (Derelict Dermodactylus)
7+
### Fixed
8+
* Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues.
9+
610
## v0.7.3 (Derelict Dermodactylus)
711
### Fixed
812
* Fixes server creation API endpoint not passing the provided `external_id` to the creation service.
13+
* Fixes a bug causing users to be un-editable on new installations once more than one user exists.
14+
* Fixes default order of buttons in certain parts of the panel that would default to 'Delete' rather than 'Save' when pressing enter.
915

1016
### Added
1117
* Adds ability to modify the external ID for a server through the API.

app/Models/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ class User extends Model implements
121121
* @var array
122122
*/
123123
protected $attributes = [
124+
'external_id' => null,
124125
'root_admin' => false,
125126
'language' => 'en',
126127
'use_totp' => false,

app/Services/Servers/ReinstallServerService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function reinstall($server)
6666
$this->database->beginTransaction();
6767
$this->repository->withoutFreshModel()->update($server->id, [
6868
'installed' => 0,
69-
]);
69+
], true, true);
7070

7171
try {
7272
$this->daemonServerRepository->setServer($server)->reinstall();
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\DB;
4+
use Illuminate\Support\Facades\Schema;
5+
use Illuminate\Database\Schema\Blueprint;
6+
use Illuminate\Database\Migrations\Migration;
7+
8+
class RemoveDefaultNullValueOnTable extends Migration
9+
{
10+
/**
11+
* Run the migrations.
12+
*
13+
* @throws \Exception
14+
* @throws \Throwable
15+
*/
16+
public function up()
17+
{
18+
Schema::table('users', function (Blueprint $table) {
19+
$table->string('external_id')->default(null)->change();
20+
});
21+
22+
DB::transaction(function () {
23+
DB::table('users')->where('external_id', '=', 'NULL')->update([
24+
'external_id' => null,
25+
]);
26+
});
27+
}
28+
29+
/**
30+
* Reverse the migrations.
31+
*
32+
* @return void
33+
*/
34+
public function down()
35+
{
36+
// This should not be rolled back.
37+
}
38+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class DefineUniqueIndexOnUsersExternalId extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::table('users', function (Blueprint $table) {
17+
$table->index(['external_id']);
18+
});
19+
}
20+
21+
/**
22+
* Reverse the migrations.
23+
*
24+
* @return void
25+
*/
26+
public function down()
27+
{
28+
Schema::table('users', function (Blueprint $table) {
29+
$table->dropIndex(['external_id']);
30+
});
31+
}
32+
}

resources/themes/pterodactyl/admin/databases/view.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
</div>
8080
<div class="box-footer">
8181
{!! csrf_field() !!}
82-
<button name="_method" value="DELETE" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>
8382
<button name="_method" value="PATCH" class="btn btn-sm btn-primary pull-right">Save</button>
83+
<button name="_method" value="DELETE" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>
8484
</div>
8585
</div>
8686
</div>

resources/themes/pterodactyl/admin/eggs/variables.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
</div>
8787
<div class="box-footer">
8888
{!! csrf_field() !!}
89-
<button class="btn btn-sm btn-danger pull-left muted muted-hover" data-action="delete" name="_method" value="DELETE" type="submit"><i class="fa fa-trash-o"></i></button>
9089
<button class="btn btn-sm btn-primary pull-right" name="_method" value="PATCH" type="submit">Save</button>
90+
<button class="btn btn-sm btn-danger pull-left muted muted-hover" data-action="delete" name="_method" value="DELETE" type="submit"><i class="fa fa-trash-o"></i></button>
9191
</div>
9292
</form>
9393
</div>

resources/themes/pterodactyl/admin/eggs/view.blade.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</div>
3232
</div>
3333
<div class="col-xs-12">
34-
<div class="callout callout-info">
34+
<div class="alert alert-info">
3535
<strong>Notice:</strong> Editing an Egg or any of the Process Management fields <em>requires</em> that each Daemon be rebooted in order to apply the changes.
3636
</div>
3737
</div>
@@ -159,14 +159,19 @@
159159
</div>
160160
<div class="box-footer">
161161
{!! csrf_field() !!}
162+
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Save</button>
163+
<a href="{{ route('admin.nests.egg.export', ['option' => $egg->id]) }}" class="btn btn-sm btn-info pull-right" style="margin-right:10px;">Export</a>
162164
<button id="deleteButton" type="submit" name="_method" value="DELETE" class="btn btn-danger btn-sm muted muted-hover">
163165
<i class="fa fa-trash-o"></i>
164166
</button>
165-
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm pull-right">Save</button>
166-
<a href="{{ route('admin.nests.egg.export', ['option' => $egg->id]) }}" class="btn btn-sm btn-info pull-right" style="margin-right:10px;">Export</a>
167167
</div>
168168
</div>
169169
</div>
170+
<div class="col-xs-12">
171+
<div class="alert alert-info">
172+
<strong>Notice:</strong> Editing an Egg or any of the Process Management fields <em>requires</em> that each Daemon be rebooted in order to apply the changes.
173+
</div>
174+
</div>
170175
</div>
171176
</form>
172177
@endsection

resources/themes/pterodactyl/admin/locations/view.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<div class="box-footer">
4040
{!! csrf_field() !!}
4141
{!! method_field('PATCH') !!}
42-
<button name="action" value="delete" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>
4342
<button name="action" value="edit" class="btn btn-sm btn-primary pull-right">Save</button>
43+
<button name="action" value="delete" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>
4444
</div>
4545
</form>
4646
</div>

resources/themes/pterodactyl/admin/packs/modal.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</div>
3939
<div class="modal-footer">
4040
{!! csrf_field() !!}
41-
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
4241
<button type="submit" name="action" value="from_template" class="btn btn-primary btn-sm">Install</button>
42+
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
4343
</div>
4444
</form>
4545
</div>

0 commit comments

Comments
 (0)