wip
This commit is contained in:
parent
d5d671bac1
commit
33cae2c222
@ -25,6 +25,8 @@ class All extends Component
|
|||||||
'application_id' => $this->application->id,
|
'application_id' => $this->application->id,
|
||||||
]);
|
]);
|
||||||
$this->application->refresh();
|
$this->application->refresh();
|
||||||
|
|
||||||
|
$this->emit('success', 'Environment variable added successfully.');
|
||||||
$this->emit('clearAddEnv');
|
$this->emit('clearAddEnv');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return general_error_handler(err: $e, that: $this);
|
return general_error_handler(err: $e, that: $this);
|
||||||
|
@ -28,6 +28,7 @@ class Show extends Component
|
|||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->env->save();
|
$this->env->save();
|
||||||
|
$this->emit('success', 'Environment variable updated successfully.');
|
||||||
}
|
}
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
|
@ -127,6 +127,7 @@ class General extends Component
|
|||||||
|
|
||||||
$this->application->fqdn = $domains->implode(',');
|
$this->application->fqdn = $domains->implode(',');
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
|
$this->emit('success', 'Application settings updated!');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return general_error_handler(err: $e, that: $this);
|
return general_error_handler(err: $e, that: $this);
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ class Form extends Component
|
|||||||
$this->validate();
|
$this->validate();
|
||||||
$this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template);
|
$this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template);
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
|
$this->emit('success', 'Preview url template updated successfully.');
|
||||||
$this->generate_real_url();
|
$this->generate_real_url();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ class ResourceLimits extends Component
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
|
$this->emit('success', 'Resource limits updated successfully.');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return general_error_handler(err: $e, that: $this);
|
return general_error_handler(err: $e, that: $this);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ class All extends Component
|
|||||||
'resource_type' => Application::class,
|
'resource_type' => Application::class,
|
||||||
]);
|
]);
|
||||||
$this->application->refresh();
|
$this->application->refresh();
|
||||||
|
$this->emit('success', 'Storage added successfully');
|
||||||
$this->emit('clearAddStorage');
|
$this->emit('clearAddStorage');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return general_error_handler(err: $e, that: $this);
|
return general_error_handler(err: $e, that: $this);
|
||||||
|
@ -21,6 +21,7 @@ class Show extends Component
|
|||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->storage->save();
|
$this->storage->save();
|
||||||
|
$this->emit('success', 'Storage updated successfully');
|
||||||
}
|
}
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
|
@ -82,5 +82,6 @@ class Form extends Component
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
|
$this->emit('success', 'Server updated successfully.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ class Proxy extends Component
|
|||||||
instant_remote_process([
|
instant_remote_process([
|
||||||
"echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml",
|
"echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml",
|
||||||
], $server);
|
], $server);
|
||||||
|
$this->emit('success', 'Proxy configuration saved.');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return general_error_handler(err: $e);
|
return general_error_handler(err: $e);
|
||||||
}
|
}
|
||||||
|
@ -207,5 +207,6 @@ class Configuration extends Component
|
|||||||
if ($this->settings->fqdn || $this->settings->default_redirect_404) {
|
if ($this->settings->fqdn || $this->settings->default_redirect_404) {
|
||||||
dispatch(new InstanceProxyCheckJob());
|
dispatch(new InstanceProxyCheckJob());
|
||||||
}
|
}
|
||||||
|
$this->emit('success', 'Instance settings updated successfully!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ class Email extends Component
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->submit();
|
$this->submit();
|
||||||
|
$this->emit('success', 'Settings saved successfully.');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->settings->smtp->enabled = false;
|
$this->settings->smtp->enabled = false;
|
||||||
$this->validate();
|
$this->validate();
|
||||||
@ -73,6 +74,7 @@ class Email extends Component
|
|||||||
|
|
||||||
$this->settings->smtp->test_recipients = str_replace(' ', '', $this->settings->smtp->test_recipients);
|
$this->settings->smtp->test_recipients = str_replace(' ', '', $this->settings->smtp->test_recipients);
|
||||||
$this->settings->save();
|
$this->settings->save();
|
||||||
|
$this->emit('success', 'Transaction email settings updated successfully.');
|
||||||
$this->decrypt();
|
$this->decrypt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@ use Illuminate\Contracts\Database\Eloquent\Builder;
|
|||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Masmerise\Toaster\Toastable;
|
||||||
|
use Masmerise\Toaster\Toaster;
|
||||||
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
|
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
|
||||||
|
|
||||||
class Application extends BaseModel
|
class Application extends BaseModel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<x-layout>
|
<x-layout>
|
||||||
<h1>Dashboard</h1>
|
<h1>Dashboard</h1>
|
||||||
<div class="pt-2 pb-10">Something (more) useful will be here.</div>
|
<div class="pt-2 pb-10">Something <span class="text-warning">(more)</span> useful will be here.</div>
|
||||||
<div class="w-full rounded shadow stats stats-vertical lg:stats-horizontal">
|
<div class="w-full rounded stats stats-vertical lg:stats-horizontal">
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="stat-title">Servers</div>
|
<div class="stat-title">Servers</div>
|
||||||
<div class="stat-value">{{ $servers }}</div>
|
<div class="stat-value">{{ $servers }}</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row"">
|
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row"">
|
||||||
<x-forms.input placeholder="NODE_ENV" noDirty id="key" label="Name" required />
|
<x-forms.input placeholder="NODE_ENV" noDirty id="key" label="Name" required />
|
||||||
<x-forms.input placeholder="production" noDirty id="value" label="Value" required />
|
<x-forms.input placeholder="production" noDirty id="value" label="Value" required />
|
||||||
<x-forms.checkbox noDirty id="is_build_time" label="Build Variable?" />
|
<x-forms.checkbox class="w-96" noDirty id="is_build_time" label="Build Variable?" />
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
Add New Variable
|
Add New Variable
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||||
<x-forms.input id="env.key" label="Name" />
|
<x-forms.input id="env.key" label="Name" />
|
||||||
<x-forms.input type="password" id="env.value" label="Value" />
|
<x-forms.input type="password" id="env.value" label="Value" />
|
||||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" />
|
<x-forms.checkbox class="w-96" disabled id="env.is_build_time" label="Build Variable?" />
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
Update
|
Update
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<h2>General</h2>
|
<h2>General</h2>
|
||||||
<x-forms.button type="submit">Save</x-forms.button>
|
<x-forms.button type="submit">Save</x-forms.button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2 ">
|
<div class="flex flex-col gap-2 ">
|
||||||
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
<div class="pt-2 pb-10 ">All Projects</div>
|
<div class="pt-2 pb-10 ">All Projects</div>
|
||||||
<div class="grid gap-2 lg:grid-cols-2">
|
<div class="grid gap-2 lg:grid-cols-2">
|
||||||
@forelse ($projects as $project)
|
@forelse ($projects as $project)
|
||||||
<div class="gap-2 cursor-pointer box group" x-data x-on:click="goto('{{ $project->uuid }}')">
|
<div class="gap-2 border border-transparent cursor-pointer box group" x-data
|
||||||
|
x-on:click="goto('{{ $project->uuid }}')">
|
||||||
<div class="flex flex-col mx-6">
|
<div class="flex flex-col mx-6">
|
||||||
<a class=" group-hover:text-white hover:no-underline"
|
<a class=" group-hover:text-white hover:no-underline"
|
||||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">{{ $project->name }}</a>
|
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">{{ $project->name }}</a>
|
||||||
<a class="text-xs group-hover:text-white hover:no-underline"
|
<div class="text-xs group-hover:text-white hover:no-underline"
|
||||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">{{ $project->description }}</a>
|
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||||
|
{{ $project->description }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1"></div>
|
<div class="flex-1"></div>
|
||||||
<a class="mx-4 rounded hover:text-white"
|
<a class="mx-4 rounded hover:text-white"
|
||||||
|
@ -3,20 +3,34 @@
|
|||||||
<div class="pt-2 pb-10 ">All Servers</div>
|
<div class="pt-2 pb-10 ">All Servers</div>
|
||||||
<div class="grid gap-2 lg:grid-cols-2">
|
<div class="grid gap-2 lg:grid-cols-2">
|
||||||
@forelse ($servers as $server)
|
@forelse ($servers as $server)
|
||||||
<a class="text-center hover:no-underline box group"
|
<div x-data x-on:click="goto('{{ $server->uuid }}')" @class([
|
||||||
href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}">
|
'gap-2 border cursor-pointer box group',
|
||||||
|
'border-transparent' => $server->settings->is_reachable,
|
||||||
|
'border-red-500' => !$server->settings->is_reachable,
|
||||||
|
])>
|
||||||
|
<div class="flex flex-col mx-6">
|
||||||
<div class=" group-hover:text-white">
|
<div class=" group-hover:text-white">
|
||||||
<div>{{ $server->name }}</div>
|
{{ $server->name }}
|
||||||
@if (!$server->settings->is_reachable)
|
@if (!$server->settings->is_reachable)
|
||||||
<div class="text-xs text-error">not validated</div>
|
<span class="text-xs text-error">not validated yet</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</a>
|
<div class="text-xs group-hover:text-white"
|
||||||
|
href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}">
|
||||||
|
{{ $server->description }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<div>
|
<div>
|
||||||
<div>No servers found. Without a server, you won't be able to do much.</div>
|
<div>No servers found. Without a server, you won't be able to do much.</div>
|
||||||
<x-use-magic-bar />
|
<x-use-magic-bar />
|
||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
<script>
|
||||||
|
function goto(uuid) {
|
||||||
|
window.location.href = '/server/' + uuid;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</x-layout>
|
</x-layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user