commit
ab853cac87
@ -65,7 +65,11 @@ class Show extends Component
|
|||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
$this->env->delete();
|
try {
|
||||||
$this->dispatch('refreshEnvs');
|
$this->env->delete();
|
||||||
|
$this->dispatch('refreshEnvs');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return handleError($e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,16 @@ class Add extends Component
|
|||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->parameters = get_route_parameters();
|
$this->parameters = get_route_parameters();
|
||||||
$applicationUuid = $this->parameters['application_uuid'];
|
if (data_get($this->parameters, 'application_uuid')) {
|
||||||
$application = Application::where('uuid', $applicationUuid)->first();
|
$applicationUuid = $this->parameters['application_uuid'];
|
||||||
if (!$application) {
|
$application = Application::where('uuid', $applicationUuid)->first();
|
||||||
abort(404);
|
if (!$application) {
|
||||||
}
|
abort(404);
|
||||||
if ($application->destination->server->isSwarm()) {
|
}
|
||||||
$this->isSwarm = true;
|
if ($application->destination->server->isSwarm()) {
|
||||||
$this->rules['host_path'] = 'required|string';
|
$this->isSwarm = true;
|
||||||
|
$this->rules['host_path'] = 'required|string';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1330,7 +1330,8 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
if ($value?->startsWith('$')) {
|
if ($value?->startsWith('$')) {
|
||||||
$foundEnv = EnvironmentVariable::where([
|
$foundEnv = EnvironmentVariable::where([
|
||||||
'key' => $key,
|
'key' => $key,
|
||||||
'service_id' => $resource->id,
|
'application_id' => $resource->id,
|
||||||
|
'is_preview' => false,
|
||||||
])->first();
|
])->first();
|
||||||
$value = Str::of(replaceVariables($value));
|
$value = Str::of(replaceVariables($value));
|
||||||
$key = $value;
|
$key = $value;
|
||||||
@ -1397,14 +1398,22 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
$defaultValue = data_get($foundEnv, 'value');
|
$defaultValue = data_get($foundEnv, 'value');
|
||||||
}
|
}
|
||||||
$isBuildTime = data_get($foundEnv, 'is_build_time', false);
|
$isBuildTime = data_get($foundEnv, 'is_build_time', false);
|
||||||
EnvironmentVariable::updateOrCreate([
|
if ($foundEnv) {
|
||||||
'key' => $key->value(),
|
$foundEnv->update([
|
||||||
'application_id' => $resource->id,
|
'key' => $key,
|
||||||
], [
|
'application_id' => $resource->id,
|
||||||
'value' => $defaultValue,
|
'is_build_time' => $isBuildTime,
|
||||||
'is_build_time' => $isBuildTime,
|
'value' => $defaultValue,
|
||||||
'application_id' => $resource->id,
|
]);
|
||||||
]);
|
} else {
|
||||||
|
EnvironmentVariable::create([
|
||||||
|
'key' => $key,
|
||||||
|
'value' => $defaultValue,
|
||||||
|
'is_build_time' => $isBuildTime,
|
||||||
|
'application_id' => $resource->id,
|
||||||
|
'is_preview' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ return [
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||||
'release' => '4.0.0-beta.168',
|
'release' => '4.0.0-beta.169',
|
||||||
// When left empty or `null` the Laravel environment will be used
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.168';
|
return '4.0.0-beta.169';
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"version": "3.12.36"
|
"version": "3.12.36"
|
||||||
},
|
},
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.168"
|
"version": "4.0.0-beta.169"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user