fix: get service stack as uuid, not name
This commit is contained in:
parent
a334f998a2
commit
059748ad3b
@ -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;
|
||||
|
@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<div class="flex items-center px-4">
|
||||
<a class="flex flex-col flex-1 group-hover:text-white hover:no-underline"
|
||||
href="{{ route('project.service.index', [...$parameters, 'service_name' => $application->name]) }}">
|
||||
href="{{ route('project.service.index', [...$parameters, 'stack_service_uuid' => $application->uuid]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
<div class="flex items-center px-4">
|
||||
<a class="flex flex-col flex-1 group-hover:text-white hover:no-underline"
|
||||
href="{{ route('project.service.index', [...$parameters, 'service_name' => $database->name]) }}">
|
||||
href="{{ route('project.service.index', [...$parameters, 'stack_service_uuid' => $database->uuid]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
|
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user