From 059748ad3b10233d6c9b3e76ae9005bc6b72a1d9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 11 Feb 2024 15:44:02 +0100 Subject: [PATCH] fix: get service stack as uuid, not name --- app/Livewire/Project/Service/Index.php | 4 ++-- .../views/livewire/project/service/configuration.blade.php | 4 ++-- routes/web.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Livewire/Project/Service/Index.php b/app/Livewire/Project/Service/Index.php index 21009cb44..ede42c2c7 100644 --- a/app/Livewire/Project/Service/Index.php +++ b/app/Livewire/Project/Service/Index.php @@ -27,12 +27,12 @@ public function mount() $this->parameters = get_route_parameters(); $this->query = request()->query(); $this->service = Service::whereUuid($this->parameters['service_uuid'])->firstOrFail(); - $service = $this->service->applications()->whereName($this->parameters['service_name'])->first(); + $service = $this->service->applications()->whereUuid($this->parameters['stack_service_uuid'])->first(); if ($service) { $this->serviceApplication = $service; $this->serviceApplication->getFilesFromServer(); } else { - $this->serviceDatabase = $this->service->databases()->whereName($this->parameters['service_name'])->first(); + $this->serviceDatabase = $this->service->databases()->whereUuid($this->parameters['stack_service_uuid'])->first(); $this->serviceDatabase->getFilesFromServer(); } $this->s3s = currentTeam()->s3s; diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php index 174519aab..2c197c9f4 100644 --- a/resources/views/livewire/project/service/configuration.blade.php +++ b/resources/views/livewire/project/service/configuration.blade.php @@ -76,7 +76,7 @@
+ href="{{ route('project.service.index', [...$parameters, 'stack_service_uuid' => $application->uuid]) }}"> @@ -122,7 +122,7 @@
+ href="{{ route('project.service.index', [...$parameters, 'stack_service_uuid' => $database->uuid]) }}"> diff --git a/routes/web.php b/routes/web.php index 12e3c4a8d..80165f9f8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -163,7 +163,7 @@ }); Route::prefix('project/{project_uuid}/{environment_name}/service/{service_uuid}')->group(function () { Route::get('/', ServiceConfiguration::class)->name('project.service.configuration'); - Route::get('/{service_name}', ServiceIndex::class)->name('project.service.index'); + Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index'); Route::get('/command', ExecuteContainerCommand::class)->name('project.service.command'); Route::get('/tasks/{task_uuid}', ScheduledTaskShow::class)->name('project.service.scheduled-tasks'); });