fix: boarding

fix: error handling
fix: restarting state
This commit is contained in:
Andras Bacsai
2023-09-15 15:34:25 +02:00
parent fcf7c5ddd5
commit da4c2ee60f
71 changed files with 326 additions and 290 deletions

View File

@@ -43,7 +43,7 @@ class CreateScheduledBackup extends Component
]);
$this->emit('refreshScheduledBackups');
} catch (\Throwable $e) {
general_error_handler($e, $this);
handleError($e, $this);
} finally {
$this->frequency = '';
$this->save_s3 = true;

View File

@@ -35,7 +35,7 @@ class Heading extends Component
public function stop()
{
remote_process(
instant_remote_process(
["docker rm -f {$this->database->uuid}"],
$this->database->destination->server
);
@@ -45,7 +45,7 @@ class Heading extends Component
}
$this->database->status = 'stopped';
$this->database->save();
$this->emit('refresh');
$this->check_status();
// $this->database->environment->project->team->notify(new StatusChanged($this->database));
}

View File

@@ -36,7 +36,7 @@ class InitScript extends Component
$this->script['filename'] = $this->filename;
$this->emitUp('save_init_script', $this->script);
} catch (Exception $e) {
return general_error_handler(err: $e, that: $this);
return handleError($e, $this);
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Livewire\Project\Database\Postgresql;
use App\Models\StandalonePostgresql;
use Exception;
use Livewire\Component;
use function Aws\filter;
class General extends Component
@@ -73,9 +74,9 @@ class General extends Component
}
$this->getDbUrl();
$this->database->save();
} catch(Exception $e) {
} catch(\Throwable $e) {
$this->database->is_public = !$this->database->is_public;
return general_error_handler(err: $e, that: $this);
return handleError($e, $this);
}
}
@@ -140,7 +141,7 @@ class General extends Component
$this->database->save();
$this->emit('success', 'Database updated successfully.');
} catch (Exception $e) {
return general_error_handler(err: $e, that: $this);
return handleError($e, $this);
}
}
}