Merge branch 'next' into feat/disable-default-redirect
This commit is contained in:
@@ -39,6 +39,7 @@ class Navbar extends Component
|
||||
|
||||
return [
|
||||
"echo-private:user.{$userId},ServiceStatusChanged" => 'serviceStarted',
|
||||
"envsUpdated" => '$refresh',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class Show extends Component
|
||||
'env.is_literal' => 'required|boolean',
|
||||
'env.is_shown_once' => 'required|boolean',
|
||||
'env.real_value' => 'nullable',
|
||||
'env.is_required' => 'required|boolean',
|
||||
];
|
||||
|
||||
protected $validationAttributes = [
|
||||
@@ -46,6 +47,7 @@ class Show extends Component
|
||||
'env.is_multiline' => 'Multiline',
|
||||
'env.is_literal' => 'Literal',
|
||||
'env.is_shown_once' => 'Shown Once',
|
||||
'env.is_required' => 'Required',
|
||||
];
|
||||
|
||||
public function refresh()
|
||||
@@ -109,14 +111,14 @@ class Show extends Component
|
||||
} else {
|
||||
$this->validate();
|
||||
}
|
||||
// if (str($this->env->value)->startsWith('{{') && str($this->env->value)->endsWith('}}')) {
|
||||
// $type = str($this->env->value)->after('{{')->before('.')->value;
|
||||
// if (! collect(SHARED_VARIABLE_TYPES)->contains($type)) {
|
||||
// $this->dispatch('error', 'Invalid shared variable type.', 'Valid types are: team, project, environment.');
|
||||
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
if ($this->env->is_required && str($this->env->real_value)->isEmpty()) {
|
||||
$oldValue = $this->env->getOriginal('value');
|
||||
$this->env->value = $oldValue;
|
||||
$this->dispatch('error', 'Required environment variable cannot be empty.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->serialize();
|
||||
$this->env->save();
|
||||
$this->dispatch('success', 'Environment variable updated.');
|
||||
|
||||
@@ -245,7 +245,6 @@ class Form extends Component
|
||||
$newTimezone = $this->server->settings->server_timezone;
|
||||
if ($currentTimezone !== $newTimezone || $currentTimezone === '') {
|
||||
$this->server->settings->server_timezone = $newTimezone;
|
||||
$this->server->settings->save();
|
||||
}
|
||||
$this->server->settings->save();
|
||||
$this->server->save();
|
||||
@@ -255,14 +254,6 @@ class Form extends Component
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function updatedServerSettingsServerTimezone($value)
|
||||
{
|
||||
$this->server->settings->server_timezone = $value;
|
||||
$this->server->settings->save();
|
||||
$this->dispatch('success', 'Server timezone updated.');
|
||||
}
|
||||
|
||||
public function manualCleanup()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -28,6 +28,7 @@ class Index extends Component
|
||||
protected string $dynamic_config_path = '/data/coolify/proxy/dynamic';
|
||||
|
||||
protected Server $server;
|
||||
public $timezones;
|
||||
|
||||
protected $rules = [
|
||||
'settings.fqdn' => 'nullable',
|
||||
@@ -53,9 +54,9 @@ class Index extends Component
|
||||
'settings.is_auto_update_enabled' => 'Auto Update Enabled',
|
||||
'auto_update_frequency' => 'Auto Update Frequency',
|
||||
'update_check_frequency' => 'Update Check Frequency',
|
||||
'settings.instance_timezone' => 'Instance Timezone',
|
||||
];
|
||||
|
||||
public $timezones;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
@@ -170,12 +171,6 @@ class Index extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function updatedSettingsInstanceTimezone($value)
|
||||
{
|
||||
$this->settings->instance_timezone = $value;
|
||||
$this->settings->save();
|
||||
$this->dispatch('success', 'Instance timezone updated.');
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user