@php $showEnvironmentType = $showPreview; $activeFilterCount = count($variableFilters) + count($serviceFilters) + ($environmentFilter !== 'all' ? 1 : 0); $filterLabels = [ 'managed' => 'Managed', 'user' => 'User-defined', 'buildtime' => 'Buildtime', 'runtime' => 'Runtime', 'multiline' => 'Multiline', 'literal' => 'Literal', ]; $activeFilterLabels = collect($variableFilters)->map(fn ($filter) => $filterLabels[$filter] ?? $filter); $activeFilterLabels = $activeFilterLabels->merge($serviceFilters); if ($environmentFilter !== 'all') { $activeFilterLabels->push(str($environmentFilter)->headline()->toString()); } $activeFilterText = $activeFilterLabels->implode(', '); @endphp
@can('manageEnvironment', $resource) {{ $view === 'normal' ? 'Developer view' : 'Normal view' }} @endcan @if ($view === 'normal') @if ($resourceClass === 'App\Models\Application')
@if (data_get($resource, 'build_pack') !== 'dockercompose') @endif
@else

Manage this resource's environment variables below.

@endif @else
@can('manageEnvironment', $resource) Inline comments with space before # (e.g., KEY=value #comment) are stripped. @if ($showPreview) @endif @else @if ($showPreview) @endif @endcan @endif
{{-- Toolbar: search left; filter and add right --}} @if ($view === 'normal') @foreach ([ 'managed' => 'Managed', 'user' => 'User-defined', 'buildtime' => 'Buildtime', 'runtime' => 'Runtime', 'multiline' => 'Multiline', 'literal' => 'Literal', ] as $value => $label) @endforeach @if ($showPreview)
@foreach (['all' => 'All environments', 'production' => 'Production', 'preview' => 'Preview'] as $value => $label) @endforeach @endif @if ($this->serviceFilterOptions !== [])
Services
@foreach ($this->serviceFilterOptions as $serviceName) @endforeach @endif
@foreach (['default' => 'Default order', 'name_asc' => 'Name A–Z', 'name_desc' => 'Name Z–A'] as $value => $label) @endforeach @can('manageEnvironment', $resource) {{-- Do not disable Add based on readyToLoad: modal-input uses wire:ignore, so a disabled attribute painted on first load would never re-enable. --}} @endcan
@endif @if ($view === 'normal') @if (! $readyToLoad)
@else @php $totalRows = $this->environmentVariableRowCount; $currentPage = $this->currentEnvironmentVariablePage; $lastPage = $this->environmentVariableLastPage; $firstVisibleRow = $totalRows === 0 ? 0 : ($currentPage - 1) * $perPage + 1; $lastVisibleRow = min($currentPage * $perPage, $totalRows); @endphp
@if ($this->isSearchActive && $totalRows === 0) @elseif ($totalRows > 0)
Name Managed @if ($showEnvironmentType) Type @endif Literal Multiline Buildtime Runtime
@foreach ($this->environmentVariablePageRows as $row) @if ($row['kind'] === 'managed') @else @endif @endforeach
@else
@endif
@endif @endif