This commit is contained in:
Andras Bacsai 2023-05-24 15:47:04 +02:00
parent 167379b0e0
commit 64101b3b06
6 changed files with 33 additions and 11 deletions

View File

@ -78,7 +78,7 @@ public function submit()
$application_init = [
'name' => generate_random_name(),
'name' => generate_application_name($git_repository, $git_branch),
'git_repository' => $git_repository,
'git_branch' => $git_branch,
'build_pack' => 'nixpacks',

View File

@ -52,3 +52,8 @@ function generate_random_name()
$cuid = new Cuid2(7);
return Str::kebab("{$generator->getName()}-{$cuid}");
}
function generate_application_name(string $git_repository, string $git_branch)
{
$cuid = new Cuid2(7);
return Str::kebab("{$git_repository}:{$git_branch}-{$cuid}");
}

View File

@ -13,7 +13,7 @@
<li class="{{ request()->is('project/*') || request()->is('projects') ? 'text-warning' : '' }}"
title="Projects">
<a @if (!request()->is('project/*')) href="/projects" @endif>
<a @if (!request()->is('projects')) href="/projects" @endif>
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
@ -25,7 +25,7 @@
</li>
<li class="{{ request()->is('server/*') || request()->is('servers') ? 'text-warning' : '' }}" title="Servers">
<a @if (!request()->is('server/*')) href="/servers" @endif>
<a @if (!request()->is('servers')) href="/servers" @endif>
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />

View File

@ -12,5 +12,6 @@
</ul>
</div>
<x-applications.navbar :application="$application" />
<div class="pt-2 text-sm">{{ data_get($activity, 'properties.status') }}</div>
<livewire:project.application.deployment-logs :activity="$activity" :deployment_uuid="$deployment_uuid" />
</x-layout>

View File

@ -1,9 +1,18 @@
<x-layout>
<h1>Projects</h1>
@forelse ($projects as $project)
<a href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}"
class="box">{{ $project->name }}</a>
@empty
No project found.
@endforelse
<h1 class="py-0">Projects</h1>
<div class="pb-10 text-sm breadcrumbs">
<ul>
<li>
All Projects
</li>
</ul>
</div>
<div class="flex flex-col gap-2">
@forelse ($projects as $project)
<a href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}"
class="box">{{ $project->name }}</a>
@empty
No project found.
@endforelse
</div>
</x-layout>

View File

@ -1,5 +1,12 @@
<x-layout>
<h1>Servers</h1>
<h1 class="py-0">Servers</h1>
<div class="pb-10 text-sm breadcrumbs">
<ul>
<li>
All Servers
</li>
</ul>
</div>
@forelse ($servers as $server)
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
class="box">{{ $server->name }}</a>