
- Introduced `environment_uuid` as a required field in various API endpoints and schemas. - Updated descriptions to clarify that either `environment_name` or `environment_uuid` must be provided. - Modified routes and controller methods to accommodate the new UUID parameter. - Adjusted frontend components to utilize `environment_uuid` for better consistency and clarity. - Removed deprecated fields related to environment handling. This change enhances the API's flexibility in identifying environments, improving overall usability.
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Application;
|
|
|
|
use App\Models\Application;
|
|
use Livewire\Component;
|
|
|
|
class Configuration extends Component
|
|
{
|
|
public $currentRoute;
|
|
|
|
public Application $application;
|
|
|
|
public $project;
|
|
|
|
public $environment;
|
|
|
|
public $servers;
|
|
|
|
protected $listeners = ['buildPackUpdated' => '$refresh'];
|
|
|
|
public function mount()
|
|
{
|
|
$this->currentRoute = request()->route()->getName();
|
|
$project = currentTeam()
|
|
->projects()
|
|
->select('id', 'uuid', 'team_id')
|
|
->where('uuid', request()->route('project_uuid'))
|
|
->firstOrFail();
|
|
$environment = $project->environments()
|
|
->select('id', 'uuid', 'name', 'project_id')
|
|
->where('uuid', request()->route('environment_uuid'))
|
|
->firstOrFail();
|
|
$application = $environment->applications()
|
|
->with(['destination'])
|
|
->where('uuid', request()->route('application_uuid'))
|
|
->firstOrFail();
|
|
|
|
$this->project = $project;
|
|
$this->environment = $environment;
|
|
$this->application = $application;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.project.application.configuration');
|
|
}
|
|
}
|