open on git
This commit is contained in:
parent
a37f748639
commit
dfecf2cc60
@ -43,6 +43,15 @@ public function publishDirectory(): Attribute
|
||||
set: fn ($value) => $value ? '/' . ltrim($value, '/') : null,
|
||||
);
|
||||
}
|
||||
public function gitLocation(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => is_null($this->git_commit_sha)
|
||||
? "{$this->source->html_url}/{$this->git_repository}/tree/{$this->git_branch}"
|
||||
: "{$this->source->html_url}/{$this->git_repository}/tree/{$this->git_commit_sha}"
|
||||
|
||||
);
|
||||
}
|
||||
public function baseDirectory(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
@ -1,5 +1,12 @@
|
||||
<nav class="flex gap-4 py-2">
|
||||
<a href="{{ route('project.application.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||
<a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||
<a target="_blank" href="{{ $gitLocation }}">
|
||||
<x-inputs.button>Open on Git ↗️</x-inputs.button>
|
||||
</a>
|
||||
<a href="{{ route('project.application.configuration', Route::current()->parameters()) }}">
|
||||
<x-inputs.button>Configuration</x-inputs.button>
|
||||
</a>
|
||||
<a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">
|
||||
<x-inputs.button>Deployments</x-inputs.button>
|
||||
</a>
|
||||
<livewire:project.application.deploy :applicationId="$applicationId" />
|
||||
</nav>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<x-layout>
|
||||
<h1>Configuration</h1>
|
||||
<x-applications.navbar :applicationId="$application->id" />
|
||||
<x-applications.navbar :applicationId="$application->id" :gitLocation="$application->gitLocation" />
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }">
|
||||
<div class="flex gap-4">
|
||||
<a :class="activeTab === 'general' && 'text-purple-500'"
|
||||
|
@ -1,5 +1,5 @@
|
||||
<x-layout>
|
||||
<h1>Deployment</h1>
|
||||
<x-applications.navbar :applicationId="$application->id" />
|
||||
<x-applications.navbar :applicationId="$application->id" :gitLocation="$application->gitLocation" />
|
||||
<livewire:project.application.poll-deployment :activity="$activity" :deployment_uuid="$deployment_uuid" />
|
||||
</x-layout>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<x-layout>
|
||||
<h1>Deployments</h1>
|
||||
<x-applications.navbar :applicationId="$application->id" />
|
||||
<x-applications.navbar :applicationId="$application->id" :gitLocation="$application->gitLocation" />
|
||||
<div class="pt-2">
|
||||
@forelse ($deployments as $deployment)
|
||||
<livewire:project.application.get-deployments :deployment_uuid="data_get($deployment->properties, 'type_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
|
||||
|
Loading…
Reference in New Issue
Block a user