refactor(environment-variables): simplify application build pack check in environment variable handling
This commit is contained in:
@@ -57,7 +57,7 @@ class EnvironmentVariable extends BaseModel
|
|||||||
|
|
||||||
if (! $found) {
|
if (! $found) {
|
||||||
$application = Application::find($environment_variable->resourceable_id);
|
$application = Application::find($environment_variable->resourceable_id);
|
||||||
if ($application && $application->build_pack !== 'dockerfile') {
|
if ($application) {
|
||||||
ModelsEnvironmentVariable::create([
|
ModelsEnvironmentVariable::create([
|
||||||
'key' => $environment_variable->key,
|
'key' => $environment_variable->key,
|
||||||
'value' => $environment_variable->value,
|
'value' => $environment_variable->value,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
wire:click='switch'>{{ $view === 'normal' ? 'Developer view' : 'Normal view' }}</x-forms.button>
|
wire:click='switch'>{{ $view === 'normal' ? 'Developer view' : 'Normal view' }}</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
<div>Environment variables (secrets) for this resource. </div>
|
<div>Environment variables (secrets) for this resource. </div>
|
||||||
@if ($this->resourceClass === 'App\Models\Application' && data_get($this->resource, 'build_pack') !== 'dockercompose')
|
@if ($resourceClass === 'App\Models\Application' && data_get($resource, 'build_pack') !== 'dockercompose')
|
||||||
<div class="w-64 pt-2">
|
<div class="w-64 pt-2">
|
||||||
<x-forms.checkbox id="is_env_sorting_enabled" label="Sort alphabetically"
|
<x-forms.checkbox id="is_env_sorting_enabled" label="Sort alphabetically"
|
||||||
helper="Turn this off if one environment is dependent on an other. It will be sorted by creation order (like you pasted them or in the order you created them)."
|
helper="Turn this off if one environment is dependent on an other. It will be sorted by creation order (like you pasted them or in the order you created them)."
|
||||||
|
|||||||
Reference in New Issue
Block a user