mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-20 15:21:24 +00:00
refactor(ui): separate views for instance settings to separate paths to make it cleaner
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<div>
|
||||
<x-security.navbar />
|
||||
|
||||
<div class="flex gap-2">
|
||||
<h2 class="pb-4">Private Keys</h2>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Private Key">
|
||||
@@ -9,18 +8,19 @@
|
||||
<x-modal-confirmation title="Confirm unused SSH Key Deletion?" buttonTitle="Delete unused SSH Keys" isErrorButton
|
||||
submitAction="cleanupUnusedKeys" :actions="['All unused SSH keys (marked with unused) are permanently deleted.']" :confirmWithText="false" :confirmWithPassword="false" />
|
||||
</div>
|
||||
<div class="grid gap-2 lg:grid-cols-2">
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
@forelse ($privateKeys as $key)
|
||||
<a class="box group"
|
||||
href="{{ route('security.private-key.show', ['private_key_uuid' => data_get($key, 'uuid')]) }}">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="flex flex-col justify-center mx-6">
|
||||
<div class="box-title">
|
||||
{{ data_get($key, 'name') }}
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $key->description }}
|
||||
@if (!$key->isInUse())
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-400 text-black">Unused</span>
|
||||
@if (!$key->isInUse())
|
||||
<span
|
||||
class="inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-400 text-black">Unused</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,56 +4,58 @@
|
||||
</x-slot>
|
||||
<x-security.navbar />
|
||||
<div x-data="{ showPrivateKey: false }">
|
||||
<form class="flex flex-col gap-2" wire:submit='changePrivateKey'>
|
||||
<div class="flex items-end gap-2">
|
||||
<h2>Private Key</h2>
|
||||
<form class="flex flex-col" wire:submit='changePrivateKey'>
|
||||
<div class="flex items-start gap-2">
|
||||
<h2 class="pb-4">Private Key</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@if (data_get($private_key, 'id') > 0)
|
||||
<x-modal-confirmation
|
||||
title="Confirm Private Key Deletion?"
|
||||
isErrorButton
|
||||
buttonTitle="Delete"
|
||||
submitAction="delete({{ $private_key->id }})"
|
||||
:actions="['This private key will be permanently deleted.', 'All servers connected to this private key will stop working.', 'Any git app using this private key will stop working.']"
|
||||
<x-modal-confirmation title="Confirm Private Key Deletion?" isErrorButton buttonTitle="Delete"
|
||||
submitAction="delete({{ $private_key->id }})" :actions="[
|
||||
'This private key will be permanently deleted.',
|
||||
'All servers connected to this private key will stop working.',
|
||||
'Any git app using this private key will stop working.',
|
||||
]"
|
||||
confirmationText="{{ $private_key->name }}"
|
||||
confirmationLabel="Please confirm the execution of the actions by entering the Private Key Name below"
|
||||
shortConfirmationLabel="Private Key Name"
|
||||
:confirmWithPassword="false"
|
||||
step2ButtonText="Delete Private Key"
|
||||
/>
|
||||
shortConfirmationLabel="Private Key Name" :confirmWithPassword="false"
|
||||
step2ButtonText="Delete Private Key" />
|
||||
@endif
|
||||
</div>
|
||||
<x-forms.input id="private_key.name" label="Name" required />
|
||||
<x-forms.input id="private_key.description" label="Description" />
|
||||
<div>
|
||||
<div class="flex items-end gap-2 py-2 ">
|
||||
<div class="pl-1 ">Public Key</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input id="private_key.name" label="Name" required />
|
||||
<x-forms.input id="private_key.description" label="Description" />
|
||||
</div>
|
||||
<x-forms.input readonly id="public_key" />
|
||||
<div class="flex items-end gap-2 py-2 ">
|
||||
<div class="pl-1 ">Private Key <span class='text-helper'>*</span></div>
|
||||
<div class="text-xs underline cursor-pointer dark:text-white" x-cloak x-show="!showPrivateKey"
|
||||
x-on:click="showPrivateKey = true">
|
||||
Edit
|
||||
<div>
|
||||
<div class="flex items-end gap-2 py-2 ">
|
||||
<div class="pl-1">Public Key</div>
|
||||
</div>
|
||||
<div class="text-xs underline cursor-pointer dark:text-white" x-cloak x-show="showPrivateKey"
|
||||
x-on:click="showPrivateKey = false">
|
||||
Hide
|
||||
<x-forms.input readonly id="public_key" />
|
||||
<div class="flex items-end gap-2 py-2 ">
|
||||
<div class="pl-1">Private Key <span class='text-helper'>*</span></div>
|
||||
<div class="text-xs underline cursor-pointer dark:text-white" x-cloak x-show="!showPrivateKey"
|
||||
x-on:click="showPrivateKey = true">
|
||||
Edit
|
||||
</div>
|
||||
<div class="text-xs underline cursor-pointer dark:text-white" x-cloak x-show="showPrivateKey"
|
||||
x-on:click="showPrivateKey = false">
|
||||
Hide
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (data_get($private_key, 'is_git_related'))
|
||||
<div class="w-48">
|
||||
<x-forms.checkbox id="private_key.is_git_related" disabled label="Is used by a Git App?" />
|
||||
@if (data_get($private_key, 'is_git_related'))
|
||||
<div class="w-48">
|
||||
<x-forms.checkbox id="private_key.is_git_related" disabled label="Is used by a Git App?" />
|
||||
</div>
|
||||
@endif
|
||||
<div x-cloak x-show="!showPrivateKey">
|
||||
<x-forms.input allowToPeak="false" type="password" rows="10" id="private_key.private_key"
|
||||
required disabled />
|
||||
</div>
|
||||
<div x-cloak x-show="showPrivateKey">
|
||||
<x-forms.textarea rows="10" id="private_key.private_key" required />
|
||||
</div>
|
||||
@endif
|
||||
<div x-cloak x-show="!showPrivateKey">
|
||||
<x-forms.input allowToPeak="false" type="password" rows="10" id="private_key.private_key"
|
||||
required disabled />
|
||||
</div>
|
||||
<div x-cloak x-show="showPrivateKey">
|
||||
<x-forms.textarea rows="10" id="private_key.private_key" required />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user