Refactor code and add new fields for Kong service

This commit is contained in:
Andras Bacsai
2024-02-28 13:48:39 +01:00
parent c8332ca9bf
commit a43c916009
7 changed files with 723 additions and 282 deletions

View File

@@ -10,7 +10,8 @@ use Livewire\Component;
class Create extends Component
{
public $type;
public function mount() {
public function mount()
{
$services = getServiceTemplates();
$type = str(request()->query('type'));
$destination_uuid = request()->query('destination');
@@ -70,7 +71,7 @@ class Create extends Component
$generatedValue = $value;
if ($value->contains('SERVICE_')) {
$command = $value->after('SERVICE_')->beforeLast('_');
$generatedValue = generateEnvValue($command->value());
$generatedValue = generateEnvValue($command->value(), $service);
}
EnvironmentVariable::create([
'key' => $key,