redirect to server show page if a gateway is not installed on a given server
This commit is contained in:
@@ -16,7 +16,13 @@ class EnvironmentController extends Controller
|
||||
return inertia('environments/Show', [
|
||||
'environment' => $environment,
|
||||
'servers' => inertia()->optional(function () use ($environment) {
|
||||
return $environment->application?->organisation?->servers->where('status', ServerStatus::ACTIVE)?->values() ?? [];
|
||||
return $environment
|
||||
->application
|
||||
?->organisation
|
||||
?->servers()
|
||||
->where('status', ServerStatus::ACTIVE)
|
||||
->with('services')
|
||||
->get() ?? [];
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user