diff --git a/app/Models/Application.php b/app/Models/Application.php index 7481747eb..673b9b402 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -43,6 +43,15 @@ class Application extends BaseModel 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( diff --git a/resources/views/components/applications/navbar.blade.php b/resources/views/components/applications/navbar.blade.php index f4fb53b46..2e97cbba7 100644 --- a/resources/views/components/applications/navbar.blade.php +++ b/resources/views/components/applications/navbar.blade.php @@ -1,5 +1,12 @@ diff --git a/resources/views/project/application/configuration.blade.php b/resources/views/project/application/configuration.blade.php index c75e37f39..47d5dafff 100644 --- a/resources/views/project/application/configuration.blade.php +++ b/resources/views/project/application/configuration.blade.php @@ -1,6 +1,6 @@

Configuration

- +