Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

wip

Andras Bacsai33cae2c22263
diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php
index 401ec2ed02..1dcd605cd7 100644
--- a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php
+++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php
@@ -25,6 +25,8 @@ class All extends Component
'application_id' => $this->application->id,
]);
$this->application->refresh();
+
+ $this->emit('success', 'Environment variable added successfully.');
$this->emit('clearAddEnv');
} catch (\Exception $e) {
return general_error_handler(err: $e, that: $this);
diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php
index 7dd73e487e..61ecaf3de8 100644
--- a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php
+++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php
@@ -28,6 +28,7 @@ class Show extends Component
{
$this->validate();
$this->env->save();
+ $this->emit('success', 'Environment variable updated successfully.');
}
public function delete()
{
diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php
index f4d435ce9d..8f4623861a 100644
--- a/app/Http/Livewire/Project/Application/General.php
+++ b/app/Http/Livewire/Project/Application/General.php
@@ -127,6 +127,7 @@ class General extends Component
$this->application->fqdn = $domains->implode(',');
$this->application->save();
+ $this->emit('success', 'Application settings updated!');
} catch (\Exception $e) {
return general_error_handler(err: $e, that: $this);
}
diff --git a/app/Http/Livewire/Project/Application/Preview/Form.php b/app/Http/Livewire/Project/Application/Preview/Form.php
index 2cb1aaa0a5..e173120057 100644
--- a/app/Http/Livewire/Project/Application/Preview/Form.php
+++ b/app/Http/Livewire/Project/Application/Preview/Form.php
@@ -41,6 +41,7 @@ class Form extends Component
$this->validate();
$this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template);
$this->application->save();
+ $this->emit('success', 'Preview url template updated successfully.');
$this->generate_real_url();
}
}
diff --git a/app/Http/Livewire/Project/Application/ResourceLimits.php b/app/Http/Livewire/Project/Application/ResourceLimits.php
index 6da94054fd..9db5626ac3 100644
--- a/app/Http/Livewire/Project/Application/ResourceLimits.php
+++ b/app/Http/Livewire/Project/Application/ResourceLimits.php
@@ -52,6 +52,7 @@ class ResourceLimits extends Component
}
$this->validate();
$this->application->save();
+ $this->emit('success', 'Resource limits updated successfully.');
} catch (\Exception $e) {
return general_error_handler(err: $e, that: $this);
}
diff --git a/app/Http/Livewire/Project/Application/Storages/All.php b/app/Http/Livewire/Project/Application/Storages/All.php
index d6691857e4..59cf0e52e5 100644
--- a/app/Http/Livewire/Project/Application/Storages/All.php
+++ b/app/Http/Livewire/Project/Application/Storages/All.php
@@ -25,6 +25,7 @@ class All extends Component
'resource_type' => Application::class,
]);
$this->application->refresh();
+ $this->emit('success', 'Storage added successfully');
$this->emit('clearAddStorage');
} catch (\Exception $e) {
return general_error_handler(err: $e, that: $this);
diff --git a/app/Http/Livewire/Project/Application/Storages/Show.php b/app/Http/Livewire/Project/Application/Storages/Show.php
index da017d6fb1..41c3c1fb8f 100644
--- a/app/Http/Livewire/Project/Application/Storages/Show.php
+++ b/app/Http/Livewire/Project/Application/Storages/Show.php
@@ -21,6 +21,7 @@ class Show extends Component
{
$this->validate();
$this->storage->save();
+ $this->emit('success', 'Storage updated successfully');
}
public function delete()
{
diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php
index f1435ea28d..2c4f2260fa 100644
--- a/app/Http/Livewire/Server/Form.php
+++ b/app/Http/Livewire/Server/Form.php
@@ -82,5 +82,6 @@ class Form extends Component
// return;
// }
$this->server->save();
+ $this->emit('success', 'Server updated successfully.');
}
}
diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php
index 2403fab33c..96268eb79a 100644
--- a/app/Http/Livewire/Server/Proxy.php
+++ b/app/Http/Livewire/Server/Proxy.php
@@ -63,6 +63,7 @@ class Proxy extends Component
instant_remote_process([
"echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml",
], $server);
+ $this->emit('success', 'Proxy configuration saved.');
} catch (\Exception $e) {
return general_error_handler(err: $e);
}
diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php
index e52b1b97f4..7db42883a8 100644
--- a/app/Http/Livewire/Settings/Configuration.php
+++ b/app/Http/Livewire/Settings/Configuration.php
@@ -207,5 +207,6 @@ class Configuration extends Component
if ($this->settings->fqdn || $this->settings->default_redirect_404) {
dispatch(new InstanceProxyCheckJob());
}
+ $this->emit('success', 'Instance settings updated successfully!');
}
}
diff --git a/app/Http/Livewire/Settings/Email.php b/app/Http/Livewire/Settings/Email.php
index b82982a6a1..6342ab4f5c 100644
--- a/app/Http/Livewire/Settings/Email.php
+++ b/app/Http/Livewire/Settings/Email.php
@@ -42,6 +42,7 @@ class Email extends Component
{
try {
$this->submit();
+ $this->emit('success', 'Settings saved successfully.');
} catch (\Exception $e) {
$this->settings->smtp->enabled = false;
$this->validate();
@@ -73,6 +74,7 @@ class Email extends Component
$this->settings->smtp->test_recipients = str_replace(' ', '', $this->settings->smtp->test_recipients);
$this->settings->save();
+ $this->emit('success', 'Transaction email settings updated successfully.');
$this->decrypt();
}
}
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 1648a7dbb2..77bf0a5fb9 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -6,6 +6,8 @@ use Illuminate\Contracts\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Spatie\Activitylog\Models\Activity;
use Illuminate\Database\Eloquent\Relations\HasMany;
+use Masmerise\Toaster\Toastable;
+use Masmerise\Toaster\Toaster;
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
class Application extends BaseModel
diff --git a/resources/views/components/forms/checkbox.blade.php b/resources/views/components/forms/checkbox.blade.php
index 0ab5c22ef1..47c579b1a1 100644
--- a/resources/views/components/forms/checkbox.blade.php
+++ b/resources/views/components/forms/checkbox.blade.php
@@ -8,7 +8,7 @@
'noDirty' => $attributes->has('noDirty'),
'disabled' => null,
])
-<div {{ $attributes->merge(['class' => 'flex cursor-pointer label']) }}>
+<div {{ $attributes->merge(['class' => 'flex cursor-pointer label']) }}>
<div class="flex gap-1 label-text">
@if ($label)
{{ $label }}
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php
index 6a9b796321..f9d5dd0430 100644
--- a/resources/views/dashboard.blade.php
+++ b/resources/views/dashboard.blade.php
@@ -1,7 +1,7 @@
<x-layout>
<h1>Dashboard</h1>
- <div class="pt-2 pb-10">Something (more) useful will be here.</div>
- <div class="w-full rounded shadow stats stats-vertical lg:stats-horizontal">
+ <div class="pt-2 pb-10">Something <span class="text-warning">(more)</span> useful will be here.</div>
+ <div class="w-full rounded stats stats-vertical lg:stats-horizontal">
<div class="stat">
<div class="stat-title">Servers</div>
<div class="stat-value">{{ $servers }}</div>
diff --git a/resources/views/livewire/project/application/environment-variable/add.blade.php b/resources/views/livewire/project/application/environment-variable/add.blade.php
index 54cd5eb260..a18b45789a 100644
--- a/resources/views/livewire/project/application/environment-variable/add.blade.php
+++ b/resources/views/livewire/project/application/environment-variable/add.blade.php
@@ -1,7 +1,7 @@
<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="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">
Add New Variable
</x-forms.button>
diff --git a/resources/views/livewire/project/application/environment-variable/show.blade.php b/resources/views/livewire/project/application/environment-variable/show.blade.php
index abbde06c37..609e7774bc 100644
--- a/resources/views/livewire/project/application/environment-variable/show.blade.php
+++ b/resources/views/livewire/project/application/environment-variable/show.blade.php
@@ -4,7 +4,7 @@
<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 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">
<x-forms.button type="submit">
Update
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index 6ed63ad575..8f1aeeb5ad 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -5,7 +5,6 @@
<div class="flex gap-2">
<h2>General</h2>
<x-forms.button type="submit">Save</x-forms.button>
-
</div>
<div class="flex flex-col gap-2 ">
<div class="flex flex-col w-full gap-2 lg:flex-row">
diff --git a/resources/views/projects.blade.php b/resources/views/projects.blade.php
index 0218e2e4b8..51a99cd56f 100644
--- a/resources/views/projects.blade.php
+++ b/resources/views/projects.blade.php
@@ -3,12 +3,14 @@
<div class="pt-2 pb-10 ">All Projects</div>
<div class="grid gap-2 lg:grid-cols-2">
@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">
<a class=" group-hover:text-white hover:no-underline"
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">{{ $project->name }}</a>
- <a class="text-xs group-hover:text-white hover:no-underline"
- href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">{{ $project->description }}</a>
+ <div class="text-xs group-hover:text-white hover:no-underline"
+ href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
+ {{ $project->description }}</div>
</div>
<div class="flex-1"></div>
<a class="mx-4 rounded hover:text-white"
diff --git a/resources/views/server/all.blade.php b/resources/views/server/all.blade.php
index cefb5f171a..b08b2c845f 100644
--- a/resources/views/server/all.blade.php
+++ b/resources/views/server/all.blade.php
@@ -3,20 +3,34 @@
<div class="pt-2 pb-10 ">All Servers</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($servers as $server)
- <a class="text-center hover:no-underline box group"
- href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}">
- <div class="group-hover:text-white">
- <div>{{ $server->name }}</div>
- @if (!$server->settings->is_reachable)
- <div class="text-xs text-error">not validated</div>
- @endif
+ <div x-data x-on:click="goto('{{ $server->uuid }}')" @class([
+ '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">
+ {{ $server->name }}
+ @if (!$server->settings->is_reachable)
+ <span class="text-xs text-error">not validated yet</span>
+ @endif
+ </div>
+ <div class="text-xs group-hover:text-white"
+ href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}">
+ {{ $server->description }}</div>
</div>
- </a>
+ <div class="flex-1"></div>
+ </div>
@empty
<div>
<div>No servers found. Without a server, you won't be able to do much.</div>
<x-use-magic-bar />
</div>
@endforelse
+ <script>
+ function goto(uuid) {
+ window.location.href = '/server/' + uuid;
+ }
+ </script>
</div>
</x-layout>