do not use hash routing for tabs
add empty project creation if local image is found, we only refresh the configuration
This commit is contained in:
@@ -64,7 +64,7 @@ class Deploy extends Component
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$this->kill();
|
||||
$this->stop();
|
||||
Application::find($this->applicationId)->delete();
|
||||
return redirect()->route('project.resources', [
|
||||
'project_uuid' => $this->parameters['project_uuid'],
|
||||
@@ -72,12 +72,6 @@ class Deploy extends Component
|
||||
]);
|
||||
}
|
||||
public function stop()
|
||||
{
|
||||
runRemoteCommandSync($this->destination->server, ["docker stop -t 0 {$this->application->uuid} >/dev/null 2>&1"]);
|
||||
$this->application->status = 'stopped';
|
||||
$this->application->save();
|
||||
}
|
||||
public function kill()
|
||||
{
|
||||
runRemoteCommandSync($this->destination->server, ["docker rm -f {$this->application->uuid}"]);
|
||||
if ($this->application->status != 'exited') {
|
||||
|
||||
@@ -22,7 +22,6 @@ class General extends Component
|
||||
public bool $is_git_lfs_allowed;
|
||||
public bool $is_debug;
|
||||
public bool $is_previews;
|
||||
public bool $is_bot;
|
||||
public bool $is_custom_ssl;
|
||||
public bool $is_http2;
|
||||
public bool $is_auto_deploy;
|
||||
@@ -49,7 +48,6 @@ class General extends Component
|
||||
$this->application->settings->is_git_lfs_allowed = $this->is_git_lfs_allowed;
|
||||
$this->application->settings->is_debug = $this->is_debug;
|
||||
$this->application->settings->is_previews = $this->is_previews;
|
||||
$this->application->settings->is_bot = $this->is_bot;
|
||||
$this->application->settings->is_custom_ssl = $this->is_custom_ssl;
|
||||
$this->application->settings->is_http2 = $this->is_http2;
|
||||
$this->application->settings->is_auto_deploy = $this->is_auto_deploy;
|
||||
@@ -65,7 +63,6 @@ class General extends Component
|
||||
$this->is_git_lfs_allowed = $this->application->settings->is_git_lfs_allowed;
|
||||
$this->is_debug = $this->application->settings->is_debug;
|
||||
$this->is_previews = $this->application->settings->is_previews;
|
||||
$this->is_bot = $this->application->settings->is_bot;
|
||||
$this->is_custom_ssl = $this->application->settings->is_custom_ssl;
|
||||
$this->is_http2 = $this->application->settings->is_http2;
|
||||
$this->is_auto_deploy = $this->application->settings->is_auto_deploy;
|
||||
|
||||
19
app/Http/Livewire/Project/New/EmptyProject.php
Normal file
19
app/Http/Livewire/Project/New/EmptyProject.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project\New;
|
||||
|
||||
use App\Models\Project;
|
||||
use Livewire\Component;
|
||||
|
||||
class EmptyProject extends Component
|
||||
{
|
||||
public function createEmptyProject()
|
||||
{
|
||||
$project = Project::create([
|
||||
'name' => fake()->company(),
|
||||
'description' => fake()->sentence(),
|
||||
'team_id' => session('currentTeam')->id,
|
||||
]);
|
||||
return redirect()->route('project.environments', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user