updates
This commit is contained in:
@@ -21,7 +21,7 @@ class Deploy extends Component
|
||||
protected $source;
|
||||
|
||||
protected $listeners = [
|
||||
'applicationStatusChanged' => 'applicationStatusChanged',
|
||||
'applicationStatusChanged',
|
||||
];
|
||||
|
||||
public function mount()
|
||||
@@ -40,8 +40,12 @@ class Deploy extends Component
|
||||
$this->deployment_uuid = new Cuid2(7);
|
||||
$this->parameters['deployment_uuid'] = $this->deployment_uuid;
|
||||
}
|
||||
public function deploy(bool $force = false)
|
||||
public function deploy(bool $force = false, bool|null $debug = null)
|
||||
{
|
||||
if ($debug && !$this->application->settings->is_debug_enabled) {
|
||||
$this->application->settings->is_debug_enabled = true;
|
||||
$this->application->settings->save();
|
||||
}
|
||||
$this->set_deployment_uuid();
|
||||
|
||||
queue_application_deployment(
|
||||
@@ -62,5 +66,6 @@ class Deploy extends Component
|
||||
instant_remote_process(["docker rm -f {$this->application->uuid}"], $this->application->destination->server);
|
||||
$this->application->status = get_container_status(server: $this->application->destination->server, container_id: $this->application->uuid);
|
||||
$this->application->save();
|
||||
$this->emit('applicationStatusChanged');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,12 @@
|
||||
|
||||
namespace App\Http\Livewire\Project\Application\EnvironmentVariable;
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\EnvironmentVariable;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Livewire\Component;
|
||||
|
||||
class Add extends Component
|
||||
{
|
||||
public $parameters;
|
||||
public bool $is_preview = false;
|
||||
public string $key;
|
||||
public string $value;
|
||||
public bool $is_build_time = false;
|
||||
@@ -32,6 +29,7 @@ class Add extends Component
|
||||
'key' => $this->key,
|
||||
'value' => $this->value,
|
||||
'is_build_time' => $this->is_build_time,
|
||||
'is_preview' => $this->is_preview,
|
||||
]);
|
||||
}
|
||||
public function clear()
|
||||
|
||||
@@ -21,6 +21,7 @@ class All extends Component
|
||||
'key' => $data['key'],
|
||||
'value' => $data['value'],
|
||||
'is_build_time' => $data['is_build_time'],
|
||||
'is_preview' => $data['is_preview'],
|
||||
'application_id' => $this->application->id,
|
||||
]);
|
||||
$this->application->refresh();
|
||||
|
||||
@@ -11,7 +11,7 @@ class Status extends Component
|
||||
|
||||
public function applicationStatusChanged()
|
||||
{
|
||||
$this->emit('applicationStatusChanged');
|
||||
$this->application->refresh();
|
||||
$this->emit('applicationStatusChanged');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user