move files around
This commit is contained in:
@@ -21,7 +21,7 @@ class ApplicationController extends Controller
|
|||||||
if (!$application) {
|
if (!$application) {
|
||||||
return redirect()->route('home');
|
return redirect()->route('home');
|
||||||
}
|
}
|
||||||
return view('project.applications.configuration', ['application' => $application]);
|
return view('project.application.configuration', ['application' => $application]);
|
||||||
}
|
}
|
||||||
public function deployments()
|
public function deployments()
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ class ApplicationController extends Controller
|
|||||||
if (!$application) {
|
if (!$application) {
|
||||||
return redirect()->route('home');
|
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()
|
public function deployment()
|
||||||
@@ -58,7 +58,7 @@ class ApplicationController extends Controller
|
|||||||
}
|
}
|
||||||
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
|
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
|
||||||
|
|
||||||
return view('project.applications.deployment', [
|
return view('project.application.deployment', [
|
||||||
'application' => $application,
|
'application' => $application,
|
||||||
'activity' => $activity,
|
'activity' => $activity,
|
||||||
'deployment_uuid' => $deployment_uuid,
|
'deployment_uuid' => $deployment_uuid,
|
||||||
|
@@ -46,7 +46,7 @@ class ProjectController extends Controller
|
|||||||
if (!$application) {
|
if (!$application) {
|
||||||
return redirect()->route('home');
|
return redirect()->route('home');
|
||||||
}
|
}
|
||||||
return view('project.applications.configuration', ['application' => $application]);
|
return view('project.application.configuration', ['application' => $application]);
|
||||||
}
|
}
|
||||||
public function application_deployments()
|
public function application_deployments()
|
||||||
{
|
{
|
||||||
@@ -62,7 +62,7 @@ class ProjectController extends Controller
|
|||||||
if (!$application) {
|
if (!$application) {
|
||||||
return redirect()->route('home');
|
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()
|
public function application_deployment()
|
||||||
@@ -83,7 +83,7 @@ class ProjectController extends Controller
|
|||||||
}
|
}
|
||||||
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
|
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
|
||||||
|
|
||||||
return view('project.applications.deployment', [
|
return view('project.application.deployment', [
|
||||||
'application' => $application,
|
'application' => $application,
|
||||||
'activity' => $activity,
|
'activity' => $activity,
|
||||||
'deployment_uuid' => $deployment_uuid,
|
'deployment_uuid' => $deployment_uuid,
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use App\Jobs\DeployApplicationJob;
|
use App\Jobs\DeployApplicationJob;
|
||||||
use App\Models\Application;
|
use App\Models\Application;
|
||||||
@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Route;
|
|||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Visus\Cuid2\Cuid2;
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
class DeployApplication extends Component
|
class Deploy extends Component
|
||||||
{
|
{
|
||||||
public string $applicationId;
|
public string $applicationId;
|
||||||
public $activity;
|
public $activity;
|
||||||
@@ -35,7 +35,7 @@ class DeployApplication extends Component
|
|||||||
}
|
}
|
||||||
protected function redirectToDeployment()
|
protected function redirectToDeployment()
|
||||||
{
|
{
|
||||||
return redirect()->route('project.applications.deployment', $this->parameters);
|
return redirect()->route('project.application.deployment', $this->parameters);
|
||||||
}
|
}
|
||||||
public function start()
|
public function start()
|
||||||
{
|
{
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire\Application;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire\Application;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire\Application;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use App\Models\Application;
|
use App\Models\Application;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
|
|
||||||
class PollDeployment extends Component
|
class GetDeployments extends Component
|
||||||
{
|
{
|
||||||
public string $deployment_uuid;
|
public string $deployment_uuid;
|
||||||
public string $created_at;
|
public string $created_at;
|
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
|
|
||||||
class PollActivity extends Component
|
class PollDeployment extends Component
|
||||||
{
|
{
|
||||||
public $activity;
|
public $activity;
|
||||||
public $isKeepAliveOn = true;
|
public $isKeepAliveOn = true;
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire\Application;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use App\Models\Application;
|
use App\Models\Application;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Livewire\Application;
|
namespace App\Http\Livewire\Project\Application;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Livewire\Component;
|
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">
|
<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.application.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||||
<a href="{{ route('project.applications.deployments', Route::current()->parameters()) }}">Deployments</a>
|
<a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||||
<livewire:deploy-application :applicationId="$applicationId" />
|
<livewire:project.application.deploy :applicationId="$applicationId" />
|
||||||
</nav>
|
</nav>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<x-layout>
|
<x-layout>
|
||||||
<h1>Projects</h1>
|
<h1>Projects <button><a class="no-underline" href="{{ route('project.new') }}">New</a></button></h1>
|
||||||
@forelse ($projects as $project)
|
@forelse ($projects as $project)
|
||||||
<a href="{{ route('project.environments', [$project->uuid]) }}">{{ data_get($project, 'name') }}</a>
|
<a href="{{ route('project.environments', [$project->uuid]) }}">{{ data_get($project, 'name') }}</a>
|
||||||
@empty
|
@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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'general'">
|
<div x-cloak x-show="tab === 'general'">
|
||||||
<livewire:application.general :applicationId="$application->id" />
|
<livewire:project.application.general :applicationId="$application->id" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'envs'">
|
<div x-cloak x-show="tab === 'envs'">
|
||||||
<livewire:application.environment-variables />
|
<livewire:project.application.environment-variables />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'source'">
|
<div x-cloak x-show="tab === 'source'">
|
||||||
<livewire:application.source :applicationId="$application->id" />
|
<livewire:project.application.source :applicationId="$application->id" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'destination'">
|
<div x-cloak x-show="tab === 'destination'">
|
||||||
<livewire:application.destination :destination="$application->destination" />
|
<livewire:project.application.destination :destination="$application->destination" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'storages'">
|
<div x-cloak x-show="tab === 'storages'">
|
||||||
<livewire:application.storages :storages="$application->persistentStorages" />
|
<livewire:project.application.storages :storages="$application->persistentStorages" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</x-applications.layout>
|
</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">
|
<x-applications.layout :applicationId="$application->id" title="Deployments">
|
||||||
<div class="pt-2">
|
<div class="pt-2">
|
||||||
@forelse ($deployments as $deployment)
|
@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
|
@empty
|
||||||
<p>No deployments found.</p>
|
<p>No deployments found.</p>
|
||||||
@endforelse
|
@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>
|
<div>
|
||||||
@foreach ($environment->applications as $application)
|
@foreach ($environment->applications as $application)
|
||||||
<p>
|
<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 }}
|
{{ $application->name }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
@@ -23,11 +23,11 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
$projects = session('currentTeam')->load(['projects'])->projects;
|
$projects = session('currentTeam')->load(['projects'])->projects;
|
||||||
$servers = session('currentTeam')->load(['servers'])->servers;
|
$servers = session('currentTeam')->load(['servers'])->servers;
|
||||||
return view('home', [
|
return view('dashboard', [
|
||||||
'servers' => $servers->sortBy('name'),
|
'servers' => $servers->sortBy('name'),
|
||||||
'projects' => $projects->sortBy('name')
|
'projects' => $projects->sortBy('name')
|
||||||
]);
|
]);
|
||||||
})->name('home');
|
})->name('dashboard');
|
||||||
|
|
||||||
Route::get('/profile', function () {
|
Route::get('/profile', function () {
|
||||||
return view('profile');
|
return view('profile');
|
||||||
@@ -67,6 +67,7 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function () {
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
Route::get('/project/new', fn () => view('project.new'))->name('project.new');
|
||||||
Route::get(
|
Route::get(
|
||||||
'/project/{project_uuid}',
|
'/project/{project_uuid}',
|
||||||
[ProjectController::class, 'environments']
|
[ProjectController::class, 'environments']
|
||||||
@@ -80,15 +81,15 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get(
|
Route::get(
|
||||||
'/project/{project_uuid}/{environment_name}/application/{application_uuid}',
|
'/project/{project_uuid}/{environment_name}/application/{application_uuid}',
|
||||||
[ApplicationController::class, 'configuration']
|
[ApplicationController::class, 'configuration']
|
||||||
)->name('project.applications.configuration');
|
)->name('project.application.configuration');
|
||||||
|
|
||||||
Route::get(
|
Route::get(
|
||||||
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment',
|
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment',
|
||||||
[ApplicationController::class, 'deployments']
|
[ApplicationController::class, 'deployments']
|
||||||
)->name('project.applications.deployments');
|
)->name('project.application.deployments');
|
||||||
|
|
||||||
Route::get(
|
Route::get(
|
||||||
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}',
|
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}',
|
||||||
[ApplicationController::class, 'deployment']
|
[ApplicationController::class, 'deployment']
|
||||||
)->name('project.applications.deployment');
|
)->name('project.application.deployment');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user