fix: server view for link()
This commit is contained in:
parent
c3882b75c1
commit
0670e6c1d6
@ -50,11 +50,14 @@ class Application extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.application.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'application_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.application.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'application_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function settings()
|
||||
{
|
||||
|
@ -363,11 +363,14 @@ class Service extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.service.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'service_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.service.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'service_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function documentation()
|
||||
{
|
||||
|
@ -43,11 +43,14 @@ class StandaloneMariadb extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'database_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'database_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
|
@ -50,11 +50,14 @@ class StandaloneMongodb extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'database_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'database_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function mongoInitdbRootPassword(): Attribute
|
||||
{
|
||||
|
@ -43,11 +43,14 @@ class StandaloneMysql extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'database_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'database_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function type(): string
|
||||
{
|
||||
|
@ -43,11 +43,14 @@ class StandalonePostgresql extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'database_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'database_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
|
@ -38,11 +38,14 @@ class StandaloneRedis extends BaseModel
|
||||
}
|
||||
public function link()
|
||||
{
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => $this->environment->project->uuid,
|
||||
'environment_name' => $this->environment->name,
|
||||
'database_uuid' => $this->uuid
|
||||
]);
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
return route('project.database.configuration', [
|
||||
'project_uuid' => data_get($this, 'environment.project.uuid'),
|
||||
'environment_name' => data_get($this, 'environment.name'),
|
||||
'database_uuid' => data_get($this, 'uuid')
|
||||
]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
|
@ -25,10 +25,17 @@
|
||||
@if ($loop->first)
|
||||
<h3 class="pt-4">Defined resources</h3>
|
||||
@endif
|
||||
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</a>
|
||||
@if ($resource->link())
|
||||
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</a>
|
||||
@else
|
||||
<div class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</div>
|
||||
@endif
|
||||
@empty
|
||||
@endforelse
|
||||
</div>
|
||||
@ -38,10 +45,17 @@
|
||||
@if ($loop->first)
|
||||
<h3 class="pt-4">Defined resources</h3>
|
||||
@endif
|
||||
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</a>
|
||||
@if ($resource->link())
|
||||
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</a>
|
||||
@else
|
||||
<div class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline">
|
||||
<div class="w-64">{{ str($resource->type())->headline() }}</div>
|
||||
<div>{{ $resource->name }}</div>
|
||||
</div>
|
||||
@endif
|
||||
@empty
|
||||
@endforelse
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user