Skip to content

Commit

Permalink
breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
melmathari committed Nov 24, 2024
1 parent 13f9b15 commit 4b24d8c
Showing 1 changed file with 56 additions and 19 deletions.
75 changes: 56 additions & 19 deletions resources/views/components/resources/breadcrumbs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,72 @@
<a class="text-xs truncate lg:text-sm"
href="{{ route('project.show', ['project_uuid' => $this->parameters['project_uuid']]) }}">
{{ data_get($resource, 'environment.project.name', 'Undefined Name') }}</a>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold dark:text-warning" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
<x-dropdown>
<x-slot:trigger>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold cursor-pointer dark:text-warning hover:scale-110" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
</x-slot:trigger>
<div class="flex flex-col gap-1">
@foreach($resource->environment->project->resources as $projectResource)
<a href="{{ $projectResource->link() }}" class="dropdown-item">
{{ $projectResource->name }}
</a>
@endforeach
</div>
</x-dropdown>
</div>
</li>
<li>
<div class="flex items-center">
<a class="text-xs truncate lg:text-sm"
href="{{ route('project.resource.index', ['environment_name' => $this->parameters['environment_name'], 'project_uuid' => $this->parameters['project_uuid']]) }}">{{ $this->parameters['environment_name'] }}</a>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold dark:text-warning" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
href="{{ route('project.resource.index', ['environment_name' => $this->parameters['environment_name'], 'project_uuid' => $this->parameters['project_uuid']]) }}">
{{ $this->parameters['environment_name'] }}</a>
<x-dropdown>
<x-slot:trigger>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold cursor-pointer dark:text-warning hover:scale-110" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
</x-slot:trigger>
<div class="flex flex-col gap-1">
@foreach($resource->environment->resources as $envResource)
<a href="{{ $envResource->link() }}" class="dropdown-item">
{{ $envResource->name }}
</a>
@endforeach
</div>
</x-dropdown>
</div>
</li>
<li>
<div class="flex items-center">
<span class="text-xs truncate lg:text-sm">{{ data_get($resource, 'name') }}</span>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold dark:text-warning" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
@if($resource->getMorphClass() !== 'App\Models\Service')
<x-dropdown>
<x-slot:trigger>
<svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold cursor-pointer dark:text-warning hover:scale-110" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
</x-slot:trigger>
<div class="flex flex-col gap-1">
<a href="{{ route('project.application.configuration', $parameters) }}" class="dropdown-item">Configuration</a>
<a href="{{ route('project.application.deployment.index', $parameters) }}" class="dropdown-item">Deployments</a>
<a href="{{ route('project.application.logs', $parameters) }}" class="dropdown-item">Logs</a>
@if (!$resource->destination->server->isSwarm())
<a href="{{ route('project.application.command', $parameters) }}" class="dropdown-item">Terminal</a>
@endif
</div>
</x-dropdown>
@endif
</div>
</li>
@if ($resource->getMorphClass() == 'App\Models\Service')
Expand Down

0 comments on commit 4b24d8c

Please sign in to comment.