diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index ca7c4b659..e9584aad1 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -21,7 +21,7 @@ class ApplicationController extends Controller if (!$application) { return redirect()->route('home'); } - return view('project.applications.configuration', ['application' => $application]); + return view('project.application.configuration', ['application' => $application]); } public function deployments() { @@ -37,7 +37,7 @@ class ApplicationController extends Controller if (!$application) { return redirect()->route('home'); } - return view('project.applications.deployments', ['application' => $application, 'deployments' => $application->deployments()]); + return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]); } public function deployment() @@ -58,7 +58,7 @@ class ApplicationController extends Controller } $activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first(); - return view('project.applications.deployment', [ + return view('project.application.deployment', [ 'application' => $application, 'activity' => $activity, 'deployment_uuid' => $deployment_uuid, diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 1c1b220fc..6ac9dc611 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -46,7 +46,7 @@ class ProjectController extends Controller if (!$application) { return redirect()->route('home'); } - return view('project.applications.configuration', ['application' => $application]); + return view('project.application.configuration', ['application' => $application]); } public function application_deployments() { @@ -62,7 +62,7 @@ class ProjectController extends Controller if (!$application) { return redirect()->route('home'); } - return view('project.applications.deployments', ['application' => $application, 'deployments' => $application->deployments()]); + return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]); } public function application_deployment() @@ -83,7 +83,7 @@ class ProjectController extends Controller } $activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first(); - return view('project.applications.deployment', [ + return view('project.application.deployment', [ 'application' => $application, 'activity' => $activity, 'deployment_uuid' => $deployment_uuid, diff --git a/app/Http/Livewire/DeployApplication.php b/app/Http/Livewire/Project/Application/Deploy.php similarity index 93% rename from app/Http/Livewire/DeployApplication.php rename to app/Http/Livewire/Project/Application/Deploy.php index 4294c08d6..9a1263eda 100644 --- a/app/Http/Livewire/DeployApplication.php +++ b/app/Http/Livewire/Project/Application/Deploy.php @@ -1,6 +1,6 @@ route('project.applications.deployment', $this->parameters); + return redirect()->route('project.application.deployment', $this->parameters); } public function start() { diff --git a/app/Http/Livewire/Application/Destination.php b/app/Http/Livewire/Project/Application/Destination.php similarity index 66% rename from app/Http/Livewire/Application/Destination.php rename to app/Http/Livewire/Project/Application/Destination.php index a630941cc..571c81d9b 100644 --- a/app/Http/Livewire/Application/Destination.php +++ b/app/Http/Livewire/Project/Application/Destination.php @@ -1,6 +1,6 @@ - Configuration - Deployments - + Configuration + Deployments + diff --git a/resources/views/home.blade.php b/resources/views/dashboard.blade.php similarity index 81% rename from resources/views/home.blade.php rename to resources/views/dashboard.blade.php index 86159f082..c13d96d29 100644 --- a/resources/views/home.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/deploy-application.blade.php b/resources/views/livewire/project/application/deploy.blade.php similarity index 100% rename from resources/views/livewire/deploy-application.blade.php rename to resources/views/livewire/project/application/deploy.blade.php diff --git a/resources/views/livewire/application/destination.blade.php b/resources/views/livewire/project/application/destination.blade.php similarity index 100% rename from resources/views/livewire/application/destination.blade.php rename to resources/views/livewire/project/application/destination.blade.php diff --git a/resources/views/livewire/application/environment-variables.blade.php b/resources/views/livewire/project/application/environment-variables.blade.php similarity index 100% rename from resources/views/livewire/application/environment-variables.blade.php rename to resources/views/livewire/project/application/environment-variables.blade.php diff --git a/resources/views/livewire/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php similarity index 100% rename from resources/views/livewire/application/general.blade.php rename to resources/views/livewire/project/application/general.blade.php diff --git a/resources/views/livewire/poll-deployment.blade.php b/resources/views/livewire/project/application/get-deployments.blade.php similarity index 100% rename from resources/views/livewire/poll-deployment.blade.php rename to resources/views/livewire/project/application/get-deployments.blade.php diff --git a/resources/views/livewire/poll-activity.blade.php b/resources/views/livewire/project/application/poll-deployment.blade.php similarity index 100% rename from resources/views/livewire/poll-activity.blade.php rename to resources/views/livewire/project/application/poll-deployment.blade.php diff --git a/resources/views/livewire/application/source.blade.php b/resources/views/livewire/project/application/source.blade.php similarity index 100% rename from resources/views/livewire/application/source.blade.php rename to resources/views/livewire/project/application/source.blade.php diff --git a/resources/views/livewire/application/storages.blade.php b/resources/views/livewire/project/application/storages.blade.php similarity index 100% rename from resources/views/livewire/application/storages.blade.php rename to resources/views/livewire/project/application/storages.blade.php diff --git a/resources/views/livewire/project/new-project.blade.php b/resources/views/livewire/project/new-project.blade.php new file mode 100644 index 000000000..e22a7f78f --- /dev/null +++ b/resources/views/livewire/project/new-project.blade.php @@ -0,0 +1,11 @@ +
+
+ + + + + + + +
+
diff --git a/resources/views/project/applications/configuration.blade.php b/resources/views/project/application/configuration.blade.php similarity index 72% rename from resources/views/project/applications/configuration.blade.php rename to resources/views/project/application/configuration.blade.php index ee33b1b43..0a83858d5 100644 --- a/resources/views/project/applications/configuration.blade.php +++ b/resources/views/project/application/configuration.blade.php @@ -10,19 +10,19 @@
- +
- +
- +
- +
- +
diff --git a/resources/views/project/application/deployment.blade.php b/resources/views/project/application/deployment.blade.php new file mode 100644 index 000000000..48c245f98 --- /dev/null +++ b/resources/views/project/application/deployment.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/resources/views/project/applications/deployments.blade.php b/resources/views/project/application/deployments.blade.php similarity index 52% rename from resources/views/project/applications/deployments.blade.php rename to resources/views/project/application/deployments.blade.php index 47b7cf34d..71df4c7df 100644 --- a/resources/views/project/applications/deployments.blade.php +++ b/resources/views/project/application/deployments.blade.php @@ -1,8 +1,7 @@
@forelse ($deployments as $deployment) - - + @empty

No deployments found.

@endforelse diff --git a/resources/views/project/applications/deployment.blade.php b/resources/views/project/applications/deployment.blade.php deleted file mode 100644 index 07c148b79..000000000 --- a/resources/views/project/applications/deployment.blade.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/resources/views/project/new.blade.php b/resources/views/project/new.blade.php new file mode 100644 index 000000000..f23e5726f --- /dev/null +++ b/resources/views/project/new.blade.php @@ -0,0 +1,4 @@ + +

New Project

+ +
diff --git a/resources/views/project/resources.blade.php b/resources/views/project/resources.blade.php index f3249dfb0..85ad66146 100644 --- a/resources/views/project/resources.blade.php +++ b/resources/views/project/resources.blade.php @@ -3,7 +3,7 @@
@foreach ($environment->applications as $application)

- + {{ $application->name }}

diff --git a/routes/web.php b/routes/web.php index bfe2f035d..826729807 100644 --- a/routes/web.php +++ b/routes/web.php @@ -23,11 +23,11 @@ Route::middleware(['auth'])->group(function () { Route::get('/', function () { $projects = session('currentTeam')->load(['projects'])->projects; $servers = session('currentTeam')->load(['servers'])->servers; - return view('home', [ + return view('dashboard', [ 'servers' => $servers->sortBy('name'), 'projects' => $projects->sortBy('name') ]); - })->name('home'); + })->name('dashboard'); Route::get('/profile', function () { return view('profile'); @@ -67,6 +67,7 @@ Route::middleware(['auth'])->group(function () { }); Route::middleware(['auth'])->group(function () { + Route::get('/project/new', fn () => view('project.new'))->name('project.new'); Route::get( '/project/{project_uuid}', [ProjectController::class, 'environments'] @@ -80,15 +81,15 @@ Route::middleware(['auth'])->group(function () { Route::get( '/project/{project_uuid}/{environment_name}/application/{application_uuid}', [ApplicationController::class, 'configuration'] - )->name('project.applications.configuration'); + )->name('project.application.configuration'); Route::get( '/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment', [ApplicationController::class, 'deployments'] - )->name('project.applications.deployments'); + )->name('project.application.deployments'); Route::get( '/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}', [ApplicationController::class, 'deployment'] - )->name('project.applications.deployment'); + )->name('project.application.deployment'); });