This commit is contained in:
Andras Bacsai 2023-06-08 08:18:14 +02:00
parent 91fb7b09bf
commit 5286aa2b1d
14 changed files with 29 additions and 83 deletions

View File

@ -2,12 +2,15 @@
namespace App\Exceptions;
use App\Models\InstanceSettings;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
use Sentry\Laravel\Integration;
class Handler extends ExceptionHandler
{
private InstanceSettings $settings;
/**
* A list of exception types with their corresponding custom log levels.
*
@ -43,6 +46,10 @@ class Handler extends ExceptionHandler
public function register(): void
{
$this->reportable(function (Throwable $e) {
$this->settings = InstanceSettings::get();
if ($this->settings->do_no_track) {
return;
}
Integration::captureUnhandledException($e);
});
}

View File

@ -86,7 +86,8 @@
<ul v-if="magic.length != 0" class="mt-2 -mx-4 text-sm text-white">
<li class="flex items-center px-4 py-2 transition-all cursor-pointer select-none group hover:bg-coolgray-400"
:class="{ 'bg-coollabs': currentFocus === index }" id="option-1" role="option"
tabindex="-1" v-for="action, index in magic" @click="goThroughSequence(index)">
tabindex="-1" v-for="action, index in magic" @click="goThroughSequence(index)"
ref="magicItems">
<div class="relative">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 icon" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@ -182,6 +183,7 @@
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from 'vue'
import axios from "axios";
const currentFocus = ref(0)
const magicItems = ref()
function focusNext(length) {
if (currentFocus.value === undefined) {
currentFocus.value = 0
@ -190,6 +192,9 @@ function focusNext(length) {
currentFocus.value = currentFocus.value + 1
}
}
if (currentFocus.value > 4) {
magicItems.value[currentFocus.value].scrollIntoView({ block: "center", inline: "center", behavior: 'auto' })
}
}
function focusPrev(length) {
if (currentFocus.value === undefined) {
@ -199,6 +204,9 @@ function focusPrev(length) {
currentFocus.value = currentFocus.value - 1
}
}
if (currentFocus.value < length - 4) {
magicItems.value[currentFocus.value].scrollIntoView({ block: "center", inline: "center", behavior: 'auto' })
}
}
async function callAction() {
await goThroughSequence(currentFocus.value)

View File

@ -1,12 +1,6 @@
<x-layout>
<h1>Command Center</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Execute commands on your servers without leaving the browser.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Execute commands on your servers without leaving the browser.</div>
@if ($servers->count() > 0)
<livewire:run-command :servers="$servers" />
@else

View File

@ -1,13 +1,6 @@
<div class="pb-6">
<h1>Server</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
{{ data_get($server, 'name') }}
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">{{ data_get($server, 'name') }}</div>
<nav class="flex items-center h-12 gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('server.show') ? 'text-white' : '' }}"
href="{{ route('server.show', [

View File

@ -1,12 +1,6 @@
<div class="pb-6">
<h1>Settings</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Instance wide settings for Coolify.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Instance wide settings for Coolify.</div>
<nav class="flex items-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('settings.configuration') ? 'text-white' : '' }}"
href="{{ route('settings.configuration') }}">

View File

@ -1,13 +1,6 @@
<x-layout>
<h1>Dashboard</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Something (more) useful will be here.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Something (more) useful will be here.</div>
<div class="w-full rounded shadow stats stats-vertical lg:stats-horizontal">
<div class="stat">
<div class="stat-title">Servers</div>

View File

@ -1,12 +1,6 @@
<div>
<h1>Create a new Destination</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Destinations are used to separate resources in a server.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Destinations are used to segregate resources by network.</div>
<form class="flex flex-col gap-4" wire:submit.prevent='submit'>
<div class="flex gap-2">
<x-forms.input id="name" label="Name" required />

View File

@ -1,12 +1,6 @@
<div>
<h1>Create a new Server</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Servers are the main blocks of your infrastructure.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Servers are the main blocks of your infrastructure.</div>
<form class="flex flex-col gap-2" wire:submit.prevent='submit'>
<div class="flex gap-2">
<x-forms.input id="name" label="Name" required />

View File

@ -33,7 +33,8 @@
</div>
@else
<div>
<h2>Select a Proxy</h2>
<h2>Proxy</h2>
<x-forms.button wire:click="setProxy('{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}')">Traefik v2
</x-forms.button>
</div>

View File

@ -1,11 +1,5 @@
<x-layout>
<h1>Create a new Private Key</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Private Keys are used for connection to servers.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Private Keys are used for connection to servers.</div>
<livewire:private-key.create />
</x-layout>

View File

@ -1,13 +1,6 @@
<x-layout>
<h1>Profile</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
Your user profile settings.
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">Your user profile settings.</div>
<livewire:profile.form :request="$request" />
<h3 class="py-4">Two-factor Authentication</h3>
@if (session('status') == 'two-factor-authentication-enabled')

View File

@ -3,13 +3,7 @@
<h1>Environments</h1>
<livewire:project.delete-project :project_id="$project->id" :resource_count="$project->applications->count()" />
</div>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
{{ $project->name }}
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">{{ $project->name }}.</div>
<div class="grid grid-cols-2 gap-2">
@forelse ($project->environments as $environment)
<a class="box" href="{{ route('project.resources', [$project->uuid, $environment->name]) }}">

View File

@ -1,13 +1,6 @@
<x-layout>
<h1>Projects</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
All Projects
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">All Projects</div>
<div class="grid grid-cols-2 gap-2">
@forelse ($projects as $project)
<a href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}"

View File

@ -1,12 +1,6 @@
<x-layout>
<h1>Servers</h1>
<nav class="flex pt-2 pb-10 text-sm">
<ol class="inline-flex items-center">
<li class="inline-flex items-center">
All Servers
</li>
</ol>
</nav>
<div class="pt-2 pb-10 text-sm">All Servers</div>
<div class="grid grid-cols-2 gap-2">
@forelse ($servers as $server)
<a class="text-center hover:no-underline box group"