feat(terminal-access): implement terminal access control for servers and containers, including UI updates and backend logic
This commit is contained in:
@@ -14,6 +14,46 @@
|
||||
<div class="mb-4">Advanced configuration for your server.</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<h3>Terminal Access</h3>
|
||||
<x-helper
|
||||
helper="Control whether terminal access is available for this server and its containers.<br/>Only team
|
||||
administrators and owners can modify this setting." />
|
||||
@if ($isTerminalEnabled)
|
||||
<span
|
||||
class="px-2 py-1 text-xs font-semibold text-green-800 bg-green-100 rounded dark:text-green-100 dark:bg-green-800">
|
||||
Enabled
|
||||
</span>
|
||||
@else
|
||||
<span
|
||||
class="px-2 py-1 text-xs font-semibold text-red-800 bg-red-100 rounded dark:text-red-100 dark:bg-red-800">
|
||||
Disabled
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-4 pt-4">
|
||||
@if (auth()->user()->isAdmin())
|
||||
<div wire:key="terminal-access-change-{{ $isTerminalEnabled }}" class="pb-4">
|
||||
<x-modal-confirmation title="Confirm Terminal Access Change?"
|
||||
buttonTitle="{{ $isTerminalEnabled ? 'Disable Terminal' : 'Enable Terminal' }}"
|
||||
submitAction="toggleTerminal" :actions="[
|
||||
$isTerminalEnabled
|
||||
? 'This will disable terminal access for this server and all its containers.'
|
||||
: 'This will enable terminal access for this server and all its containers.',
|
||||
$isTerminalEnabled
|
||||
? 'Users will no longer be able to access terminal views from the UI.'
|
||||
: 'Users will be able to access terminal views from the UI.',
|
||||
'This change will take effect immediately.',
|
||||
]" confirmationText="{{ $server->name }}"
|
||||
shortConfirmationLabel="Server Name"
|
||||
step3ButtonText="{{ $isTerminalEnabled ? 'Disable Terminal' : 'Enable Terminal' }}">
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Disk Usage</h3>
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col">
|
||||
|
||||
Reference in New Issue
Block a user