testing php storm code cleanup and styling
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Http\Livewire\Project\Database;
|
||||
|
||||
use Livewire\Component;
|
||||
use App\Actions\Database\StartPostgresql;
|
||||
use App\Jobs\ContainerStatusJob;
|
||||
use App\Notifications\Application\StatusChanged;
|
||||
use Livewire\Component;
|
||||
|
||||
class Heading extends Component
|
||||
{
|
||||
@@ -13,13 +13,16 @@ class Heading extends Component
|
||||
public array $parameters;
|
||||
|
||||
protected $listeners = ['activityFinished'];
|
||||
public function activityFinished() {
|
||||
|
||||
public function activityFinished()
|
||||
{
|
||||
$this->database->update([
|
||||
'started_at' => now(),
|
||||
]);
|
||||
$this->emit('refresh');
|
||||
$this->check_status();
|
||||
}
|
||||
|
||||
public function check_status()
|
||||
{
|
||||
dispatch_sync(new ContainerStatusJob(
|
||||
@@ -28,11 +31,14 @@ class Heading extends Component
|
||||
));
|
||||
$this->database->refresh();
|
||||
}
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
}
|
||||
public function stop() {
|
||||
|
||||
public function stop()
|
||||
{
|
||||
remote_process(
|
||||
["docker rm -f {$this->database->uuid}"],
|
||||
$this->database->destination->server
|
||||
@@ -41,7 +47,9 @@ class Heading extends Component
|
||||
$this->database->save();
|
||||
$this->database->environment->project->team->notify(new StatusChanged($this->database));
|
||||
}
|
||||
public function start() {
|
||||
|
||||
public function start()
|
||||
{
|
||||
if ($this->database->type() === 'standalone-postgresql') {
|
||||
$activity = resolve(StartPostgresql::class)($this->database->destination->server, $this->database);
|
||||
$this->emit('newMonitorActivity', $activity->id);
|
||||
|
||||
@@ -31,10 +31,14 @@ class General extends Component
|
||||
'database.init_scripts' => 'Init Scripts',
|
||||
'database.image' => 'Image',
|
||||
];
|
||||
public function refresh() {
|
||||
|
||||
public function refresh(): void
|
||||
{
|
||||
$this->database->refresh();
|
||||
}
|
||||
public function submit() {
|
||||
|
||||
public function submit()
|
||||
{
|
||||
try {
|
||||
$this->validate();
|
||||
$this->database->save();
|
||||
|
||||
Reference in New Issue
Block a user