move files around
This commit is contained in:
parent
18a2d0bd90
commit
dd51b002b8
@ -21,7 +21,7 @@ public function configuration()
|
||||
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 @@ public function deployments()
|
||||
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 @@ public function deployment()
|
||||
}
|
||||
$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,
|
||||
|
@ -46,7 +46,7 @@ public function application_configuration()
|
||||
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 @@ public function application_deployments()
|
||||
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 @@ public function application_deployment()
|
||||
}
|
||||
$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,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use App\Jobs\DeployApplicationJob;
|
||||
use App\Models\Application;
|
||||
@ -8,7 +8,7 @@
|
||||
use Livewire\Component;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
class DeployApplication extends Component
|
||||
class Deploy extends Component
|
||||
{
|
||||
public string $applicationId;
|
||||
public $activity;
|
||||
@ -35,7 +35,7 @@ protected function setDeploymentUuid()
|
||||
}
|
||||
protected function redirectToDeployment()
|
||||
{
|
||||
return redirect()->route('project.applications.deployment', $this->parameters);
|
||||
return redirect()->route('project.application.deployment', $this->parameters);
|
||||
}
|
||||
public function start()
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Application;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Application;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Application;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use App\Models\Application;
|
||||
use Livewire\Component;
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
|
||||
class PollDeployment extends Component
|
||||
class GetDeployments extends Component
|
||||
{
|
||||
public string $deployment_uuid;
|
||||
public string $created_at;
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
|
||||
class PollActivity extends Component
|
||||
class PollDeployment extends Component
|
||||
{
|
||||
public $activity;
|
||||
public $isKeepAliveOn = true;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Application;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use App\Models\Application;
|
||||
use Livewire\Component;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Application;
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Livewire\Component;
|
10
app/Http/Livewire/Project/NewProject.php
Normal file
10
app/Http/Livewire/Project/NewProject.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class NewProject extends Component
|
||||
{
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<nav class="flex gap-4 py-2 bg-gray-100">
|
||||
<a href="{{ route('project.applications.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||
<a href="{{ route('project.applications.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||
<livewire:deploy-application :applicationId="$applicationId" />
|
||||
<a href="{{ route('project.application.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||
<a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||
<livewire:project.application.deploy :applicationId="$applicationId" />
|
||||
</nav>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<x-layout>
|
||||
<h1>Projects</h1>
|
||||
<h1>Projects <button><a class="no-underline" href="{{ route('project.new') }}">New</a></button></h1>
|
||||
@forelse ($projects as $project)
|
||||
<a href="{{ route('project.environments', [$project->uuid]) }}">{{ data_get($project, 'name') }}</a>
|
||||
@empty
|
11
resources/views/livewire/project/new-project.blade.php
Normal file
11
resources/views/livewire/project/new-project.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<div class="flex flex-col w-64 gap-2">
|
||||
<button>Repository (any git)</button>
|
||||
<button>Repository through GitHub App</button>
|
||||
<button>Repository through GitLab App</button>
|
||||
<button>Repository through Bitbucket App</button>
|
||||
<button>Deploy Database</button>
|
||||
<button>Deploy Service</button>
|
||||
<button>Empty Project</button>
|
||||
</div>
|
||||
</div>
|
@ -10,19 +10,19 @@
|
||||
</a>
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'general'">
|
||||
<livewire:application.general :applicationId="$application->id" />
|
||||
<livewire:project.application.general :applicationId="$application->id" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'envs'">
|
||||
<livewire:application.environment-variables />
|
||||
<livewire:project.application.environment-variables />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'source'">
|
||||
<livewire:application.source :applicationId="$application->id" />
|
||||
<livewire:project.application.source :applicationId="$application->id" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'destination'">
|
||||
<livewire:application.destination :destination="$application->destination" />
|
||||
<livewire:project.application.destination :destination="$application->destination" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'storages'">
|
||||
<livewire:application.storages :storages="$application->persistentStorages" />
|
||||
<livewire:project.application.storages :storages="$application->persistentStorages" />
|
||||
</div>
|
||||
</div>
|
||||
</x-applications.layout>
|
3
resources/views/project/application/deployment.blade.php
Normal file
3
resources/views/project/application/deployment.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Deployment">
|
||||
<livewire:project.application.poll-deployment :activity="$activity" :deployment_uuid="$deployment_uuid" />
|
||||
</x-applications.layout>
|
@ -1,8 +1,7 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Deployments">
|
||||
<div class="pt-2">
|
||||
@forelse ($deployments as $deployment)
|
||||
<livewire:poll-deployment :deployment_uuid="data_get($deployment->properties, 'deployment_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
|
||||
|
||||
<livewire:project.application.get-deployments :deployment_uuid="data_get($deployment->properties, 'deployment_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
|
||||
@empty
|
||||
<p>No deployments found.</p>
|
||||
@endforelse
|
@ -1,3 +0,0 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Deployment">
|
||||
<livewire:poll-activity :activity="$activity" :deployment_uuid="$deployment_uuid" />
|
||||
</x-applications.layout>
|
4
resources/views/project/new.blade.php
Normal file
4
resources/views/project/new.blade.php
Normal file
@ -0,0 +1,4 @@
|
||||
<x-layout>
|
||||
<h1>New Project</h1>
|
||||
<livewire:project.new-project />
|
||||
</x-layout>
|
@ -3,7 +3,7 @@
|
||||
<div>
|
||||
@foreach ($environment->applications as $application)
|
||||
<p>
|
||||
<a href="{{ route('project.applications.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
|
||||
<a href="{{ route('project.application.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
|
||||
{{ $application->name }}
|
||||
</a>
|
||||
</p>
|
||||
|
@ -23,11 +23,11 @@
|
||||
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::get('/project/new', fn () => view('project.new'))->name('project.new');
|
||||
Route::get(
|
||||
'/project/{project_uuid}',
|
||||
[ProjectController::class, 'environments']
|
||||
@ -80,15 +81,15 @@
|
||||
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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user