mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 08:34:45 +02:00
backwards compatibility
This commit is contained in:
parent
92d167eb10
commit
5aa7128b9c
@ -40,6 +40,10 @@ class BuildModificationService
|
|||||||
throw_unless($existingAllocation, new DisplayException('The requested default allocation is not currently assigned to this server.'));
|
throw_unless($existingAllocation, new DisplayException('The requested default allocation is not currently assigned to this server.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isset($data['oom_killer']) && isset($data['oom_disabled'])) {
|
||||||
|
$data['oom_killer'] = !$data['oom_disabled'];
|
||||||
|
}
|
||||||
|
|
||||||
// If any of these values are passed through in the data array go ahead and set them correctly on the server model.
|
// If any of these values are passed through in the data array go ahead and set them correctly on the server model.
|
||||||
$merge = Arr::only($data, ['oom_killer', 'memory', 'swap', 'io', 'cpu', 'threads', 'disk', 'allocation_id']);
|
$merge = Arr::only($data, ['oom_killer', 'memory', 'swap', 'io', 'cpu', 'threads', 'disk', 'allocation_id']);
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@ class ServerCreationService
|
|||||||
*/
|
*/
|
||||||
public function handle(array $data, DeploymentObject $deployment = null): Server
|
public function handle(array $data, DeploymentObject $deployment = null): Server
|
||||||
{
|
{
|
||||||
|
if(!isset($data['oom_killer']) && isset($data['oom_disabled'])) {
|
||||||
|
$data['oom_killer'] = !$data['oom_disabled'];
|
||||||
|
}
|
||||||
|
|
||||||
// If a deployment object has been passed we need to get the allocation
|
// If a deployment object has been passed we need to get the allocation
|
||||||
// that the server should use, and assign the node from that allocation.
|
// that the server should use, and assign the node from that allocation.
|
||||||
if ($deployment instanceof DeploymentObject) {
|
if ($deployment instanceof DeploymentObject) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user