css and stuffs
This commit is contained in:
parent
f2e91f97ed
commit
b58a3bf209
9
app/Http/Livewire/Project/Application/Danger.php
Normal file
9
app/Http/Livewire/Project/Application/Danger.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Danger extends Component
|
||||
{
|
||||
}
|
@ -2,10 +2,7 @@
|
||||
|
||||
namespace App\Http\Livewire\Project\Application\EnvironmentVariable;
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\EnvironmentVariable as ModelsEnvironmentVariable;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
|
@ -17,6 +17,7 @@ public function revertImage($tag)
|
||||
}
|
||||
public function loadImages()
|
||||
{
|
||||
sleep(2);
|
||||
try {
|
||||
$image = $this->application->uuid;
|
||||
$output = instantRemoteProcess([
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\LocalPersistentVolume;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Livewire\Component;
|
||||
|
||||
class All extends Component
|
||||
|
@ -11,6 +11,8 @@ class Change extends Component
|
||||
public string $host;
|
||||
public $parameters;
|
||||
public GithubApp $github_app;
|
||||
public string $installation_url;
|
||||
public string $name;
|
||||
public bool $is_system_wide;
|
||||
|
||||
protected $rules = [
|
||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@ -7,7 +7,8 @@
|
||||
"dependencies": {
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"alpinejs": "3.12.0",
|
||||
"daisyui": "^2.51.6"
|
||||
"daisyui": "^2.51.6",
|
||||
"tailwindcss-scrollbar": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
@ -1883,6 +1884,14 @@
|
||||
"postcss": "^8.0.9"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss-scrollbar": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss-scrollbar/-/tailwindcss-scrollbar-0.1.0.tgz",
|
||||
"integrity": "sha512-egipxw4ooQDh94x02XQpPck0P0sfwazwoUGfA9SedPATIuYDR+6qe8d31Gl7YsSMRiOKDkkqfI0kBvEw9lT/Hg==",
|
||||
"peerDependencies": {
|
||||
"tailwindcss": ">= 2.x.x"
|
||||
}
|
||||
},
|
||||
"node_modules/thenify": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
|
||||
|
@ -17,6 +17,7 @@
|
||||
"dependencies": {
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"alpinejs": "3.12.0",
|
||||
"daisyui": "^2.51.6"
|
||||
"daisyui": "^2.51.6",
|
||||
"tailwindcss-scrollbar": "^0.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -2,32 +2,43 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
* {
|
||||
@apply scrollbar-thumb-yellow-400 scrollbar-track-coolgray-200 scrollbar-w-1;
|
||||
}
|
||||
html {
|
||||
@apply h-full min-h-full bg-coolgray-100 ;
|
||||
}
|
||||
body {
|
||||
@apply bg-coolgray-100 text-white;
|
||||
@apply bg-coolgray-100 text-white min-h-full antialiased;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
@apply toggle toggle-warning toggle-sm;
|
||||
}
|
||||
input {
|
||||
@apply input w-full max-w-xl input-bordered input-sm;
|
||||
@apply input input-sm;
|
||||
}
|
||||
textarea {
|
||||
@apply textarea textarea-sm;
|
||||
input[type="text"],[type="number"],[type="email"],[type="password"] {
|
||||
@apply read-only:opacity-40;
|
||||
}
|
||||
|
||||
/* input,
|
||||
textarea {
|
||||
@apply border border-solid border-coolgray-500 bg-coolgray-200 rounded p-2 px-4 text-white outline-none transition-all;
|
||||
@apply textarea;
|
||||
}
|
||||
input,
|
||||
textarea {
|
||||
@apply disabled:text-neutral-600 read-only:text-neutral-600 read-only:select-none read-only:bg-coolgray-200/50;
|
||||
} */
|
||||
select {
|
||||
@apply border border-solid border-coolgray-400 rounded p-2 px-4 bg-coolgray-200 text-white disabled:text-neutral-600 read-only:select-none outline-none;
|
||||
@apply select select-sm disabled:opacity-40;
|
||||
}
|
||||
button {
|
||||
@apply btn btn-xs btn-ghost no-animation normal-case;
|
||||
|
||||
button[type="button"] {
|
||||
@apply btn btn-xs btn-ghost no-animation normal-case text-white;
|
||||
}
|
||||
button[type="submit"] {
|
||||
@apply btn-primary btn-sm;
|
||||
@apply btn btn-xs no-animation normal-case text-white btn-primary;
|
||||
}
|
||||
button[isWarning] {
|
||||
@apply btn-error text-white;
|
||||
}
|
||||
button[isHighlighted] {
|
||||
@apply btn-primary text-white;
|
||||
}
|
||||
h1 {
|
||||
@apply text-3xl font-bold pb-4;
|
||||
@ -36,10 +47,10 @@ h2 {
|
||||
@apply text-2xl font-bold pb-4;
|
||||
}
|
||||
h3 {
|
||||
@apply text-xl font-bold pb-4;
|
||||
@apply text-xl font-bold py-4;
|
||||
}
|
||||
a{
|
||||
@apply hover:text-white text-sm;
|
||||
a {
|
||||
@apply text-neutral-400 hover:text-white text-sm link link-hover hover:bg-transparent;
|
||||
}
|
||||
|
||||
.box {
|
||||
|
@ -8,7 +8,7 @@
|
||||
@env('local') value="test@example.com" @endenv autofocus />
|
||||
<input type="password" name="password" placeholder="{{ __('input.password') }}"
|
||||
@env('local') value="password" @endenv />
|
||||
<x-inputs.button isBold type="submit">{{ __('auth.login') }}</x-inputs.button>
|
||||
<x-inputs.button type="submit">{{ __('auth.login') }}</x-inputs.button>
|
||||
</form>
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
|
@ -11,7 +11,7 @@
|
||||
@env('local') value="password" @endenv />
|
||||
<input type="password" name="password_confirmation" placeholder="{{ __('input.password.again') }}"
|
||||
@env('local') value="password" @endenv />
|
||||
<x-inputs.button isBold type="submit">{{ __('auth.register') }}</x-inputs.button>
|
||||
<x-inputs.button type="submit">{{ __('auth.register') }}</x-inputs.button>
|
||||
</form>
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<nav class="flex justify-center gap-4 py-2 border-b-2 border-solid border-coolgray-200 ">
|
||||
<nav class="flex justify-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
|
||||
<a
|
||||
href="{{ route('project.application.configuration', [
|
||||
'project_uuid' => Route::current()->parameters()['project_uuid'],
|
||||
@ -16,14 +16,16 @@
|
||||
Deployments
|
||||
</a>
|
||||
<a target="_blank" href="{{ $application->gitBranchLocation }}">
|
||||
Open on Git <img class="inline-flex w-4 h-4" src="{{ asset('svgs/external-link.svg') }}">
|
||||
Open on Git
|
||||
<x-external-link />
|
||||
</a>
|
||||
@if (data_get($application, 'ports_mappings_array'))
|
||||
@foreach ($application->ports_mappings_array as $port)
|
||||
@if (config('app.env') === 'local')
|
||||
<a target="_blank" href="http://localhost:{{ explode(':', $port)[0] }}">Open
|
||||
{{ explode(':', $port)[0] }} <img class="inline-flex w-4 h-4"
|
||||
src="{{ asset('svgs/external-link.svg') }}"></a>
|
||||
{{ explode(':', $port)[0] }}
|
||||
<x-external-link />
|
||||
</a>
|
||||
@else
|
||||
<a target="_blank"
|
||||
href="http://{{ $application->destination->server->ip }}:{{ explode(':', $port)[0] }}">Open
|
||||
|
@ -22,7 +22,7 @@
|
||||
<div class="flex flex-col items-center justify-center h-full">
|
||||
<div class="pb-5 text-white" x-text="message"></div>
|
||||
<div>
|
||||
<x-inputs.button isWarning x-on:click='confirmed()'>Confirm</x-inputs.button>
|
||||
<x-inputs.button x-on:click='confirmed()'>Confirm</x-inputs.button>
|
||||
<x-inputs.button x-on:click="open = false">Cancel</x-inputs.button>
|
||||
</div>
|
||||
</div>
|
||||
|
1
resources/views/components/external-link.blade.php
Normal file
1
resources/views/components/external-link.blade.php
Normal file
@ -0,0 +1 @@
|
||||
<img class="inline-flex w-3 h-3 mb-1 ml-2" src="{{ asset('svgs/external-link.svg') }}">
|
@ -1,17 +1,30 @@
|
||||
@props([
|
||||
'type' => $attributes->get('type') ?? 'button',
|
||||
'disabled' => null,
|
||||
'confirm' => null,
|
||||
'confirmAction' => null,
|
||||
])
|
||||
<button {{ $attributes }}
|
||||
@if ($attributes->whereStartsWith('wire:click') && !$disabled) wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.class='loading' wire:loading.delay.attr="disabled" @endif
|
||||
@if ($disabled !== null) disabled title="{{ $disabled }}" @endif
|
||||
@isset($confirm)
|
||||
@if ($type === 'submit')
|
||||
<button type="submit" @if ($disabled !== null) disabled @endif wire:target="submit"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@elseif($type === 'button')
|
||||
<button {{ $attributes }} @if ($disabled !== null) disabled @endif type="button"
|
||||
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
@ -8,17 +8,16 @@
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
'disabled' => null,
|
||||
])
|
||||
|
||||
<label {{ $attributes->merge(['class' => 'flex items-center gap-16 cursor-pointer']) }}>
|
||||
<span class="label-text">
|
||||
<label {{ $attributes->merge(['class' => 'flex cursor-pointer w-64 label']) }}>
|
||||
<div class="label-text">
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
{{ $id }}
|
||||
@endif
|
||||
</span>
|
||||
<input type="checkbox" @if ($disabled !== null) disabled @endif class="toggle" name={{ $id }}
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
<input type="checkbox" @if ($disabled !== null) disabled @endif name={{ $id }}
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif />
|
||||
</label>
|
||||
</div>
|
||||
|
@ -1,14 +1,15 @@
|
||||
@props([
|
||||
'id' => $attributes->has('id') || $attributes->has('label'),
|
||||
'required' => $attributes->has('required'),
|
||||
'type' => $attributes->get('type') ?? 'text',
|
||||
'required' => null,
|
||||
'label' => $attributes->has('label'),
|
||||
'helper' => $attributes->has('helper'),
|
||||
'instantSave' => $attributes->has('instantSave'),
|
||||
'noLabel' => $attributes->has('noLabel'),
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
'disabled' => null,
|
||||
])
|
||||
|
||||
<div class="w-full max-w-xs form-control">
|
||||
<div {{ $attributes->merge(['class' => 'w-full form-control']) }}>
|
||||
@if (!$noLabel)
|
||||
<label class="label">
|
||||
<span class="label-text">
|
||||
@ -40,8 +41,8 @@ class="w-64 border-2 shadow border-coolgray-500 card compact dropdown-content bg
|
||||
</span>
|
||||
</label>
|
||||
@endif
|
||||
<input {{ $attributes }} name={{ $id }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
|
||||
<input {{ $attributes }} type={{ $type }} name={{ $id }} wire:model.defer={{ $id }}
|
||||
@if ($disabled !== null) disabled @endif @if ($required !== null) required @endif
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif />
|
||||
@error($id)
|
||||
<label class="label">
|
||||
|
@ -4,7 +4,7 @@
|
||||
'required' => false,
|
||||
])
|
||||
|
||||
<span @class(['flex flex-col'])>
|
||||
<span {{ $attributes->merge(['class' => 'flex flex-col']) }}>
|
||||
<label for={{ $id }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
|
@ -8,7 +8,7 @@
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
])
|
||||
|
||||
<div class="w-full max-w-xs form-control">
|
||||
<div class=" form-control">
|
||||
@if (!$noLabel)
|
||||
<label class="label">
|
||||
<span class="label-text">
|
||||
@ -40,8 +40,7 @@ class="w-64 border-2 shadow border-coolgray-500 card compact dropdown-content bg
|
||||
</span>
|
||||
</label>
|
||||
@endif
|
||||
<textarea {{ $attributes }} name={{ $id }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
|
||||
<textarea {{ $attributes }} name={{ $id }} wire:model.defer={{ $value ?? $id }}
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif></textarea>
|
||||
@error($id)
|
||||
<label class="label">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-theme="coollabs" lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-full bg-coolgray-100">
|
||||
<html data-theme="coollabs" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@ -24,14 +24,13 @@
|
||||
@livewireStyles
|
||||
</head>
|
||||
|
||||
<body class="antialiased">
|
||||
<body>
|
||||
|
||||
@livewireScripts
|
||||
|
||||
@auth
|
||||
<x-navbar />
|
||||
@endauth
|
||||
<main class="max-w-6xl px-8 pt-10 mx-auto">
|
||||
<main class="min-h-full px-8 pt-10 mx-auto max-w-7xl">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
<a
|
||||
|
@ -3,17 +3,14 @@
|
||||
'message' => 'Are you sure you want to delete this?',
|
||||
'action' => 'delete',
|
||||
])
|
||||
<div x-cloak x-show="{{ $show }}" x-transition.opacity class="fixed inset-0 bg-coolgray-100/75"></div>
|
||||
<div x-cloak x-show="{{ $show }}" x-transition class="fixed inset-0 z-50 top-20">
|
||||
<div @click.away="{{ $show }} = false" class="w-screen max-w-xl mx-auto rounded-lg shadow-xl bg-coolgray-200">
|
||||
<div class="flex flex-col items-center justify-center h-full p-4">
|
||||
<div class="pb-5 text-xs text-white">{{ $message }}</div>
|
||||
<div class="text-xs">
|
||||
<x-inputs.button isWarning wire:click='{{ $action }}' x-on:click="{{ $show }} = false">
|
||||
Yes
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click="{{ $show }} = false">No</x-inputs.button>
|
||||
</div>
|
||||
<div x-cloak x-show="{{ $show }}" x-transition class="modal modal-open">
|
||||
<div class="relative modal-box">
|
||||
<div class="pb-8 text-base font-bold">{{ $message }}</div>
|
||||
<div class="flex justify-end gap-4 text-xs">
|
||||
<x-inputs.button isWarning wire:click='{{ $action }}' x-on:click="{{ $show }} = false">
|
||||
Yes
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click="{{ $show }} = false">No</x-inputs.button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -10,29 +10,29 @@
|
||||
</label>
|
||||
<ul tabindex="0" class="p-2 mt-3 shadow menu menu-compact dropdown-content bg-base-100 rounded-box w-52">
|
||||
<li>
|
||||
<a href="/" class="justify-between">
|
||||
<a href="/">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
@if (auth()->user()->isRoot())
|
||||
<li>
|
||||
<a href="/settings" class="justify-between">
|
||||
<a href="/settings">
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li>
|
||||
<a href="/profile" class="justify-between">
|
||||
<a href="/profile">
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/profile/team" class="justify-between">
|
||||
<a href="/profile/team">
|
||||
Team
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/command-center" class="justify-between">
|
||||
<a href="/command-center">
|
||||
Command Center
|
||||
</a>
|
||||
</li>
|
||||
@ -49,7 +49,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="/" class="text-xl normal-case btn btn-ghost">Coolify</a>
|
||||
<a href="/" class="text-xl no-underline normal-case btn btn-ghost">Coolify</a>
|
||||
<div class="form-control">
|
||||
<x-magic-bar />
|
||||
</div>
|
||||
@ -58,23 +58,23 @@
|
||||
<ul class="px-1 menu menu-horizontal text-neutral-400">
|
||||
@if (auth()->user()->isRoot())
|
||||
<li>
|
||||
<a href="/settings" class="justify-between link link-hover hover:bg-transparent">
|
||||
<a href="/settings">
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li>
|
||||
<a href="/profile" class="justify-between link link-hover hover:bg-transparent">
|
||||
<a href="/profile">
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/profile/team" class="justify-between link link-hover hover:bg-transparent">
|
||||
<a href="/profile/team">
|
||||
Team
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="justify-between link link-hover hover:bg-transparent" href="/command-center">
|
||||
<a href="/command-center">
|
||||
Command Center
|
||||
</a>
|
||||
</li>
|
||||
|
@ -7,10 +7,10 @@
|
||||
<x-inputs.input id="destination.network" label="Docker Network" readonly />
|
||||
@endif
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteDestination = true">
|
||||
<x-inputs.button x-on:click.prevent="deleteDestination = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-inputs.select>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
@ -3,12 +3,12 @@
|
||||
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
|
||||
<x-inputs.input id="private_key.name" label="Name" required />
|
||||
<x-inputs.input id="private_key.description" label="Description" />
|
||||
<x-inputs.input type="textarea" rows="10" id="private_key.private_key" label="Private Key" required />
|
||||
<x-inputs.textarea rows="10" id="private_key.private_key" label="Private Key" required />
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deletePrivateKey = true">
|
||||
<x-inputs.button x-on:click.prevent="deletePrivateKey = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<x-inputs.input id="name" label="Name" required />
|
||||
<x-inputs.input id="description" label="Description" />
|
||||
<x-inputs.input type="textarea" id="value" label="Private Key" required />
|
||||
<x-inputs.button isBold type="submit" wire.click.prevent>
|
||||
<x-inputs.button type="submit" wire.click.prevent>
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
@ -0,0 +1,5 @@
|
||||
<div x-data="{ deleteApplication: false }">
|
||||
<h2>Danger Zone</h2>
|
||||
<x-naked-modal show="deleteApplication" />
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteApplication = true">Delete this application</x-inputs.button>
|
||||
</div>
|
@ -1,15 +1,13 @@
|
||||
<div x-data="{ deleteApplication: false }" class="flex items-center gap-2">
|
||||
<x-naked-modal show="deleteApplication" />
|
||||
<div class="flex items-center gap-2">
|
||||
@if ($application->status === 'running')
|
||||
<x-inputs.button wire:click='start'>Rebuild</x-inputs.button>
|
||||
<x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
|
||||
<x-inputs.button isWarning wire:click='stop'>Stop</x-inputs.button>
|
||||
<x-inputs.button wire:click='stop'>Stop</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button wire:click='start'>Start</x-inputs.button>
|
||||
<x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
|
||||
@endif
|
||||
<x-inputs.button x-on:click.prevent="deleteApplication = true">
|
||||
Delete</x-inputs.button>
|
||||
|
||||
<span wire:poll.5000ms='pollingStatus'>
|
||||
@if ($application->status === 'running')
|
||||
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h3>Destination</h3>
|
||||
<h2>Destination</h2>
|
||||
<p>Server Name: {{ data_get($destination, 'server.name') }}</p>
|
||||
@if (data_get($destination, 'server.description'))
|
||||
<p>Description: {{ data_get($destination, 'server.description') }}</p>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input noDirty id="key" label="Name" required />
|
||||
<x-inputs.input noDirty id="value" label="Value" required />
|
||||
<x-inputs.input noDirty type="checkbox" id="is_build_time" label="Build Variable?" />
|
||||
<x-inputs.checkbox noDirty class="flex-col items-center" id="is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Add
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<h3>Environment Variables</h3>
|
||||
<h2>Environment Variables</h2>
|
||||
@forelse ($application->environment_variables as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
|
@ -3,13 +3,13 @@
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input label="Name" id="env.key" />
|
||||
<x-inputs.input label="Value" id="env.value" />
|
||||
<x-inputs.input type="checkbox" id="env.is_build_time" label="Build Variable?" />
|
||||
<x-inputs.checkbox disabled class="flex-col items-center" id="env.is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Update
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteEnvironment = true" isWarning>
|
||||
<x-inputs.button x-on:click.prevent="deleteEnvironment = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -1,12 +1,16 @@
|
||||
<div>
|
||||
<h3>General</h3>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h2>General</h2>
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 pb-4">
|
||||
<x-inputs.input id="application.name" label="Name" required />
|
||||
<x-inputs.input id="application.fqdn" label="Domains" />
|
||||
<x-inputs.input id="application.install_command" label="Install Command" />
|
||||
<x-inputs.input id="application.build_command" label="Build Command" />
|
||||
<x-inputs.input id="application.start_command" label="Start Command" />
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input class="w-full" id="application.name" label="Name" required />
|
||||
<x-inputs.input class="w-full" id="application.fqdn" label="Domains" />
|
||||
</div>
|
||||
<x-inputs.select id="application.build_pack" label="Build Pack" required>
|
||||
<option value="nixpacks">Nixpacks</option>
|
||||
<option disabled value="docker">Docker</option>
|
||||
@ -18,33 +22,38 @@
|
||||
<option disabled value="apache:alpine">apache:alpine</option>
|
||||
</x-inputs.select>
|
||||
@endif
|
||||
<x-inputs.input id="application.base_directory" label="Base Directory" />
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" required />
|
||||
@else
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" />
|
||||
@endif
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
|
||||
@endif
|
||||
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input id="application.install_command" label="Install Command" />
|
||||
<x-inputs.input id="application.build_command" label="Build Command" />
|
||||
<x-inputs.input id="application.start_command" label="Start Command" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input id="application.base_directory" label="Base Directory" />
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" required />
|
||||
@else
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
|
||||
@endif
|
||||
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<x-inputs.checkbox instantSave id="is_debug" label="Debug" />
|
||||
<x-inputs.checkbox instantSave id="is_static" label="Static website?" />
|
||||
<x-inputs.checkbox instantSave id="is_git_submodules_allowed" label="Git Submodules Allowed?" />
|
||||
<x-inputs.checkbox instantSave id="is_git_lfs_allowed" label="Git LFS Allowed?" />
|
||||
<x-inputs.checkbox instantSave id="is_auto_deploy" label="Auto Deploy?" />
|
||||
<x-inputs.checkbox instantSave id="is_previews" label="Previews?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_dual_cert" label="Dual Certs?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_http2" label="Is Http2?" />
|
||||
</div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
<div class="flex flex-col pt-4">
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_static" label="Static website?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_submodules_allowed"
|
||||
label="Git Submodules Allowed?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_lfs_allowed" label="Git LFS Allowed?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_debug" label="Debug" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_auto_deploy" label="Auto Deploy?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_previews" label="Previews?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_dual_cert" label="Dual Certs?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_http2" label="Is Http2?" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,9 @@
|
||||
<div>
|
||||
<h2>Resource Limits</h2>
|
||||
<form wire:submit.prevent='submit'>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h2>Resource Limits</h2>
|
||||
<x-inputs.button type='submit'>Save</x-inputs.button>
|
||||
</div>
|
||||
<h3>Memory</h3>
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Limit" id="application.limits_memory" />
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Swap" id="application.limits_memory_swap" />
|
||||
@ -8,13 +11,10 @@
|
||||
id="application.limits_memory_swappiness" />
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Soft Limit"
|
||||
id="application.limits_memory_reservation" />
|
||||
<x-inputs.input type="checkbox" label="Is OOM Kill disabled?" id="application.limits_memory_oom_kill" />
|
||||
<x-inputs.checkbox label="Disable OOM kill" id="application.limits_memory_oom_kill" />
|
||||
<h3>CPU</h3>
|
||||
<x-inputs.input placeholder="1.5" label="Number of CPUs" id="application.limits_cpus" />
|
||||
<x-inputs.input placeholder="0-2" label="CPU set to use" id="application.limits_cpuset" />
|
||||
<x-inputs.input placeholder="1024" label="CPU Weight" id="application.limits_cpu_shares" />
|
||||
<div class="pt-4">
|
||||
<x-inputs.button isBold>Save</x-inputs.button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div x-init="$wire.loadImages">
|
||||
<h2>Revert</h2>
|
||||
<div>
|
||||
<x-inputs.button isBold wire:click='loadImages'>Refresh Images</x-inputs.button>
|
||||
<div class="flex gap-2">
|
||||
<h2>Rollback</h2>
|
||||
<x-inputs.button isHighlighted wire:click='loadImages'>Refresh Images</x-inputs.button>
|
||||
</div>
|
||||
<div wire:loading wire:target='loadImages'>
|
||||
<x-loading />
|
||||
|
@ -1,18 +1,19 @@
|
||||
<div>
|
||||
<h3>Source</h3>
|
||||
<h2>Source</h2>
|
||||
<div class="pb-8">{{ data_get($application, 'source.name') }}
|
||||
@if (data_get($application, 'source.is_public'))
|
||||
<span class="text-xs">public</span>
|
||||
@endif
|
||||
</div>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 w-max-fit">
|
||||
<x-inputs.input id="application.git_repository" label="Repository" readonly />
|
||||
<x-inputs.input id="application.git_branch" label=" Branch" readonly />
|
||||
<x-inputs.input id="application.git_repository" label="Repository" />
|
||||
<x-inputs.input id="application.git_branch" label=" Branch" />
|
||||
<x-inputs.input id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA" />
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<a target="_blank" href="{{ $application->gitCommits }}">
|
||||
Commits <img class="inline-flex w-4 h-4" src="{{ asset('svgs/external-link.svg') }}">
|
||||
Commits
|
||||
<x-external-link />
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<x-inputs.input noDirty id="mount_path" label="Destination Path" required />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Add
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<h3>Storages</h3>
|
||||
<h2>Storages</h2>
|
||||
@forelse ($application->persistentStorages as $storage)
|
||||
<livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
@empty
|
||||
|
@ -6,10 +6,10 @@
|
||||
<x-inputs.input id="storage.mount_path" label="Destination Path" required />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Update
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteStorage = true" isWarning>
|
||||
<x-inputs.button x-on:click.prevent="deleteStorage = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div x-data="{ deleteProject: false }">
|
||||
<x-naked-modal show="deleteProject" message='Are you sure you would like to delete this project?' />
|
||||
@if ($resource_count > 0)
|
||||
<x-inputs.button isWarning disabled="First delete all resources.">
|
||||
<x-inputs.button disabled="First delete all resources.">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteProject = true">
|
||||
<x-inputs.button x-on:click.prevent="deleteProject = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
|
@ -10,7 +10,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<x-inputs.button isBold type="submit">Run</x-inputs.button>
|
||||
<x-inputs.button type="submit">Run</x-inputs.button>
|
||||
</form>
|
||||
<div class="container w-full pt-10 mx-auto">
|
||||
<livewire:activity-monitor />
|
||||
|
@ -1,12 +1,12 @@
|
||||
<div x-data="{ deleteServer: false }">
|
||||
<h3>General</h3>
|
||||
<h2>General</h2>
|
||||
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<div class="flex flex-col w-96">
|
||||
<x-inputs.input id="server.name" label="Name" required />
|
||||
<x-inputs.input id="server.description" label="Description" />
|
||||
<x-inputs.input disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
||||
<x-inputs.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
||||
label="Is it part of a Swarm cluster?" />
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
@ -23,9 +23,9 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
|
||||
<x-inputs.button isBold wire:click.prevent='validateServer'>
|
||||
<x-inputs.button wire:click.prevent='validateServer'>
|
||||
@if ($server->settings->is_validated)
|
||||
Check Connection
|
||||
@else
|
||||
@ -33,8 +33,8 @@
|
||||
@endif
|
||||
</x-inputs.button>
|
||||
|
||||
{{-- <x-inputs.button isBold wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true">
|
||||
{{-- <x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
|
||||
<x-inputs.button x-on:click.prevent="deleteServer = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
@ -57,7 +57,7 @@
|
||||
{{ data_get($server, 'privateKey.uuid') }}
|
||||
</a>
|
||||
<a href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">
|
||||
<x-inputs.button isBold>Change</x-inputs.button>
|
||||
<x-inputs.button>Change</x-inputs.button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 py-4">
|
||||
@ -71,7 +71,7 @@
|
||||
@endforeach
|
||||
</div>
|
||||
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
||||
<x-inputs.button isBold>Add</x-inputs.button>
|
||||
<x-inputs.button>Add</x-inputs.button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</x-inputs.select>
|
||||
<x-inputs.input instantSave noDirty type="checkbox" id="is_part_of_swarm"
|
||||
label="Is it part of a Swarm cluster?" />
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
@ -3,7 +3,7 @@
|
||||
message='Are you sure you would like to stop the proxy? All resources will be unavailable.' />
|
||||
@if ($server->settings->is_validated)
|
||||
<div class="flex items-center gap-2 mb-4">
|
||||
<h3 class="pb-0">Proxy</h3>
|
||||
<h2>Proxy</h2>
|
||||
<div>{{ $server->extra_attributes->proxy_status }}</div>
|
||||
</div>
|
||||
|
||||
@ -13,16 +13,16 @@
|
||||
$server->extra_attributes->last_applied_proxy_settings &&
|
||||
$server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings)
|
||||
<div class="text-red-500">Configuration out of sync.</div>
|
||||
<x-inputs.button isBold wire:click="installProxy">
|
||||
<x-inputs.button wire:click="installProxy">
|
||||
Reconfigure
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
@if ($server->extra_attributes->proxy_status !== 'running')
|
||||
<x-inputs.button isBold wire:click="installProxy">
|
||||
<x-inputs.button wire:click="installProxy">
|
||||
Start
|
||||
</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button isWarning x-on:click.prevent="stopProxy = true">Stop
|
||||
<x-inputs.button x-on:click.prevent="stopProxy = true">Stop
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
<div class="py-4">
|
||||
@ -37,13 +37,14 @@
|
||||
@if ($selectedProxy->value === 'TRAEFIK_V2')
|
||||
<form wire:submit.prevent='saveConfiguration'>
|
||||
<div class="py-2 pb-8">
|
||||
<x-inputs.button isBold>Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button wire:click.prevent="resetProxy">
|
||||
Reset Configuration
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<h4>traefik.conf</h4>
|
||||
<x-inputs.input noDirty type="textarea" wire:model.defer="proxy_settings" rows="30" />
|
||||
<x-inputs.textarea noDirty name="proxy_settings" wire:model.defer="proxy_settings"
|
||||
rows="30" />
|
||||
</form>
|
||||
@endif
|
||||
@endisset
|
||||
@ -55,7 +56,7 @@
|
||||
{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}
|
||||
</option>
|
||||
</select>
|
||||
<x-inputs.button isBold wire:click="setProxy">Set Proxy</x-inputs.button>
|
||||
<x-inputs.button wire:click="setProxy">Set Proxy</x-inputs.button>
|
||||
@endif
|
||||
@else
|
||||
<p>Server is not validated. Validate first.</p>
|
||||
|
@ -1,6 +1,38 @@
|
||||
<div x-data="{ deleteSource: false }">
|
||||
<x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' />
|
||||
<form wire:submit.prevent='submit'>
|
||||
<div class="flex items-center gap-2">
|
||||
<h1>GitHub App</h1>
|
||||
<div class="flex gap-2 ">
|
||||
@if ($github_app->app_id)
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
<a href="{{ $installation_url }}">
|
||||
<x-inputs.button>
|
||||
@if ($github_app->installation_id)
|
||||
Update Repositories
|
||||
<x-external-link />
|
||||
@else
|
||||
Install Repositories
|
||||
<x-external-link />
|
||||
@endif
|
||||
</x-inputs.button>
|
||||
</a>
|
||||
@else
|
||||
<x-inputs.button disabled type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
<form x-data>
|
||||
<x-inputs.button isHighlighted x-on:click.prevent="createGithubApp">Create GitHub Application
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-inputs.input id="github_app.name" label="App Name" required />
|
||||
|
||||
@if ($github_app->app_id)
|
||||
@ -20,21 +52,64 @@
|
||||
<x-inputs.input id="github_app.client_id" label="Client Id" type="password" disabled />
|
||||
<x-inputs.input id="github_app.client_secret" label="Client Secret" type="password" disabled />
|
||||
<x-inputs.input id="github_app.webhook_secret" label="Webhook Secret" type="password" disabled />
|
||||
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
|
||||
<div class="py-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
|
||||
@else
|
||||
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
|
||||
<x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
|
||||
<div class="py-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
@if (!$github_app->app_id)
|
||||
<script>
|
||||
function createGithubApp() {
|
||||
const {
|
||||
organization,
|
||||
uuid,
|
||||
html_url
|
||||
} = @json($github_app);
|
||||
let baseUrl = @js($host);
|
||||
const name = @js($name);
|
||||
const isDev = @js(config('app.env')) === 'local';
|
||||
const devWebhook = @js(config('coolify.dev_webhook'));
|
||||
if (isDev && devWebhook) {
|
||||
baseUrl = devWebhook;
|
||||
}
|
||||
const webhookBaseUrl = `${baseUrl}/webhooks`;
|
||||
const path = organization ? `organizations/${organization}/settings/apps/new` : 'settings/apps/new';
|
||||
const data = {
|
||||
name,
|
||||
url: baseUrl,
|
||||
hook_attributes: {
|
||||
url: `${webhookBaseUrl}/source/github/events`,
|
||||
active: true,
|
||||
},
|
||||
redirect_url: `${webhookBaseUrl}/source/github/redirect`,
|
||||
callback_urls: [`${baseUrl}/login/github/app`],
|
||||
public: false,
|
||||
request_oauth_on_install: false,
|
||||
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
|
||||
setup_on_update: true,
|
||||
default_permissions: {
|
||||
contents: 'read',
|
||||
metadata: 'read',
|
||||
pull_requests: 'read',
|
||||
emails: 'read'
|
||||
},
|
||||
default_events: ['pull_request', 'push']
|
||||
};
|
||||
const form = document.createElement('form');
|
||||
form.setAttribute('method', 'post');
|
||||
form.setAttribute('action', `${html_url}/${path}?state=${uuid}`);
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('id', 'manifest');
|
||||
input.setAttribute('name', 'manifest');
|
||||
input.setAttribute('type', 'hidden');
|
||||
input.setAttribute('value', JSON.stringify(data));
|
||||
form.appendChild(input);
|
||||
document.getElementsByTagName('body')[0].appendChild(form);
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
@endif
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<h3>Other Teams</h3>
|
||||
<div class="flex flex-col gap-2">
|
||||
@foreach (auth()->user()->otherTeams() as $team)
|
||||
<x-inputs.button isBold wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
|
||||
<x-inputs.button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
|
||||
to:
|
||||
{{ $team->name }}</x-inputs.button>
|
||||
@endforeach
|
||||
|
@ -1,8 +1,8 @@
|
||||
<x-layout>
|
||||
<x-applications.navbar :application="$application" />
|
||||
<h1 class="py-10">Configuration</h1>
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex pt-6">
|
||||
<div class="flex flex-col min-w-fit">
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex h-full pt-6">
|
||||
<div class="flex flex-col gap-4 min-w-fit">
|
||||
<a :class="activeTab === 'general' && 'text-white'"
|
||||
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||
<a :class="activeTab === 'environment-variables' && 'text-white'"
|
||||
@ -25,12 +25,15 @@
|
||||
@click.prevent="activeTab = 'resource-limits'; window.location.hash = 'resource-limits'"
|
||||
href="#">Resource Limits
|
||||
</a>
|
||||
<a :class="activeTab === 'danger' && 'text-white'"
|
||||
@click.prevent="activeTab = 'danger'; window.location.hash = 'danger'" href="#">Danger Zone
|
||||
</a>
|
||||
{{-- <a :class="activeTab === 'previews' && 'text-white'"
|
||||
@click.prevent="activeTab = 'previews'; window.location.hash = 'previews'" href="#">Previews
|
||||
</a> --}}
|
||||
</div>
|
||||
<div class="w-full pt-2 pl-8">
|
||||
<div x-cloak x-show="activeTab === 'general'">
|
||||
<div class="w-full pl-8">
|
||||
<div x-cloak x-show="activeTab === 'general'" class="h-full">
|
||||
<livewire:project.application.general :application="$application" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'environment-variables'">
|
||||
@ -51,6 +54,9 @@
|
||||
<div x-cloak x-show="activeTab === 'resource-limits'">
|
||||
<livewire:project.application.resource-limits :application="$application" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'danger'">
|
||||
<livewire:project.application.danger :application="$application" />
|
||||
</div>
|
||||
{{-- <div x-cloak x-show="activeTab === 'previews'">
|
||||
<livewire:project.application.previews :application="$application" />
|
||||
</div> --}}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<x-layout>
|
||||
<div class="text-3xl font-bold">Server</div>
|
||||
<h1>Server</h1>
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex pt-6">
|
||||
<div class="flex flex-col min-w-fit">
|
||||
<div class="flex flex-col gap-4 min-w-fit">
|
||||
<a :class="activeTab === 'general' && 'text-white'"
|
||||
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||
<a :class="activeTab === 'proxy' && 'text-white'"
|
||||
|
@ -1,67 +1,3 @@
|
||||
<x-layout>
|
||||
<h1>GitHub App</h1>
|
||||
<livewire:source.github.change :github_app="$github_app" />
|
||||
@if (!$github_app->app_id)
|
||||
<form x-data>
|
||||
<x-inputs.button x-on:click.prevent="createGithubApp">Create GitHub Application</x-inputs.button>
|
||||
</form>
|
||||
<script>
|
||||
function createGithubApp() {
|
||||
const {
|
||||
organization,
|
||||
uuid,
|
||||
html_url
|
||||
} = @json($github_app);
|
||||
let baseUrl = @js($host);
|
||||
const name = @js($name);
|
||||
const isDev = @js(config('app.env')) === 'local';
|
||||
const devWebhook = @js(config('coolify.dev_webhook'));
|
||||
if (isDev && devWebhook) {
|
||||
baseUrl = devWebhook;
|
||||
}
|
||||
const webhookBaseUrl = `${baseUrl}/webhooks`;
|
||||
const path = organization ? `organizations/${organization}/settings/apps/new` : 'settings/apps/new';
|
||||
const data = {
|
||||
name,
|
||||
url: baseUrl,
|
||||
hook_attributes: {
|
||||
url: `${webhookBaseUrl}/source/github/events`,
|
||||
active: true,
|
||||
},
|
||||
redirect_url: `${webhookBaseUrl}/source/github/redirect`,
|
||||
callback_urls: [`${baseUrl}/login/github/app`],
|
||||
public: false,
|
||||
request_oauth_on_install: false,
|
||||
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
|
||||
setup_on_update: true,
|
||||
default_permissions: {
|
||||
contents: 'read',
|
||||
metadata: 'read',
|
||||
pull_requests: 'read',
|
||||
emails: 'read'
|
||||
},
|
||||
default_events: ['pull_request', 'push']
|
||||
};
|
||||
const form = document.createElement('form');
|
||||
form.setAttribute('method', 'post');
|
||||
form.setAttribute('action', `${html_url}/${path}?state=${uuid}`);
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('id', 'manifest');
|
||||
input.setAttribute('name', 'manifest');
|
||||
input.setAttribute('type', 'hidden');
|
||||
input.setAttribute('value', JSON.stringify(data));
|
||||
form.appendChild(input);
|
||||
document.getElementsByTagName('body')[0].appendChild(form);
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
@elseif($github_app->app_id && !$github_app->installation_id)
|
||||
<a href="{{ $installation_url }}">
|
||||
<x-inputs.button isBold>Install Repositories</x-inputs.button>
|
||||
</a>
|
||||
@elseif($github_app->app_id && $github_app->installation_id)
|
||||
<a href="{{ $installation_url }}">
|
||||
<x-inputs.button isBold>Update Repositories</x-inputs.button>
|
||||
</a>
|
||||
@endif
|
||||
<livewire:source.github.change :github_app="$github_app" :installation_url="$installation_url" :host="$host" :name="$name" />
|
||||
</x-layout>
|
||||
|
@ -30,6 +30,10 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
scrollbar: ['dark'],
|
||||
extend: {}
|
||||
},
|
||||
daisyui: {
|
||||
themes: [
|
||||
{
|
||||
@ -47,5 +51,5 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
},
|
||||
plugins: [require("@tailwindcss/typography"),require("daisyui")],
|
||||
plugins: [require('tailwindcss-scrollbar'),require("@tailwindcss/typography"),require("daisyui")],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user