fix:new parser only in dev
This commit is contained in:
@@ -1106,10 +1106,11 @@ class Application extends BaseModel
|
|||||||
if (! $this->docker_compose_raw) {
|
if (! $this->docker_compose_raw) {
|
||||||
return collect([]);
|
return collect([]);
|
||||||
}
|
}
|
||||||
|
if (isDev()) {
|
||||||
|
$compose = dockerComposeParserForApplications($this);
|
||||||
|
|
||||||
// $compose = dockerComposeParserForApplications($this);
|
return $compose;
|
||||||
|
}
|
||||||
// return $compose;
|
|
||||||
$isNew = false;
|
$isNew = false;
|
||||||
|
|
||||||
$isSameDockerComposeFile = false;
|
$isSameDockerComposeFile = false;
|
||||||
|
|||||||
@@ -1167,10 +1167,23 @@ function dockerComposeParserForApplications(Application $application): Collectio
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ray($environment);
|
||||||
$environment = $application->environment_variables()->where('application_id', $application->id)->get()->mapWithKeys(function ($item) {
|
$environment = $application->environment_variables()->where('application_id', $application->id)->get()->mapWithKeys(function ($item) {
|
||||||
return [$item['key'] => $item['value']];
|
return [$item['key'] => $item['value']];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if ($environment?->count() > 0) {
|
||||||
|
// $environment = $environment->map(function ($value, $key) use ($application) {
|
||||||
|
// $found = $application->environment_variables()->where('key', $key)->where('application_id', $application->id)->first();
|
||||||
|
// if ($found) {
|
||||||
|
// $value = $found->value;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return $value;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
$fqdns = collect([]);
|
$fqdns = collect([]);
|
||||||
if ($application?->serviceType()) {
|
if ($application?->serviceType()) {
|
||||||
|
|||||||
@@ -254,9 +254,11 @@
|
|||||||
helper="You need to modify the docker compose file." monacoEditorLanguage="yaml"
|
helper="You need to modify the docker compose file." monacoEditorLanguage="yaml"
|
||||||
useMonacoEditor />
|
useMonacoEditor />
|
||||||
@else
|
@else
|
||||||
{{-- <x-forms.textarea rows="10" readonly id="application.docker_compose_raw"
|
@if (isDev())
|
||||||
label="Docker Compose Content (raw)" helper="You need to modify the docker compose file."
|
<x-forms.textarea rows="10" readonly id="application.docker_compose_raw"
|
||||||
monacoEditorLanguage="yaml" useMonacoEditor /> --}}
|
label="Docker Compose Content (raw)" helper="You need to modify the docker compose file."
|
||||||
|
monacoEditorLanguage="yaml" useMonacoEditor />
|
||||||
|
@endif
|
||||||
<x-forms.textarea rows="10" readonly id="application.docker_compose"
|
<x-forms.textarea rows="10" readonly id="application.docker_compose"
|
||||||
label="Docker Compose Content" helper="You need to modify the docker compose file."
|
label="Docker Compose Content" helper="You need to modify the docker compose file."
|
||||||
monacoEditorLanguage="yaml" useMonacoEditor />
|
monacoEditorLanguage="yaml" useMonacoEditor />
|
||||||
|
|||||||
Reference in New Issue
Block a user