From 6135c139da9f20e7f0fdbbd789b9f422352cffb3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 25 Apr 2023 14:43:35 +0200 Subject: [PATCH] add new public repo --- .../Controllers/ApplicationController.php | 18 ++-- app/Http/Controllers/ProjectController.php | 24 ++--- .../Livewire/Project/Application/Deploy.php | 2 +- .../Livewire/Project/Application/General.php | 6 +- .../Livewire/Project/Application/Source.php | 2 +- .../Project/New/PublicGitRepository.php | 90 +++++++++++++++++++ app/Http/Livewire/Project/NewProject.php | 10 --- app/Jobs/DeployApplicationJob.php | 2 +- app/Models/Application.php | 14 +++ app/Models/ApplicationSetting.php | 1 + app/Models/Environment.php | 16 +++- app/Models/Git.php | 13 +++ app/Models/GitDeployKey.php | 7 -- app/Models/GitlabApp.php | 4 + app/Models/InstanceSettings.php | 2 - app/Models/Project.php | 19 +++- app/Models/ProjectSetting.php | 3 + app/Models/Server.php | 4 + app/View/Components/FormInput.php | 31 +++++++ app/View/Components/Input.php | 4 +- composer.json | 1 + composer.lock | 64 ++++++++++++- ...03_27_075444_create_environments_table.php | 4 +- ...03_27_081716_create_applications_table.php | 2 +- .../2023_03_28_083722_create_gits_table.php | 38 ++++++++ ...28_100003_create_git_deploy_keys_table.php | 32 ------- database/seeders/EnvironmentSeeder.php | 6 -- database/seeders/GitDeployKeySeeder.php | 17 ---- database/seeders/GitSeeder.php | 29 ++++++ database/seeders/GithubAppSeeder.php | 8 -- database/seeders/ProjectSeeder.php | 1 - .../views/components/form-input.blade.php | 34 +++++++ resources/views/components/input.blade.php | 44 +++------ resources/views/dashboard.blade.php | 2 +- .../project/application/general.blade.php | 49 +++++----- .../project/application/source.blade.php | 8 +- .../livewire/project/new-project.blade.php | 11 --- .../new/public-git-repository.blade.php | 31 +++++++ .../views/livewire/server/form.blade.php | 10 +-- .../views/livewire/settings/form.blade.php | 16 ++-- resources/views/project/new.blade.php | 24 ++++- routes/web.php | 2 +- 42 files changed, 495 insertions(+), 210 deletions(-) create mode 100644 app/Http/Livewire/Project/New/PublicGitRepository.php delete mode 100644 app/Http/Livewire/Project/NewProject.php create mode 100644 app/Models/Git.php delete mode 100644 app/Models/GitDeployKey.php create mode 100644 app/View/Components/FormInput.php create mode 100644 database/migrations/2023_03_28_083722_create_gits_table.php delete mode 100644 database/migrations/2023_03_28_100003_create_git_deploy_keys_table.php delete mode 100644 database/seeders/GitDeployKeySeeder.php create mode 100644 database/seeders/GitSeeder.php create mode 100644 resources/views/components/form-input.blade.php delete mode 100644 resources/views/livewire/project/new-project.blade.php create mode 100644 resources/views/livewire/project/new/public-git-repository.blade.php diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index e9584aad1..3cc33c203 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -11,15 +11,15 @@ public function configuration() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } return view('project.application.configuration', ['application' => $application]); } @@ -27,15 +27,15 @@ public function deployments() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]); } @@ -46,15 +46,15 @@ public function deployment() $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first(); diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 6ac9dc611..710c10f83 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -10,7 +10,7 @@ public function environments() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $project->load(['environments']); if (count($project->environments) == 1) { @@ -23,11 +23,11 @@ public function resources() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first(); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } return view('project.resources', ['project' => $project, 'environment' => $environment]); } @@ -36,15 +36,15 @@ public function application_configuration() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } return view('project.application.configuration', ['application' => $application]); } @@ -52,15 +52,15 @@ public function application_deployments() { $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]); } @@ -71,15 +71,15 @@ public function application_deployment() $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); if (!$project) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']); if (!$environment) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $application = $environment->applications->where('uuid', request()->route('application_uuid'))->first(); if (!$application) { - return redirect()->route('home'); + return redirect()->route('dashboard'); } $activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first(); diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.php index 9a1263eda..a8696e506 100644 --- a/app/Http/Livewire/Project/Application/Deploy.php +++ b/app/Http/Livewire/Project/Application/Deploy.php @@ -24,7 +24,7 @@ class Deploy extends Component public function mount() { $this->parameters = Route::current()->parameters(); - $this->application = Application::find($this->applicationId)->first(); + $this->application = Application::where('id', $this->applicationId)->first(); $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); } protected function setDeploymentUuid() diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index 1bf6706ac..e760eb975 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -36,7 +36,8 @@ class General extends Component 'application.build_pack' => 'required', 'application.base_directory' => 'required', 'application.publish_directory' => 'nullable', - 'application.ports_exposes' => 'nullable', + 'application.ports_exposes' => 'required', + 'application.ports_mappings' => 'nullable', ]; public function instantSave() { @@ -54,7 +55,7 @@ public function instantSave() } public function mount() { - $this->application = Application::find($this->applicationId)->with('destination', 'settings')->first(); + $this->application = Application::where('id', $this->applicationId)->with('destination', 'settings')->firstOrFail(); $this->is_git_submodules_allowed = $this->application->settings->is_git_submodules_allowed; $this->is_git_lfs_allowed = $this->application->settings->is_git_lfs_allowed; $this->is_debug = $this->application->settings->is_debug; @@ -64,7 +65,6 @@ public function mount() $this->is_http2 = $this->application->settings->is_http2; $this->is_auto_deploy = $this->application->settings->is_auto_deploy; $this->is_dual_cert = $this->application->settings->is_dual_cert; - } public function submit() { diff --git a/app/Http/Livewire/Project/Application/Source.php b/app/Http/Livewire/Project/Application/Source.php index 16d7eeadc..56d1c6e86 100644 --- a/app/Http/Livewire/Project/Application/Source.php +++ b/app/Http/Livewire/Project/Application/Source.php @@ -17,6 +17,6 @@ class Source extends Component ]; public function mount() { - $this->application = Application::find($this->applicationId)->first(); + $this->application = Application::where('id', $this->applicationId)->first(); } } diff --git a/app/Http/Livewire/Project/New/PublicGitRepository.php b/app/Http/Livewire/Project/New/PublicGitRepository.php new file mode 100644 index 000000000..8433ee829 --- /dev/null +++ b/app/Http/Livewire/Project/New/PublicGitRepository.php @@ -0,0 +1,90 @@ + 'required|url', + ]; + public function mount() + { + if (env('APP_ENV') === 'local') { + $this->public_repository_url = 'https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify'; + $this->port = 3000; + } + $this->servers = session('currentTeam')->load(['servers'])->servers; + } + public function chooseServer($server_id) + { + $this->chosenServer = $server_id; + $this->standalone_docker = StandaloneDocker::where('server_id', $server_id)->get(); + $this->swarm_docker = SwarmDocker::where('server_id', $server_id)->get(); + } + public function setDestination($destination_uuid, $destination_type) + { + $class = "App\Models\\{$destination_type}"; + $instance = new $class; + $this->chosenDestination = $instance::where('uuid', $destination_uuid)->first(); + } + + public function submit() + { + $this->validate(); + + $url = Url::fromString($this->public_repository_url); + $git_host = $url->getHost(); + $git_repository = $url->getSegment(1) . '/' . $url->getSegment(2); + $git_branch = $url->getSegment(4) ?? 'main'; + + $project = Project::create([ + 'name' => fake()->company(), + 'description' => fake()->sentence(), + 'team_id' => session('currentTeam')->id, + ]); + $application_init = [ + 'name' => fake()->words(2, true), + 'git_repository' => $git_repository, + 'git_branch' => $git_branch, + 'build_pack' => 'nixpacks', + 'ports_exposes' => $this->port, + 'environment_id' => $project->environments->first()->id, + 'destination_id' => $this->chosenDestination->id, + 'destination_type' => $this->chosenDestination->getMorphClass(), + ]; + if ($git_host == 'github.com') { + $application_init['source_id'] = GithubApp::where('name', 'Public GitHub')->first()->id; + $application_init['source_type'] = GithubApp::class; + } elseif ($git_host == 'gitlab.com') { + $application_init['source_id'] = GitlabApp::where('name', 'Public GitLab')->first()->id; + $application_init['source_type'] = GitlabApp::class; + } elseif ($git_host == 'bitbucket.org') { + // $application_init['source_id'] = GithubApp::where('name', 'Public Bitbucket')->first()->id; + // $application_init['source_type'] = GithubApp::class; + } + Application::create($application_init); + } +} diff --git a/app/Http/Livewire/Project/NewProject.php b/app/Http/Livewire/Project/NewProject.php deleted file mode 100644 index b24a31580..000000000 --- a/app/Http/Livewire/Project/NewProject.php +++ /dev/null @@ -1,10 +0,0 @@ -application->source->getMorphClass() == 'App\Models\GithubApp') { if ($this->source->is_public) { - $git_clone_command = "{$git_clone_command} {$this->source->html_url}/{$this->application->git_repository}.git {$this->workdir}"; + $git_clone_command = "{$git_clone_command} {$this->source->html_url}/{$this->application->git_repository} {$this->workdir}"; $git_clone_command = $this->setGitImportSettings($git_clone_command); return [ $this->execute_in_builder($git_clone_command) diff --git a/app/Models/Application.php b/app/Models/Application.php index 723ddeebb..fdcbeb5be 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -16,6 +16,20 @@ protected static function booted() }); } + protected $fillable = [ + 'name', + 'description', + 'git_repository', + 'git_branch', + 'build_pack', + 'environment_id', + 'destination_id', + 'destination_type', + 'source_id', + 'source_type', + 'ports_mappings', + 'ports_exposes', + ]; public function environment() { return $this->belongsTo(Environment::class); diff --git a/app/Models/ApplicationSetting.php b/app/Models/ApplicationSetting.php index a664f8d3c..61d9f6ed8 100644 --- a/app/Models/ApplicationSetting.php +++ b/app/Models/ApplicationSetting.php @@ -7,6 +7,7 @@ class ApplicationSetting extends Model { protected $fillable = [ + 'application_id', 'is_git_submodules_allowed', 'is_git_lfs_allowed', ]; diff --git a/app/Models/Environment.php b/app/Models/Environment.php index 29f34208b..c79472e88 100644 --- a/app/Models/Environment.php +++ b/app/Models/Environment.php @@ -2,8 +2,21 @@ namespace App\Models; -class Environment extends BaseModel +use Illuminate\Database\Eloquent\Casts\Attribute; +use Illuminate\Database\Eloquent\Model; + +class Environment extends Model { + protected $fillable = [ + 'name', + 'project_id', + ]; + protected function name(): Attribute + { + return Attribute::make( + set: fn (string $value) => strtolower($value), + ); + } public function project() { return $this->belongsTo(Project::class); @@ -21,4 +34,3 @@ public function services() return $this->hasMany(Service::class); } } - diff --git a/app/Models/Git.php b/app/Models/Git.php new file mode 100644 index 000000000..a615b65f4 --- /dev/null +++ b/app/Models/Git.php @@ -0,0 +1,13 @@ +morphMany(Application::class, 'source'); + } +} diff --git a/app/Models/GitDeployKey.php b/app/Models/GitDeployKey.php deleted file mode 100644 index f487f37c5..000000000 --- a/app/Models/GitDeployKey.php +++ /dev/null @@ -1,7 +0,0 @@ -morphMany(Application::class, 'source'); + } public function privateKey() { return $this->belongsTo(PrivateKey::class); diff --git a/app/Models/InstanceSettings.php b/app/Models/InstanceSettings.php index fa9dfa1f8..8f8936b1f 100644 --- a/app/Models/InstanceSettings.php +++ b/app/Models/InstanceSettings.php @@ -2,10 +2,8 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class InstanceSettings extends Model { - use HasFactory; } diff --git a/app/Models/Project.php b/app/Models/Project.php index e3f2f105b..1ab08db17 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -10,15 +10,28 @@ protected static function booted() ProjectSetting::create([ 'project_id' => $project->id, ]); + Environment::create([ + 'name' => 'Production', + 'project_id' => $project->id, + ]); }); } - public function environments() { + protected $fillable = [ + 'name', + 'description', + 'team_id', + 'project_id' + ]; + public function environments() + { return $this->hasMany(Environment::class); } - public function settings() { + public function settings() + { return $this->hasOne(ProjectSetting::class); } - public function applications() { + public function applications() + { return $this->hasManyThrough(Application::class, Environment::class); } } diff --git a/app/Models/ProjectSetting.php b/app/Models/ProjectSetting.php index 78dcb32ba..1d0d7c48c 100644 --- a/app/Models/ProjectSetting.php +++ b/app/Models/ProjectSetting.php @@ -4,4 +4,7 @@ class ProjectSetting extends BaseModel { + protected $fillable = [ + 'project_id' + ]; } diff --git a/app/Models/Server.php b/app/Models/Server.php index da302d056..e06dc67e3 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -12,6 +12,10 @@ protected static function booted() ]); }); } + public function destinations() + { + return $this->hasMany(PrivateKey::class); + } public function privateKey() { return $this->belongsTo(PrivateKey::class); diff --git a/app/View/Components/FormInput.php b/app/View/Components/FormInput.php new file mode 100644 index 000000000..5b346b11d --- /dev/null +++ b/app/View/Components/FormInput.php @@ -0,0 +1,31 @@ +id(); - $table->string('uuid')->unique(); - $table->string('name')->unique(); + $table->string('name'); $table->foreignId('project_id'); $table->timestamps(); + $table->unique(['name', 'project_id']); }); } diff --git a/database/migrations/2023_03_27_081716_create_applications_table.php b/database/migrations/2023_03_27_081716_create_applications_table.php index 23b6575e7..fe3345bb1 100644 --- a/database/migrations/2023_03_27_081716_create_applications_table.php +++ b/database/migrations/2023_03_27_081716_create_applications_table.php @@ -54,7 +54,7 @@ public function up(): void $table->string('status')->default('exited'); - $table->morphs('destination'); + $table->nullableMorphs('destination'); $table->morphs('source'); $table->foreignId('environment_id'); diff --git a/database/migrations/2023_03_28_083722_create_gits_table.php b/database/migrations/2023_03_28_083722_create_gits_table.php new file mode 100644 index 000000000..cb7a8de1d --- /dev/null +++ b/database/migrations/2023_03_28_083722_create_gits_table.php @@ -0,0 +1,38 @@ +id(); + $table->enum('type', ['github', 'gitlab', 'bitbucket', 'custom']); + + $table->string('api_url'); + $table->string('html_url'); + + $table->integer('custom_port')->default(22); + $table->string('custom_user')->default('git'); + + $table->longText('webhook_secret')->nullable(); + $table->foreignId('private_key_id')->nullable(); + $table->foreignId('project_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('gits'); + } +}; diff --git a/database/migrations/2023_03_28_100003_create_git_deploy_keys_table.php b/database/migrations/2023_03_28_100003_create_git_deploy_keys_table.php deleted file mode 100644 index 2908a190a..000000000 --- a/database/migrations/2023_03_28_100003_create_git_deploy_keys_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->string('name')->nullable(); - $table->string('url'); - - $table->foreignId('private_key_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('git_deploy_keys'); - } -}; diff --git a/database/seeders/EnvironmentSeeder.php b/database/seeders/EnvironmentSeeder.php index b06a70c5f..345bda5c5 100644 --- a/database/seeders/EnvironmentSeeder.php +++ b/database/seeders/EnvironmentSeeder.php @@ -14,11 +14,5 @@ class EnvironmentSeeder extends Seeder */ public function run(): void { - $project_1 = Project::find(1); - Environment::create([ - 'id' => 1, - 'name' => 'production', - 'project_id' => $project_1->id, - ]); } } diff --git a/database/seeders/GitDeployKeySeeder.php b/database/seeders/GitDeployKeySeeder.php deleted file mode 100644 index ecbcb5653..000000000 --- a/database/seeders/GitDeployKeySeeder.php +++ /dev/null @@ -1,17 +0,0 @@ - 'https://api.github.com', + // 'html_url' => 'https://github.com', + // 'is_public' => false, + // 'private_key_id' => $private_key_1->id, + // 'project_id' => $project->id, + // ]); + } +} diff --git a/database/seeders/GithubAppSeeder.php b/database/seeders/GithubAppSeeder.php index d5abe181f..9e468f913 100644 --- a/database/seeders/GithubAppSeeder.php +++ b/database/seeders/GithubAppSeeder.php @@ -38,13 +38,5 @@ public function run(): void 'private_key_id' => $private_key_2->id, 'team_id' => $root_team->id, ]); - GithubApp::create([ - 'name' => 'Private GitHub (deployment key)', - 'api_url' => 'https://api.github.com', - 'html_url' => 'https://github.com', - 'is_public' => false, - 'private_key_id' => $private_key_1->id, - 'team_id' => $root_team->id, - ]); } } diff --git a/database/seeders/ProjectSeeder.php b/database/seeders/ProjectSeeder.php index d8325b40d..6aaca3833 100644 --- a/database/seeders/ProjectSeeder.php +++ b/database/seeders/ProjectSeeder.php @@ -12,7 +12,6 @@ public function run(): void { $root_team = Team::find(0); Project::create([ - 'id' => 1, 'name' => "My first project", 'description' => "This is a test project in development", 'team_id' => $root_team->id, diff --git a/resources/views/components/form-input.blade.php b/resources/views/components/form-input.blade.php new file mode 100644 index 000000000..86515f143 --- /dev/null +++ b/resources/views/components/form-input.blade.php @@ -0,0 +1,34 @@ +@if ($type === 'checkbox') + + @error($id) + {{ $message }} + @enderror +@else + + + @error($id) +
{{ $message }}
+ @enderror +@endif diff --git a/resources/views/components/input.blade.php b/resources/views/components/input.blade.php index 6ec6357b7..0acf572ce 100644 --- a/resources/views/components/input.blade.php +++ b/resources/views/components/input.blade.php @@ -1,33 +1,11 @@ -@if ($type === 'checkbox') - -@else - - -@endif - -@error($name) - {{ $message }} -@enderror + diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index c13d96d29..bce2b8efe 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,5 +1,5 @@ -

Projects

+

Projects

@forelse ($projects as $project) {{ data_get($project, 'name') }} @empty diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 82071d5e7..9da146dd9 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -1,37 +1,38 @@
-
-
- - +
+
+ +
-
- - - - +
+ + + +
-
- - +
+ +
-
- +
+ +
-
- - - - - - - - - +
+ + + + + + + + +
diff --git a/resources/views/livewire/project/application/source.blade.php b/resources/views/livewire/project/application/source.blade.php index 45329f769..aa4404ec6 100644 --- a/resources/views/livewire/project/application/source.blade.php +++ b/resources/views/livewire/project/application/source.blade.php @@ -1,9 +1,9 @@

Source Name: {{ data_get($application,'source.name') }}

Is Public Source: {{ data_get($application,'source.is_public') }}

-
- - - +
+ + +
diff --git a/resources/views/livewire/project/new-project.blade.php b/resources/views/livewire/project/new-project.blade.php deleted file mode 100644 index e22a7f78f..000000000 --- a/resources/views/livewire/project/new-project.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -
-
- - - - - - - -
-
diff --git a/resources/views/livewire/project/new/public-git-repository.blade.php b/resources/views/livewire/project/new/public-git-repository.blade.php new file mode 100644 index 000000000..934ba1e18 --- /dev/null +++ b/resources/views/livewire/project/new/public-git-repository.blade.php @@ -0,0 +1,31 @@ +
+ @forelse ($servers as $server) + + @empty + No servers + @endforelse + @isset($chosenServer) +
+ @foreach ($standalone_docker as $standalone) + + @endforeach + @foreach ($swarm_docker as $standalone) + + @endforeach +
+ @endisset + + @isset($chosenDestination) +
+ + + + + @endisset + +
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index 996a3c599..38e33833f 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -2,13 +2,13 @@
- - + +
- - - + + +
- - - - + + + +
diff --git a/resources/views/project/new.blade.php b/resources/views/project/new.blade.php index f23e5726f..c000d7991 100644 --- a/resources/views/project/new.blade.php +++ b/resources/views/project/new.blade.php @@ -1,4 +1,26 @@

New Project

- +
+
+ + + +
+ +
+ +
+
+ github-private-repo +
+
+ empty-project +
+
+ Choose any option +
+
diff --git a/routes/web.php b/routes/web.php index 826729807..da324f4f0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -41,7 +41,7 @@ 'settings' => $settings ]); } else { - return redirect()->route('home'); + return redirect()->route('dashboard'); } })->name('settings');