Finish front-end server modification changes.

Everything is back to the point that it was before this massive code overhaul began. FInal steps before merging this into develop will be some unit tests.
This commit is contained in:
Dane Everitt 2017-10-25 22:33:28 -05:00
parent 5fb4b2cdcf
commit 508ff8cfb3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
13 changed files with 315 additions and 198 deletions

View file

@ -9,6 +9,16 @@
namespace Pterodactyl\Contracts\Repository;
use Illuminate\Support\Collection;
interface EggVariableRepositoryInterface extends RepositoryInterface
{
/**
* Return editable variables for a given egg. Editable variables must be set to
* user viewable in order to be picked up by this function.
*
* @param int $egg
* @return \Illuminate\Support\Collection
*/
public function getEditableVariables(int $egg): Collection;
}

View file

@ -9,6 +9,7 @@
namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\Server;
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
interface ServerRepositoryInterface extends RepositoryInterface, SearchableInterface
@ -52,6 +53,19 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
*/
public function getVariablesWithValues($id, $returnAsObject = false);
/**
* Get the primary allocation for a given server. If a model is passed into
* the function, load the allocation relationship onto it. Otherwise, find and
* return the server from the database.
*
* @param int|\Pterodactyl\Models\Server $server
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getPrimaryAllocation($server, bool $refresh = false): Server;
/**
* Return enough data to be used for the creation of a server via the daemon.
*