forked from Alex/Pterodactyl-Panel
Minor visual tweaking and filemanager backend improvements.
This commit is contained in:
parent
ee309b095e
commit
de0b9beacb
@ -7,6 +7,10 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
|||||||
### Fixed
|
### Fixed
|
||||||
* `[rc.1]` — Server deletion is fixed, caused by removed download table.
|
* `[rc.1]` — Server deletion is fixed, caused by removed download table.
|
||||||
* `[rc.1]` — Server status indication on front-end no longer shows `Error` when server is marked as installing or suspended.
|
* `[rc.1]` — Server status indication on front-end no longer shows `Error` when server is marked as installing or suspended.
|
||||||
|
* `[rc.1]` — Fixes issues with SteamCMD not registering and installing games properly.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Panel now sends all non-default allocations as `ALLOC_#__IP` and `ALLOC_#__PORT` to the daemon, as well as the location.
|
||||||
|
|
||||||
## v0.6.0-rc.1 (Courageous Carniadactylus)
|
## v0.6.0-rc.1 (Courageous Carniadactylus)
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -64,7 +64,7 @@ class BaseController extends Controller
|
|||||||
{
|
{
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'company' => 'required|between:1,256',
|
'company' => 'required|between:1,256',
|
||||||
'default_language' => 'required|alpha_dash|min:2|max:5',
|
// 'default_language' => 'required|alpha_dash|min:2|max:5',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
@ -72,7 +72,7 @@ class BaseController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
Settings::set('company', $request->input('company'));
|
Settings::set('company', $request->input('company'));
|
||||||
Settings::set('default_language', $request->input('default_language'));
|
// Settings::set('default_language', $request->input('default_language'));
|
||||||
|
|
||||||
Alert::success('Settings have been successfully updated.')->flash();
|
Alert::success('Settings have been successfully updated.')->flash();
|
||||||
|
|
||||||
|
@ -124,10 +124,17 @@ class NodesController extends Controller
|
|||||||
DB::raw('SUM(memory) as memory, SUM(disk) as disk')
|
DB::raw('SUM(memory) as memory, SUM(disk) as disk')
|
||||||
)->where('node_id', $node->id)->first()
|
)->where('node_id', $node->id)->first()
|
||||||
)->mapWithKeys(function ($item, $key) use ($node) {
|
)->mapWithKeys(function ($item, $key) use ($node) {
|
||||||
$percent = ($item / $node->{$key}) * 100;
|
if ($node->{$key . '_overallocate'} > 0) {
|
||||||
|
$withover = $node->{$key} * (1 + ($node->{$key . '_overallocate'} / 100));
|
||||||
|
} else {
|
||||||
|
$withover = $node->{$key};
|
||||||
|
}
|
||||||
|
|
||||||
|
$percent = ($item / $withover) * 100;
|
||||||
|
|
||||||
return [$key => [
|
return [$key => [
|
||||||
'value' => $item,
|
'value' => number_format($item),
|
||||||
|
'max' => number_format($withover),
|
||||||
'percent' => $percent,
|
'percent' => $percent,
|
||||||
'css' => ($percent <= 75) ? 'green' : (($percent > 90) ? 'red' : 'yellow'),
|
'css' => ($percent <= 75) ? 'green' : (($percent > 90) ? 'red' : 'yellow'),
|
||||||
]];
|
]];
|
||||||
|
@ -144,12 +144,21 @@ class FileRepository
|
|||||||
throw new Exception('A valid directory must be specified in order to list its contents.');
|
throw new Exception('A valid directory must be specified in order to list its contents.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = $this->server->guzzleClient()->request('GET', '/server/directory/' . rawurlencode($directory));
|
try {
|
||||||
|
$res = $this->server->guzzleClient()->request('GET', '/server/directory/' . rawurlencode($directory));
|
||||||
|
} catch(\GuzzleHttp\Exception\ClientException $ex) {
|
||||||
|
$json = json_decode($ex->getResponse()->getBody());
|
||||||
|
|
||||||
|
throw new DisplayException($json->error);
|
||||||
|
} catch (\GuzzleHttp\Exception\ServerException $ex) {
|
||||||
|
throw new DisplayException('A remote server error was encountered while attempting to display this directory.');
|
||||||
|
} catch (\GuzzleHttp\Exception\ConnectException $ex) {
|
||||||
|
throw new DisplayException('A ConnectException was encountered: unable to contact daemon.');
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
throw $ex;
|
||||||
|
}
|
||||||
|
|
||||||
$json = json_decode($res->getBody());
|
$json = json_decode($res->getBody());
|
||||||
if ($res->getStatusCode() !== 200) {
|
|
||||||
throw new DisplayException('An error occured while attempting to save this file. ' . $res->getBody());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Iterate through results
|
// Iterate through results
|
||||||
$files = [];
|
$files = [];
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -62,7 +62,7 @@ class FileManager {
|
|||||||
swal({
|
swal({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
title: 'File Error',
|
title: 'File Error',
|
||||||
text: 'An error occured while attempting to process this request. Please try again.',
|
text: jqXHR.responseText || 'An error occured while attempting to process this request. Please try again.',
|
||||||
});
|
});
|
||||||
console.error(jqXHR);
|
console.error(jqXHR);
|
||||||
});
|
});
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
<span class="info-box-icon"><i class="ion ion-ios-folder-outline"></i></span>
|
<span class="info-box-icon"><i class="ion ion-ios-folder-outline"></i></span>
|
||||||
<div class="info-box-content" style="padding: 15px 10px 0;">
|
<div class="info-box-content" style="padding: 15px 10px 0;">
|
||||||
<span class="info-box-text">Disk Space Allocated</span>
|
<span class="info-box-text">Disk Space Allocated</span>
|
||||||
<span class="info-box-number">{{ $stats['disk']['value'] }} Mb</span>
|
<span class="info-box-number">{{ $stats['disk']['value'] }} / {{ $stats['disk']['max'] }} Mb</span>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar" style="width: {{ $stats['disk']['percent'] }}%"></div>
|
<div class="progress-bar" style="width: {{ $stats['disk']['percent'] }}%"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<span class="info-box-icon"><i class="ion ion-ios-barcode-outline"></i></span>
|
<span class="info-box-icon"><i class="ion ion-ios-barcode-outline"></i></span>
|
||||||
<div class="info-box-content" style="padding: 15px 10px 0;">
|
<div class="info-box-content" style="padding: 15px 10px 0;">
|
||||||
<span class="info-box-text">Memory Allocated</span>
|
<span class="info-box-text">Memory Allocated</span>
|
||||||
<span class="info-box-number">{{ $stats['memory']['value'] }} Mb</span>
|
<span class="info-box-number">{{ $stats['memory']['value'] }} / {{ $stats['memory']['max'] }} Mb</span>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar" style="width: {{ $stats['memory']['percent'] }}%"></div>
|
<div class="progress-bar" style="width: {{ $stats['memory']['percent'] }}%"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<p class="text-muted"><small>This is the name that is used throughout the panel and in emails sent to clients.</small></p>
|
<p class="text-muted"><small>This is the name that is used throughout the panel and in emails sent to clients.</small></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
{{-- <div class="form-group col-md-6">
|
||||||
<label class="control-label">Default Language:</label>
|
<label class="control-label">Default Language:</label>
|
||||||
<div>
|
<div>
|
||||||
<select name="default_language" class="form-control">
|
<select name="default_language" class="form-control">
|
||||||
@ -65,7 +65,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<p class="text-muted"><small>This is the default language that all clients will use unless they manually change it.</small></p>
|
<p class="text-muted"><small>This is the default language that all clients will use unless they manually change it.</small></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
<th>Email</td>
|
<th>Email</td>
|
||||||
<th>Client Name</th>
|
<th>Client Name</th>
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
|
<th class="text-center">2FA</th>
|
||||||
<th class="text-center" data-toggle="tooltip" data-placement="top" title="Servers that this user is marked as the owner of.">Servers Owned</th>
|
<th class="text-center" data-toggle="tooltip" data-placement="top" title="Servers that this user is marked as the owner of.">Servers Owned</th>
|
||||||
<th class="text-center" data-toggle="tooltip" data-placement="top" title="Servers that this user can access because they are marked as a subuser.">Can Access</th>
|
<th class="text-center" data-toggle="tooltip" data-placement="top" title="Servers that this user can access because they are marked as a subuser.">Can Access</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -69,9 +70,18 @@
|
|||||||
<td><a href="{{ route('admin.users.view', $user->id) }}">{{ $user->email }}</a></td>
|
<td><a href="{{ route('admin.users.view', $user->id) }}">{{ $user->email }}</a></td>
|
||||||
<td>{{ $user->name_last }}, {{ $user->name_first }}</td>
|
<td>{{ $user->name_last }}, {{ $user->name_first }}</td>
|
||||||
<td>{{ $user->username }}</td>
|
<td>{{ $user->username }}</td>
|
||||||
<td class="text-center">{{ $user->servers_count }}</td>
|
<td class="text-center">
|
||||||
|
@if($user->use_totp)
|
||||||
|
<i class="fa fa-lock text-green"></i>
|
||||||
|
@else
|
||||||
|
<i class="fa fa-unlock text-red"></i>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<a href="{{ route('admin.servers', ['query' => $user->email]) }}">{{ $user->servers_count }}</a>
|
||||||
|
</td>
|
||||||
<td class="text-center">{{ $user->subuser_of_count }}</td>
|
<td class="text-center">{{ $user->subuser_of_count }}</td>
|
||||||
<td class="text-center"><img src="https://www.gravatar.com/avatar/{{ md5(strtolower($user->email)) }}?s=20" class="img-circle" /></td>
|
<td class="text-center"><img src="https://www.gravatar.com/avatar/{{ md5(strtolower($user->email)) }}?s=100" style="height:20px;" class="img-circle" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user