fix(service): ensure configuration changes are properly tracked and dispatched
This commit is contained in:
		@@ -19,6 +19,7 @@ class StartService
 | 
				
			|||||||
            StopService::run(service: $service, dockerCleanup: false);
 | 
					            StopService::run(service: $service, dockerCleanup: false);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        $service->saveComposeConfigs();
 | 
					        $service->saveComposeConfigs();
 | 
				
			||||||
 | 
					        $service->isConfigurationChanged(save: true);
 | 
				
			||||||
        $commands[] = 'cd '.$service->workdir();
 | 
					        $commands[] = 'cd '.$service->workdir();
 | 
				
			||||||
        $commands[] = "echo 'Saved configuration files to {$service->workdir()}.'";
 | 
					        $commands[] = "echo 'Saved configuration files to {$service->workdir()}.'";
 | 
				
			||||||
        if ($pullLatestImages) {
 | 
					        if ($pullLatestImages) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,7 +63,7 @@ class Heading extends Component
 | 
				
			|||||||
            $this->service->databases->each(function ($database) {
 | 
					            $this->service->databases->each(function ($database) {
 | 
				
			||||||
                $database->refresh();
 | 
					                $database->refresh();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) {
 | 
					            if (is_null($this->service->config_hash)) {
 | 
				
			||||||
                $this->service->isConfigurationChanged(true);
 | 
					                $this->service->isConfigurationChanged(true);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            $this->dispatch('configurationChanged');
 | 
					            $this->dispatch('configurationChanged');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -170,6 +170,7 @@ class Show extends Component
 | 
				
			|||||||
            $this->syncData(true);
 | 
					            $this->syncData(true);
 | 
				
			||||||
            $this->dispatch('success', 'Environment variable updated.');
 | 
					            $this->dispatch('success', 'Environment variable updated.');
 | 
				
			||||||
            $this->dispatch('envsUpdated');
 | 
					            $this->dispatch('envsUpdated');
 | 
				
			||||||
 | 
					            $this->dispatch('configurationChanged');
 | 
				
			||||||
        } catch (\Exception $e) {
 | 
					        } catch (\Exception $e) {
 | 
				
			||||||
            return handleError($e);
 | 
					            return handleError($e);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user