do not use Rule (deprecated), changed to Validate
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
namespace App\Livewire\Project;
|
||||
|
||||
use App\Models\Project;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class AddEmpty extends Component
|
||||
{
|
||||
#[Rule(['required', 'string', 'min:3'])]
|
||||
#[Validate(['required', 'string', 'min:3'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public string $description = '';
|
||||
|
||||
public function submit()
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Livewire\Project\Application\Preview;
|
||||
|
||||
use App\Models\Application;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Component;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
@@ -11,7 +10,7 @@ class Form extends Component
|
||||
{
|
||||
public Application $application;
|
||||
|
||||
#[Rule('required')]
|
||||
#[Validate('required')]
|
||||
public string $previewUrlTemplate;
|
||||
|
||||
public function mount()
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace App\Livewire\Project\Application;
|
||||
use App\Models\Application;
|
||||
use App\Models\PrivateKey;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class Source extends Component
|
||||
@@ -15,19 +15,19 @@ class Source extends Component
|
||||
#[Locked]
|
||||
public $privateKeys;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $privateKeyName = null;
|
||||
|
||||
#[Rule(['nullable', 'integer'])]
|
||||
#[Validate(['nullable', 'integer'])]
|
||||
public ?int $privateKeyId = null;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $gitRepository;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $gitBranch;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $gitCommitSha = null;
|
||||
|
||||
public function mount()
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
namespace App\Livewire\Project\Application;
|
||||
|
||||
use App\Models\Application;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class Swarm extends Component
|
||||
{
|
||||
public Application $application;
|
||||
|
||||
#[Rule('required')]
|
||||
#[Validate('required')]
|
||||
public int $swarmReplicas;
|
||||
|
||||
#[Rule(['nullable'])]
|
||||
#[Validate(['nullable'])]
|
||||
public ?string $swarmPlacementConstraints = null;
|
||||
|
||||
#[Rule('required')]
|
||||
#[Validate('required')]
|
||||
public bool $isSwarmOnlyWorkerNodes;
|
||||
|
||||
public function mount()
|
||||
|
||||
@@ -8,7 +8,7 @@ use Exception;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
@@ -22,37 +22,37 @@ class BackupEdit extends Component
|
||||
#[Locked]
|
||||
public $parameters;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $delete_associated_backups_locally = false;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $delete_associated_backups_s3 = false;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $delete_associated_backups_sftp = false;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $status = null;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $backupEnabled = false;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $frequency = '';
|
||||
|
||||
#[Rule(['required', 'integer', 'min:1'])]
|
||||
#[Validate(['required', 'integer', 'min:1'])]
|
||||
public int $numberOfBackupsLocally = 1;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $saveS3 = false;
|
||||
|
||||
#[Rule(['required', 'integer'])]
|
||||
#[Validate(['required', 'integer'])]
|
||||
public int $s3StorageId = 1;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $databasesToBackup = null;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $dumpAll = false;
|
||||
|
||||
public function mount()
|
||||
|
||||
@@ -8,7 +8,7 @@ use App\Models\Server;
|
||||
use App\Models\StandaloneClickhouse;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class General extends Component
|
||||
@@ -17,40 +17,40 @@ class General extends Component
|
||||
|
||||
public StandaloneClickhouse $database;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $description = null;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $clickhouseAdminUser;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $clickhouseAdminPassword;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $image;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $portsMappings = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public ?bool $isPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'integer'])]
|
||||
#[Validate(['nullable', 'integer'])]
|
||||
public ?int $publicPort = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $customDockerRunOptions = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrl = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrlPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public bool $isLogDrainEnabled = false;
|
||||
|
||||
public function getListeners()
|
||||
|
||||
@@ -5,15 +5,15 @@ namespace App\Livewire\Project\Database;
|
||||
use App\Models\ScheduledDatabaseBackup;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class CreateScheduledBackup extends Component
|
||||
{
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public $frequency;
|
||||
|
||||
#[Rule(['required', 'boolean'])]
|
||||
#[Validate(['required', 'boolean'])]
|
||||
public bool $saveToS3 = false;
|
||||
|
||||
#[Locked]
|
||||
@@ -21,7 +21,7 @@ class CreateScheduledBackup extends Component
|
||||
|
||||
public bool $enabled = true;
|
||||
|
||||
#[Rule(['required', 'integer'])]
|
||||
#[Validate(['required', 'integer'])]
|
||||
public int $s3StorageId;
|
||||
|
||||
public Collection $definedS3s;
|
||||
|
||||
@@ -8,7 +8,7 @@ use App\Models\Server;
|
||||
use App\Models\StandaloneDragonfly;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class General extends Component
|
||||
@@ -17,37 +17,37 @@ class General extends Component
|
||||
|
||||
public StandaloneDragonfly $database;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $description = null;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $dragonflyPassword;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $image;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $portsMappings = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public ?bool $isPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'integer'])]
|
||||
#[Validate(['nullable', 'integer'])]
|
||||
public ?int $publicPort = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $customDockerRunOptions = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrl = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrlPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public bool $isLogDrainEnabled = false;
|
||||
|
||||
public function getListeners()
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace App\Livewire\Project\Database;
|
||||
|
||||
use Exception;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class InitScript extends Component
|
||||
@@ -15,10 +15,10 @@ class InitScript extends Component
|
||||
#[Locked]
|
||||
public int $index;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $filename = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $content = null;
|
||||
|
||||
public function mount()
|
||||
|
||||
@@ -8,7 +8,7 @@ use App\Models\Server;
|
||||
use App\Models\StandaloneKeydb;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class General extends Component
|
||||
@@ -17,40 +17,40 @@ class General extends Component
|
||||
|
||||
public StandaloneKeydb $database;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $description = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $keydbConf = null;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $keydbPassword;
|
||||
|
||||
#[Rule(['required', 'string'])]
|
||||
#[Validate(['required', 'string'])]
|
||||
public string $image;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $portsMappings = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public ?bool $isPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'integer'])]
|
||||
#[Validate(['nullable', 'integer'])]
|
||||
public ?int $publicPort = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $customDockerRunOptions = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrl = null;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $dbUrlPublic = null;
|
||||
|
||||
#[Rule(['nullable', 'boolean'])]
|
||||
#[Validate(['nullable', 'boolean'])]
|
||||
public bool $isLogDrainEnabled = false;
|
||||
|
||||
public function getListeners()
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
namespace App\Livewire\Project;
|
||||
|
||||
use App\Models\Project;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class Edit extends Component
|
||||
{
|
||||
public Project $project;
|
||||
|
||||
#[Rule(['required', 'string', 'min:3', 'max:255'])]
|
||||
#[Validate(['required', 'string', 'min:3', 'max:255'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string', 'max:255'])]
|
||||
#[Validate(['nullable', 'string', 'max:255'])]
|
||||
public ?string $description = null;
|
||||
|
||||
public function mount(string $project_uuid)
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace App\Livewire\Project;
|
||||
use App\Models\Application;
|
||||
use App\Models\Project;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class EnvironmentEdit extends Component
|
||||
@@ -17,10 +17,10 @@ class EnvironmentEdit extends Component
|
||||
#[Locked]
|
||||
public $environment;
|
||||
|
||||
#[Rule(['required', 'string', 'min:3', 'max:255'])]
|
||||
#[Validate(['required', 'string', 'min:3', 'max:255'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string', 'max:255'])]
|
||||
#[Validate(['nullable', 'string', 'max:255'])]
|
||||
public ?string $description = null;
|
||||
|
||||
public function mount(string $project_uuid, string $environment_name)
|
||||
|
||||
@@ -4,17 +4,17 @@ namespace App\Livewire\Project;
|
||||
|
||||
use App\Models\Environment;
|
||||
use App\Models\Project;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public Project $project;
|
||||
|
||||
#[Rule(['required', 'string', 'min:3'])]
|
||||
#[Validate(['required', 'string', 'min:3'])]
|
||||
public string $name;
|
||||
|
||||
#[Rule(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'string'])]
|
||||
public ?string $description = null;
|
||||
|
||||
public function mount(string $project_uuid)
|
||||
|
||||
Reference in New Issue
Block a user