feat: configuration checker for all resources

This commit is contained in:
Andras Bacsai
2024-04-12 12:44:49 +02:00
parent 7b0018b661
commit 7a32b8d1d2
41 changed files with 493 additions and 89 deletions

View File

@@ -17,6 +17,14 @@ class Navbar extends Component
public array $query;
public $isDeploymentProgress = false;
public function mount()
{
if (str($this->service->status())->contains('running') && is_null($this->service->config_hash)) {
ray('isConfigurationChanged init');
$this->service->isConfigurationChanged(true);
$this->dispatch('configurationChanged');
}
}
public function getListeners()
{
$userId = auth()->user()->id;
@@ -25,12 +33,19 @@ class Navbar extends Component
"serviceStatusChanged"
];
}
public function serviceStarted() {
public function serviceStarted()
{
$this->dispatch('success', 'Service status changed.');
}
public function serviceStatusChanged()
{
$this->dispatch('refresh')->self();
// if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) {
// $this->service->isConfigurationChanged(true);
// $this->dispatch('configurationChanged');
// } else {
// $this->dispatch('configurationChanged');
// }
}
public function check_status()
{