diff --git a/app/Livewire/Project/Database/BackupEdit.php b/app/Livewire/Project/Database/BackupEdit.php
index 86aec0f6a..f5f476257 100644
--- a/app/Livewire/Project/Database/BackupEdit.php
+++ b/app/Livewire/Project/Database/BackupEdit.php
@@ -42,19 +42,21 @@ class BackupEdit extends Component
public function delete()
{
- // TODO: Delete backup from server and add a confirmation modal
- $this->backup->delete();
- if ($this->backup->database->getMorphClass() === 'App\Models\ServiceDatabase') {
- $previousUrl = url()->previous();
- $url = Url::fromString($previousUrl);
- $url = $url->withoutQueryParameter('selectedBackupId');
- $url = $url->withFragment('backups');
- $url = $url->getPath() . "#{$url->getFragment()}";
- return redirect($url);
- } else {
- return redirect()->route('project.database.backup.index', $this->parameters);
+ try {
+ $this->backup->delete();
+ if ($this->backup->database->getMorphClass() === 'App\Models\ServiceDatabase') {
+ $previousUrl = url()->previous();
+ $url = Url::fromString($previousUrl);
+ $url = $url->withoutQueryParameter('selectedBackupId');
+ $url = $url->withFragment('backups');
+ $url = $url->getPath() . "#{$url->getFragment()}";
+ return redirect($url);
+ } else {
+ return redirect()->route('project.database.backup.index', $this->parameters);
+ }
+ } catch (\Throwable $e) {
+ return handleError($e, $this);
}
-
}
public function instantSave()
@@ -63,7 +65,7 @@ class BackupEdit extends Component
$this->custom_validate();
$this->backup->save();
$this->backup->refresh();
- $this->dispatch('success', 'Backup updated successfully');
+ $this->dispatch('success', 'Backup updated successfully.');
} catch (\Throwable $e) {
$this->dispatch('error', $e->getMessage());
}
diff --git a/app/Livewire/Project/Service/Database.php b/app/Livewire/Project/Service/Database.php
index 8dec97852..a2d8f29a6 100644
--- a/app/Livewire/Project/Service/Database.php
+++ b/app/Livewire/Project/Service/Database.php
@@ -34,7 +34,12 @@ class Database extends Component
}
$this->refreshFileStorages();
}
- public function instantSaveAdvanced()
+ public function instantSaveExclude()
+ {
+ $this->submit();
+
+ }
+ public function instantSaveLogDrain()
{
if (!$this->database->service->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
@@ -74,6 +79,7 @@ class Database extends Component
public function submit()
{
try {
+ ray('asdf');
$this->validate();
$this->database->save();
updateCompose($this->database);
diff --git a/app/Livewire/Modal/EditCompose.php b/app/Livewire/Project/Service/EditCompose.php
similarity index 69%
rename from app/Livewire/Modal/EditCompose.php
rename to app/Livewire/Project/Service/EditCompose.php
index f2804e5ac..cc385315e 100644
--- a/app/Livewire/Modal/EditCompose.php
+++ b/app/Livewire/Project/Service/EditCompose.php
@@ -1,11 +1,11 @@
service = Service::find($this->serviceId);
}
- public function render()
- {
- return view('livewire.modal.edit-compose');
- }
- public function submit() {
+
+ public function saveEditedCompose() {
$this->dispatch('warning', "Saving new docker compose...");
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
- $this->closeModal();
+ }
+ public function render()
+ {
+ return view('livewire.project.service.edit-compose');
}
}
diff --git a/app/Livewire/Project/Service/Modal.php b/app/Livewire/Project/Service/Modal.php
deleted file mode 100644
index 653425835..000000000
--- a/app/Livewire/Project/Service/Modal.php
+++ /dev/null
@@ -1,13 +0,0 @@
-user()->id;
return [
+ "echo-private:user.{$userId},ServiceStatusChanged" => 'serviceStarted',
"serviceStatusChanged"
];
}
+ public function serviceStarted() {
+ $this->dispatch('success', 'Service started.');
+ }
public function serviceStatusChanged()
{
$this->dispatch('refresh')->self();
}
- public function check_status() {
+ public function check_status()
+ {
$this->dispatch('check_status');
$this->dispatch('success', 'Service status updated.');
}
@@ -44,7 +51,7 @@ class Navbar extends Component
$this->isDeploymentProgress = false;
}
}
- public function deploy()
+ public function start()
{
$this->checkDeployments();
if ($this->isDeploymentProgress) {
@@ -73,9 +80,9 @@ class Navbar extends Component
return;
}
PullImage::run($this->service);
- $this->dispatch('image-pulled');
StopService::run($this->service);
$this->service->parse();
+ $this->dispatch('imagePulled');
$activity = StartService::run($this->service);
$this->dispatch('activityMonitor', $activity->id);
}
diff --git a/app/Livewire/Project/Service/StackForm.php b/app/Livewire/Project/Service/StackForm.php
index 650dde792..1bfb70c5e 100644
--- a/app/Livewire/Project/Service/StackForm.php
+++ b/app/Livewire/Project/Service/StackForm.php
@@ -2,11 +2,12 @@
namespace App\Livewire\Project\Service;
+use App\Models\Service;
use Livewire\Component;
class StackForm extends Component
{
- public $service;
+ public Service $service;
public $fields = [];
protected $listeners = ["saveCompose"];
public $rules = [
diff --git a/app/Livewire/Security/PrivateKey/Show.php b/app/Livewire/Security/PrivateKey/Show.php
index a4fbaef52..0540b2e29 100644
--- a/app/Livewire/Security/PrivateKey/Show.php
+++ b/app/Livewire/Security/PrivateKey/Show.php
@@ -50,6 +50,7 @@ class Show extends Component
$this->private_key->private_key = formatPrivateKey($this->private_key->private_key);
$this->private_key->save();
refresh_server_connection($this->private_key);
+ $this->dispatch('success', 'Private key updated.');
} catch (\Throwable $e) {
return handleError($e, $this);
}
diff --git a/app/Livewire/Server/Proxy/Deploy.php b/app/Livewire/Server/Proxy/Deploy.php
index 72d0b3884..8a029e6a1 100644
--- a/app/Livewire/Server/Proxy/Deploy.php
+++ b/app/Livewire/Server/Proxy/Deploy.php
@@ -49,7 +49,8 @@ class Deploy extends Component
{
$this->server->refresh();
}
- public function restart() {
+ public function restart()
+ {
try {
$this->stop();
$this->dispatch('checkProxy');
diff --git a/app/View/Components/Forms/Checkbox.php b/app/View/Components/Forms/Checkbox.php
index 36b561eda..0047e7a4d 100644
--- a/app/View/Components/Forms/Checkbox.php
+++ b/app/View/Components/Forms/Checkbox.php
@@ -19,7 +19,7 @@ class Checkbox extends Component
public ?string $helper = null,
public string|bool $instantSave = false,
public bool $disabled = false,
- public string $defaultClass = "border-coolgray-500 text-warning focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed",
+ public string $defaultClass = "dark:border-neutral-700 text-warning focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed",
) {
//
}
diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.php
index dd05c67eb..7cb8595db 100644
--- a/bootstrap/helpers/services.php
+++ b/bootstrap/helpers/services.php
@@ -94,7 +94,7 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource)
$resource->service->docker_compose_raw = $dockerComposeRaw;
$resource->service->save();
- if (!str($resource->fqdn)->contains(',')) {
+ if ($resource->fqdn && !str($resource->fqdn)->contains(',')) {
// Update FQDN
$variableName = "SERVICE_FQDN_" . Str::of($resource->name)->upper();
$generatedEnv = EnvironmentVariable::where('service_id', $resource->service_id)->where('key', $variableName)->first();
diff --git a/resources/css/app.css b/resources/css/app.css
index ce97eebf7..f76067b51 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -4,7 +4,7 @@
html,
body {
- @apply text-black bg-white dark:bg-base dark:text-neutral-400;
+ @apply bg-white text-neutral-600 dark:bg-base dark:text-neutral-400;
}
body {
@@ -12,7 +12,7 @@ body {
}
.button {
- @apply px-3 py-1.5 text-sm font-normal normal-case rounded bg-neutral-200 hover:bg-neutral-300 dark:bg-coolgray-200 dark:text-white dark:hover:bg-coolgray-100 dark:disabled:bg-coolgray-100/40 dark:disabled:text-neutral-800 min-w-fit flex items-center justify-center;
+ @apply flex items-center justify-center px-3 py-1 text-sm font-normal normal-case rounded bg-neutral-200 hover:bg-neutral-300 dark:bg-coolgray-200 dark:text-white dark:hover:bg-coolgray-100 dark:disabled:bg-coolgray-100/40 dark:disabled:text-neutral-800 min-w-fit;
}
button[isError]:not(:disabled) {
@apply bg-red-600 hover:bg-red-700;
@@ -23,7 +23,6 @@ button[isHighlighted]:not(:disabled) {
}
-
h1 {
@apply text-2xl font-bold dark:text-white text-neutral-800;
}
@@ -41,7 +40,7 @@ h4 {
}
a {
- @apply dark:hover:text-white dark:text-neutral-400 text-neutral-600;
+ @apply hover:text-black dark:hover:text-white;
}
label {
@@ -101,7 +100,7 @@ option {
}
.dropdown-item {
- @apply relative flex cursor-pointer select-none dark:hover:text-white dark:hover:bg-coollabs items-center px-2 py-1.5 text-xs justify-center outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2
+ @apply relative flex cursor-pointer select-none dark:hover:text-white dark:hover:bg-coollabs items-center pr-4 pl-2 py-1 text-xs justify-center outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full;
}
.badge {
diff --git a/resources/views/components/applications/links.blade.php b/resources/views/components/applications/links.blade.php
index d6a0d15d5..dc067dfe6 100644
--- a/resources/views/components/applications/links.blade.php
+++ b/resources/views/components/applications/links.blade.php
@@ -11,15 +11,13 @@
stroke-width="1.5" stroke="currentColor">