pelican-panel-mirror/app/Http/Requests/Api/Application/Nodes/GetDeployableNodesRequest.php
Boy132 4dd833562b
Add CPU limit to node (#239) to resolve #233
* add node cpu limit to backend

* update makenodecommand

* add node cpu limit to frontend

* add migration and update mysql schema

* run pint

* fix typo in mysql schema

* forgot this assert

* forgot to setCpu here

* run pint

* adjust migration

* Fix db migration

* make cpu optional

* set default value for cpu in node deployment

* update mysql schema

---------

Co-authored-by: notCharles <charles@pelican.dev>
2024-05-22 02:34:43 -04:00

17 lines
373 B
PHP

<?php
namespace App\Http\Requests\Api\Application\Nodes;
class GetDeployableNodesRequest extends GetNodesRequest
{
public function rules(): array
{
return [
'page' => 'integer',
'memory' => 'required|integer|min:0',
'disk' => 'required|integer|min:0',
'cpu' => 'sometimes|integer|min:0',
];
}
}