Begin working on administrative server view changes
Also includes tests for the DatabaseCreation service.
This commit is contained in:
parent
0c513f24d5
commit
580e5ac569
18 changed files with 584 additions and 135 deletions
|
@ -34,4 +34,12 @@ interface AllocationRepositoryInterface extends RepositoryInterface
|
|||
* @return int
|
||||
*/
|
||||
public function assignAllocationsToServer($server, array $ids);
|
||||
|
||||
/**
|
||||
* Return all of the allocations for a specific node.
|
||||
*
|
||||
* @param int $node
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getAllocationsForNode($node);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
* @param int $id
|
||||
* @param array $overrides
|
||||
* @param bool $start
|
||||
* @return mixed
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function create($id, $overrides = [], $start = false);
|
||||
}
|
||||
|
|
|
@ -28,5 +28,11 @@ use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
|
|||
|
||||
interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterface
|
||||
{
|
||||
//
|
||||
/**
|
||||
* Return a collection of nodes beloning to a specific location for use on frontend display.
|
||||
*
|
||||
* @param int $location
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNodesForLocation($location);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function findWithVariables($id);
|
||||
|
||||
|
@ -49,7 +51,30 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
* default if there is no value defined for the specific server requested.
|
||||
*
|
||||
* @param int $id
|
||||
* @return array
|
||||
* @param bool $returnAsObject
|
||||
* @return array|object
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getVariablesWithValues($id);
|
||||
public function getVariablesWithValues($id, $returnAsObject = false);
|
||||
|
||||
/**
|
||||
* Return enough data to be used for the creation of a server via the daemon.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getDataForCreation($id);
|
||||
|
||||
/**
|
||||
* Return a server as well as associated databases and their hosts.
|
||||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithDatabases($id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue