Merge branch 'develop' into feature/api-v1
This commit is contained in:
commit
8dcab927e5
10 changed files with 41 additions and 28 deletions
|
@ -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.
|
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||||
|
|
||||||
|
### v0.7.0-beta.5 (Derelict Dermodactylus)
|
||||||
|
### Fixed
|
||||||
|
* `[beta.4]` — Fixes some bad search and replace action that happened previously and was throwing errors when validating user permissions.
|
||||||
|
* `[beta.4]` — Fixes behavior of variable validation to not break the page when no rules are provided.
|
||||||
|
* `[beta.4]` — Fix bug preventing the editing of files in the file manager.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* Added support for editing symlinked files on the Panel.
|
||||||
|
|
||||||
## v0.7.0-beta.4 (Derelict Dermodactylus)
|
## v0.7.0-beta.4 (Derelict Dermodactylus)
|
||||||
### Fixed
|
### Fixed
|
||||||
* `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery.
|
* `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery.
|
||||||
|
|
|
@ -75,9 +75,3 @@ particles.js — [license](https://github.com/VincentGarreau/particles.js/blob/m
|
||||||
|
|
||||||
### Additional License Information
|
### 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.
|
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.
|
||||||
|
|
||||||
Some images used within Pterodactyl are Copyright (c) their respective owners.
|
|
||||||
|
|
||||||
`/public/themes/default/images/403.jpg` is licensed under a [CC BY 2.0](http://creativecommons.org/licenses/by/2.0/) by [BigTallGuy](http://flickr.com/photos/bigtallguy/)
|
|
||||||
|
|
||||||
`/public/themes/default/images/404.jpg` is licensed under a [CC BY-SA 2.0](http://creativecommons.org/licenses/by-sa/2.0/) by [nicsuzor](http://flickr.com/photos/nicsuzor/)
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ interface FileRepositoryInterface extends BaseRepositoryInterface
|
||||||
* Return the contents of a given file if it can be edited in the Panel.
|
* Return the contents of a given file if it can be edited in the Panel.
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @return \stdClass
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws \GuzzleHttp\Exception\RequestException
|
* @throws \GuzzleHttp\Exception\RequestException
|
||||||
*/
|
*/
|
||||||
public function getContent(string $path): stdClass;
|
public function getContent(string $path): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save new contents to a given file.
|
* Save new contents to a given file.
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Pterodactyl - Panel
|
|
||||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
||||||
*
|
|
||||||
* This software is licensed under the terms of the MIT license.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Pterodactyl\Http\Requests\Admin\Egg;
|
namespace Pterodactyl\Http\Requests\Admin\Egg;
|
||||||
|
|
||||||
|
@ -15,6 +8,8 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
||||||
class EggVariableFormRequest extends AdminFormRequest
|
class EggVariableFormRequest extends AdminFormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* Define rules for validation of this request.
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
|
@ -23,7 +18,7 @@ class EggVariableFormRequest extends AdminFormRequest
|
||||||
'name' => 'required|string|min:1|max:255',
|
'name' => 'required|string|min:1|max:255',
|
||||||
'description' => 'sometimes|nullable|string',
|
'description' => 'sometimes|nullable|string',
|
||||||
'env_variable' => 'required|regex:/^[\w]{1,255}$/|notIn:' . EggVariable::RESERVED_ENV_NAMES,
|
'env_variable' => 'required|regex:/^[\w]{1,255}$/|notIn:' . EggVariable::RESERVED_ENV_NAMES,
|
||||||
'default_value' => 'string',
|
'default_value' => 'nullable|string',
|
||||||
'options' => 'sometimes|required|array',
|
'options' => 'sometimes|required|array',
|
||||||
'rules' => 'bail|required|string',
|
'rules' => 'bail|required|string',
|
||||||
];
|
];
|
||||||
|
@ -41,6 +36,13 @@ class EggVariableFormRequest extends AdminFormRequest
|
||||||
$rules = $this->input('rules', $this->route()->parameter('egg')->rules);
|
$rules = $this->input('rules', $this->route()->parameter('egg')->rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If rules is not a string it is already violating the rule defined above
|
||||||
|
// so just skip the addition of default value rules since this request
|
||||||
|
// will fail anyways.
|
||||||
|
if (! is_string($rules)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$validator->addRules(['default_value' => $rules]);
|
$validator->addRules(['default_value' => $rules]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ class UpdateFileContentsFormRequest extends ServerFormRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $stats->file || ! in_array($stats->mime, $config->get('pterodactyl.files.editable'))) {
|
if ((! $stats->file && ! $stats->symlink) || ! in_array($stats->mime, $config->get('pterodactyl.files.editable'))) {
|
||||||
throw new FileTypeNotEditableException(trans('server.files.exceptions.invalid_mime'));
|
throw new FileTypeNotEditableException(trans('server.files.exceptions.invalid_mime'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ServerPolicy
|
||||||
})->values();
|
})->values();
|
||||||
});
|
});
|
||||||
|
|
||||||
return $permissions->setSearchTerm($permission, true) !== false;
|
return $permissions->search($permission, true) !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,11 +33,11 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
|
||||||
* Return the contents of a given file if it can be edited in the Panel.
|
* Return the contents of a given file if it can be edited in the Panel.
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @return \stdClass
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws \GuzzleHttp\Exception\RequestException
|
* @throws \GuzzleHttp\Exception\RequestException
|
||||||
*/
|
*/
|
||||||
public function getContent(string $path): stdClass
|
public function getContent(string $path): string
|
||||||
{
|
{
|
||||||
$file = pathinfo($path);
|
$file = pathinfo($path);
|
||||||
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
|
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
|
||||||
|
|
|
@ -65,7 +65,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
|
||||||
$instance = $this->getBuilder()->with('location')->withCount('servers');
|
$instance = $this->getBuilder()->with('location')->withCount('servers');
|
||||||
|
|
||||||
if ($this->hasSearchTerm()) {
|
if ($this->hasSearchTerm()) {
|
||||||
$instance->setSearchTerm($this->getSearchTerm());
|
$instance->search($this->getSearchTerm());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $instance->paginate(25, $this->getColumns());
|
return $instance->paginate(25, $this->getColumns());
|
||||||
|
|
|
@ -456,3 +456,11 @@ label.control-label > span.field-optional:before {
|
||||||
.pagination > li > a, .pagination > li > span {
|
.pagination > li > a, .pagination > li > span {
|
||||||
padding: 3px 10px !important;
|
padding: 3px 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.sidebar-collapse .main-header .logo {
|
||||||
|
overflow: hidden;
|
||||||
|
text-indent: 100%;
|
||||||
|
background-image: url('/favicons/favicon-32x32.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
|
@ -99,25 +99,25 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title">Create New Option Variable</h4>
|
<h4 class="modal-title">Create New Egg Variable</h4>
|
||||||
</div>
|
</div>
|
||||||
<form action="{{ route('admin.nests.egg.variables', $egg->id) }}" method="POST">
|
<form action="{{ route('admin.nests.egg.variables', $egg->id) }}" method="POST">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Name</label>
|
<label class="control-label">Name <span class="field-required"></span></label>
|
||||||
<input type="text" name="name" class="form-control" />
|
<input type="text" name="name" class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Description</label>
|
<label class="control-label">Description</label>
|
||||||
<textarea name="description" class="form-control" rows="3"></textarea>
|
<textarea name="description" class="form-control" rows="3"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label">Environment Variable</label>
|
<label class="control-label">Environment Variable <span class="field-required"></span></label>
|
||||||
<input type="text" name="env_variable" class="form-control" />
|
<input type="text" name="env_variable" class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label">Default Value</label>
|
<label class="control-label">Default Value</label>
|
||||||
<input type="text" name="default_value" class="form-control" />
|
<input type="text" name="default_value" class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
@ -125,14 +125,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Permissions</label>
|
<label class="control-label">Permissions</label>
|
||||||
<select name="options[]" class="pOptions form-control" multiple>
|
<select name="options[]" class="pOptions form-control" multiple>
|
||||||
<option value="user_viewable">Users Can View</option>
|
<option value="user_viewable">Users Can View</option>
|
||||||
<option value="user_editable">Users Can Edit</option>
|
<option value="user_editable">Users Can Edit</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Input Rules</label>
|
<label class="control-label">Input Rules <span class="field-required"></span></label>
|
||||||
<input type="text" name="rules" class="form-control" value="required|string|max:20" placeholder="required|string|max:20" />
|
<input type="text" name="rules" class="form-control" value="required|string|max:20" placeholder="required|string|max:20" />
|
||||||
<p class="text-muted small">These rules are defined using standard Laravel Framework validation rules.</p>
|
<p class="text-muted small">These rules are defined using standard Laravel Framework validation rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue