mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 07:52:34 +00:00
init
This commit is contained in:
@ -0,0 +1,68 @@
|
||||
<x-modal name="create-database">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{user: false, remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Create Database') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="name" :value="__('Name')" />
|
||||
<x-text-input wire:model.defer="name" id="name" name="name" type="text" class="mt-1 w-full" />
|
||||
@error('name')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="create_user" class="inline-flex items-center">
|
||||
<input id="create_user" wire:model.defer="user" type="checkbox" x-model="user" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="create_user">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Create a user for this database') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="user">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-username" :value="__('Username')" />
|
||||
<x-text-input wire:model.defer="username" id="db-username" name="username" type="text" class="mt-1 w-full" />
|
||||
@error('username')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-password" :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="password" id="db-password" name="password" type="text" class="mt-1 w-full" />
|
||||
@error('password')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="db-remote" class="inline-flex items-center">
|
||||
<input id="db-remote" wire:model="remote" type="checkbox" x-model="remote" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="remote">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Enable remote access') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-host" :value="__('Host')" />
|
||||
<x-text-input wire:model.defer="host" id="db-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label for="db-host" :value="__('You might also need to open the database port in Firewall')" class="mt-1"/>
|
||||
@error('host')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" @database-created.window="$dispatch('close')">
|
||||
{{ __('Create') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,51 @@
|
||||
<x-modal name="create-database-user">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Create Database User') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-username" :value="__('Username')" />
|
||||
<x-text-input wire:model.defer="username" id="user-username" name="username" type="text" class="mt-1 w-full" />
|
||||
@error('username')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-password" :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="password" id="user-password" name="password" type="text" class="mt-1 w-full" />
|
||||
@error('password')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="user-remote" class="inline-flex items-center">
|
||||
<input id="user-remote" wire:model="remote" type="checkbox" x-model="remote" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="remote">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Enable remote access') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-host" :value="__('Host')" />
|
||||
<x-text-input wire:model.defer="host" id="user-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label for="user-host" :value="__('You might also need to open the database port in Firewall')" class="mt-1"/>
|
||||
@error('host')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" @database-user-created.window="$dispatch('close')">
|
||||
{{ __('Create') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,12 @@
|
||||
@if($status == \App\Enums\DatabaseStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -0,0 +1,23 @@
|
||||
<x-modal name="database-user-password">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('View Password') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="viewPassword" type="text" class="mt-1 w-full" disabled />
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Close') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button x-data="{ copied: false }" x-clipboard.raw="{{ $viewPassword }}" class="ml-2">
|
||||
<div x-show="copied" class="flex items-center">{{ __("Copied") }}</div>
|
||||
<div x-show="!copied" x-on:click="copied = true; setTimeout(() => {copied = false}, 2000)">{{ __("Copy") }}</div>
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,12 @@
|
||||
@if($status == \App\Enums\DatabaseUserStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -0,0 +1,6 @@
|
||||
<x-confirm-modal
|
||||
name="delete-database"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this database?')"
|
||||
method="delete"
|
||||
/>
|
@ -0,0 +1,6 @@
|
||||
<x-confirm-modal
|
||||
name="delete-database-user"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this database?')"
|
||||
method="delete"
|
||||
/>
|
@ -0,0 +1,28 @@
|
||||
<x-modal name="link-database-user">
|
||||
<form wire:submit.prevent="link" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Link User to Databases') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
@foreach($databases as $database)
|
||||
<div class="mb-2">
|
||||
<label for="db-{{ $database->id }}" class="inline-flex items-center">
|
||||
<input id="db-{{ $database->id }}" wire:model.defer="link" value="{{ $database->name }}" type="checkbox" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="link">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ $database->name }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Close') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-2" @linked.window="$dispatch('close')">
|
||||
{{ __('Save') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
Reference in New Issue
Block a user