fix: better parsign performance for huge compose files
fix: env parsing
This commit is contained in:
@@ -11,7 +11,7 @@ class EditCompose extends Component
|
||||
|
||||
public $serviceId;
|
||||
|
||||
protected $listeners = ['refreshEnvs' => 'mount'];
|
||||
protected $listeners = ['refreshEnvs', 'envsUpdated'];
|
||||
|
||||
protected $rules = [
|
||||
'service.docker_compose_raw' => 'required',
|
||||
@@ -19,6 +19,17 @@ class EditCompose extends Component
|
||||
'service.is_container_label_escape_enabled' => 'required',
|
||||
];
|
||||
|
||||
public function envsUpdated()
|
||||
{
|
||||
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
|
||||
$this->refreshEnvs();
|
||||
}
|
||||
|
||||
public function refreshEnvs()
|
||||
{
|
||||
$this->service = Service::find($this->serviceId);
|
||||
}
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->service = Service::find($this->serviceId);
|
||||
|
||||
@@ -112,7 +112,7 @@ class Show extends Component
|
||||
$this->serialize();
|
||||
$this->env->save();
|
||||
$this->dispatch('success', 'Environment variable updated.');
|
||||
$this->dispatch('refreshEnvs');
|
||||
$this->dispatch('envsUpdated');
|
||||
} catch (\Exception $e) {
|
||||
return handleError($e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user