This commit is contained in:
Saeed Vaziry
2023-07-02 12:47:50 +02:00
commit 5c72f12490
825 changed files with 41659 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<x-card>
<x-slot name="title">
<span class="text-red-600">{{ __("Installation Failed!") }}</span>
</x-slot>
<x-slot name="description">{{ __("Your server installation failed") }}</x-slot>
<div class="text-center">
{{ __("The installation has been failed on step:") }}
<span class="font-bold">{{ $server->progress_step }} ({{ $server->progress }}%)</span>
</div>
<div class="mt-5 flex items-center justify-center">
<x-secondary-button :href="route('servers.logs', ['server' => $server])" class="mr-2">{{ __("View Logs") }}</x-secondary-button>
<livewire:servers.delete-server :server="$server" />
</div>
</x-card>

View File

@ -0,0 +1,16 @@
<x-card>
<x-slot name="title">{{ __("Installing") }}</x-slot>
<x-slot name="description">{{ __("The server is being installed") }}</x-slot>
<div class="relative flex h-6 overflow-hidden rounded bg-primary-200 text-xs dark:bg-primary-500 dark:bg-opacity-10">
<div
style="width:{{ $server->progress }}%;"
class="flex flex-col justify-center whitespace-nowrap bg-primary-500 text-center text-white shadow-none"
></div>
<span class="absolute left-0 right-0 top-1 font-semibold text-center {{ $server->progress >= 40 ? 'text-white' : 'text-black dark:text-white' }}">
{{ $server->progress }}%
</span>
</div>
<div class="text-center mt-3">
<span class="font-bold">{{ $server->progress_step }}</span>
</div>
</x-card>

View File

@ -0,0 +1,24 @@
<div>
<div>
<div class="rounded-sm border-l-4 border-yellow-500 bg-yellow-100 py-3 px-4 text-yellow-700 dark:bg-yellow-500 dark:bg-opacity-10 dark:text-yellow-500">
Your server needs to have a new unused installation of supported operation systems and must have a root
user. To get started, add our public key to /root/.ssh/authorized_keys file by running the bellow command on
your server as root.
</div>
</div>
</div>
<div>
<div class="flex items-center justify-between">
<x-input-label for="pk">
{{ __("Run this command on your server as root user") }}
</x-input-label>
<x-input-label class="cursor-pointer" x-data="{ copied: false }" x-clipboard.raw="{{ config('core.ssh_public_key') }}">
<div x-show="copied" class="flex items-center">
{{ __("Copied") }}
<x-heroicon-m-check class="ml-1 w-4 text-green-700" />
</div>
<div x-show="!copied" x-on:click="copied = true; setTimeout(() => {copied = false}, 2000)">{{ __("Copy") }}</div>
</x-input-label>
</div>
<x-textarea id="pk" name="pk" class="mt-1" disabled>{{ config('core.ssh_public_key') }}</x-textarea>
</div>

View File

@ -0,0 +1,34 @@
<div>
<x-card-header>
<x-slot name="title">
{{ __("Server Overview") }}
</x-slot>
<x-slot name="description">{{ __("You can see an overview about your server here") }}</x-slot>
<x-slot name="aside">
@include('livewire.servers.partials.status', ['status' => $server->status])
</x-slot>
</x-card-header>
<div class="mx-auto grid grid-cols-3 rounded-md bg-white border border-gray-200 dark:border-gray-700 dark:bg-gray-800">
<div class="p-5">
<div class="flex items-center justify-center md:justify-start">
<x-heroicon-o-globe-alt class="w-8 h-8 text-primary-500" />
<div class="ml-2 hidden md:block">{{ __("Sites") }}</div>
</div>
<div class="mt-3 text-center text-3xl font-bold text-gray-600 dark:text-gray-400 md:text-left">{{ $server->sites()->count() }}</div>
</div>
<div class="border-l border-r border-gray-200 p-5 dark:border-gray-900">
<div class="flex items-center justify-center md:justify-start">
<x-heroicon-o-circle-stack class="w-8 h-8 text-primary-500" />
<div class="ml-2 hidden md:block">{{ __("Databases") }}</div>
</div>
<div class="mt-3 text-center text-3xl font-bold text-gray-600 dark:text-gray-400 md:text-left">{{ $server->databases()->count() }}</div>
</div>
<div class="p-5">
<div class="flex items-center justify-center md:justify-start">
<x-heroicon-o-briefcase class="w-8 h-8 text-primary-500" />
<div class="ml-2 hidden md:block">{{ __("Cron Jobs") }}</div>
</div>
<div class="mt-3 text-center text-3xl font-bold text-gray-600 dark:text-gray-400 md:text-left">{{ $server->cronJobs()->count() }}</div>
</div>
</div>
</div>

View File

@ -0,0 +1,12 @@
@if($status == \App\Enums\ServerStatus::READY)
<x-status status="success">{{ $status }}</x-status>
@endif
@if($status == \App\Enums\ServerStatus::INSTALLING)
<x-status status="warning">{{ $status }}</x-status>
@endif
@if($status == \App\Enums\ServerStatus::DISCONNECTED)
<x-status status="disabled">{{ $status }}</x-status>
@endif
@if($status == \App\Enums\ServerStatus::INSTALLATION_FAILED)
<x-status status="danger">{{ $status }}</x-status>
@endif