This commit is contained in:
Andras Bacsai
2023-04-19 12:42:15 +02:00
parent d6c725ea83
commit d947175e4b
35 changed files with 333 additions and 112 deletions

View File

@@ -29,7 +29,7 @@ class ProjectController extends Controller
return view('project.resources', ['project' => $project, 'environment' => $environment]);
}
public function application()
public function application_configuration()
{
$project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
if (!$project) {
@@ -43,10 +43,26 @@ class ProjectController extends Controller
if (!$application) {
return redirect()->route('home');
}
return view('project.application', ['application' => $application, 'deployments' => $application->deployments()]);
return view('project.applications.configuration', ['application' => $application]);
}
public function application_deployments()
{
$project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
if (!$project) {
return redirect()->route('home');
}
$environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']);
if (!$environment) {
return redirect()->route('home');
}
$application = $environment->applications->where('uuid', request()->route('application_uuid'))->first();
if (!$application) {
return redirect()->route('home');
}
return view('project.applications.deployments', ['application' => $application, 'deployments' => $application->deployments()]);
}
public function deployment()
public function application_deployment()
{
$deployment_uuid = request()->route('deployment_uuid');
@@ -64,7 +80,8 @@ class ProjectController extends Controller
}
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
return view('project.deployment', [
return view('project.applications.deployment', [
'application' => $application,
'activity' => $activity,
'deployment_uuid' => $deployment_uuid,
]);