Update success messages
This commit is contained in:
parent
592221b4bf
commit
c7218f2856
@ -63,7 +63,7 @@ public function submitFromFields()
|
|||||||
]);
|
]);
|
||||||
$this->team->save();
|
$this->team->save();
|
||||||
refreshSession();
|
refreshSession();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ public function submitFromFields()
|
|||||||
public function sendTestNotification()
|
public function sendTestNotification()
|
||||||
{
|
{
|
||||||
$this->team?->notify(new Test($this->emails));
|
$this->team?->notify(new Test($this->emails));
|
||||||
$this->dispatch('success', 'Test Email sent successfully.');
|
$this->dispatch('success', 'Test Email sent.');
|
||||||
}
|
}
|
||||||
public function instantSaveInstance()
|
public function instantSaveInstance()
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ public function instantSaveInstance()
|
|||||||
$this->team->resend_enabled = false;
|
$this->team->resend_enabled = false;
|
||||||
$this->team->save();
|
$this->team->save();
|
||||||
refreshSession();
|
refreshSession();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ public function submit()
|
|||||||
]);
|
]);
|
||||||
$this->team->save();
|
$this->team->save();
|
||||||
refreshSession();
|
refreshSession();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->team->smtp_enabled = false;
|
$this->team->smtp_enabled = false;
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -148,7 +148,7 @@ public function submitResend()
|
|||||||
]);
|
]);
|
||||||
$this->team->save();
|
$this->team->save();
|
||||||
refreshSession();
|
refreshSession();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->team->resend_enabled = false;
|
$this->team->resend_enabled = false;
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
|
@ -27,7 +27,7 @@ public function submit()
|
|||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->dispatch('success', 'Profile updated successfully.');
|
$this->dispatch('success', 'Profile updated');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public function submit()
|
|||||||
$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->dispatch('success', 'Preview url template updated successfully.');
|
$this->dispatch('success', 'Preview url template updated.');
|
||||||
$this->generate_real_url();
|
$this->generate_real_url();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public function deleteBackup($exeuctionId)
|
|||||||
delete_backup_locally($execution->filename, $execution->scheduledDatabaseBackup->database->destination->server);
|
delete_backup_locally($execution->filename, $execution->scheduledDatabaseBackup->database->destination->server);
|
||||||
}
|
}
|
||||||
$execution->delete();
|
$execution->delete();
|
||||||
$this->dispatch('success', 'Backup deleted successfully.');
|
$this->dispatch('success', 'Backup deleted.');
|
||||||
$this->dispatch('refreshBackupExecutions');
|
$this->dispatch('refreshBackupExecutions');
|
||||||
}
|
}
|
||||||
public function download($exeuctionId)
|
public function download($exeuctionId)
|
||||||
|
@ -38,7 +38,7 @@ public function check_status($showNotification = false)
|
|||||||
{
|
{
|
||||||
dispatch_sync(new ContainerStatusJob($this->database->destination->server));
|
dispatch_sync(new ContainerStatusJob($this->database->destination->server));
|
||||||
$this->database->refresh();
|
$this->database->refresh();
|
||||||
if ($showNotification) $this->dispatch('success', 'Success', 'Database status updated.');
|
if ($showNotification) $this->dispatch('success', 'Database status updated.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
|
@ -59,7 +59,7 @@ public function instantSaveAdvanced() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -73,7 +73,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public function instantSaveAdvanced()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -75,7 +75,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public function instantSaveAdvanced()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -74,7 +74,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public function instantSaveAdvanced() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -105,7 +105,7 @@ public function save_init_script($script)
|
|||||||
$this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']);
|
$this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']);
|
||||||
$this->database->init_scripts = array_merge($this->database->init_scripts, [$script]);
|
$this->database->init_scripts = array_merge($this->database->init_scripts, [$script]);
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Init script saved successfully.');
|
$this->dispatch('success', 'Init script saved.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete_init_script($script)
|
public function delete_init_script($script)
|
||||||
@ -116,7 +116,7 @@ public function delete_init_script($script)
|
|||||||
$this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray();
|
$this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->refresh();
|
$this->refresh();
|
||||||
$this->dispatch('success', 'Init script deleted successfully.');
|
$this->dispatch('success', 'Init script deleted.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ public function save_new_init_script()
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Init script added successfully.');
|
$this->dispatch('success', 'Init script added.');
|
||||||
$this->new_content = '';
|
$this->new_content = '';
|
||||||
$this->new_filename = '';
|
$this->new_filename = '';
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public function instantSaveAdvanced() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
$this->dispatch('success', 'You need to restart the service for the changes to take effect.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -66,7 +66,7 @@ public function submit()
|
|||||||
$this->database->redis_conf = null;
|
$this->database->redis_conf = null;
|
||||||
}
|
}
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'Database updated successfully.');
|
$this->dispatch('success', 'Database updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public function setSelectedBackup($backupId) {
|
|||||||
public function delete($scheduled_backup_id): void
|
public function delete($scheduled_backup_id): void
|
||||||
{
|
{
|
||||||
$this->database->scheduledBackups->find($scheduled_backup_id)->delete();
|
$this->database->scheduledBackups->find($scheduled_backup_id)->delete();
|
||||||
$this->dispatch('success', 'Scheduled backup deleted successfully.');
|
$this->dispatch('success', 'Scheduled backup deleted.');
|
||||||
$this->refreshScheduledBackups();
|
$this->refreshScheduledBackups();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public function submit()
|
|||||||
$this->validate();
|
$this->validate();
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
updateCompose($this->database);
|
updateCompose($this->database);
|
||||||
$this->dispatch('success', 'Database saved successfully.');
|
$this->dispatch('success', 'Database saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
ray($e);
|
ray($e);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -42,7 +42,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->fileStorage->save();
|
$this->fileStorage->save();
|
||||||
$this->fileStorage->saveStorageOnServer();
|
$this->fileStorage->saveStorageOnServer();
|
||||||
$this->dispatch('success', 'File updated successfully.');
|
$this->dispatch('success', 'File updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->fileStorage->setRawAttributes($original);
|
$this->fileStorage->setRawAttributes($original);
|
||||||
$this->fileStorage->save();
|
$this->fileStorage->save();
|
||||||
|
@ -64,9 +64,9 @@ public function stop(bool $forceCleanup = false)
|
|||||||
StopService::run($this->service);
|
StopService::run($this->service);
|
||||||
$this->service->refresh();
|
$this->service->refresh();
|
||||||
if ($forceCleanup) {
|
if ($forceCleanup) {
|
||||||
$this->dispatch('success', 'Force cleanup service successfully.');
|
$this->dispatch('success', 'Force cleanup service.');
|
||||||
} else {
|
} else {
|
||||||
$this->dispatch('success', 'Service stopped successfully.');
|
$this->dispatch('success', 'Service stopped.');
|
||||||
}
|
}
|
||||||
ServiceStatusChanged::dispatch();
|
ServiceStatusChanged::dispatch();
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public function delete()
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->application->delete();
|
$this->application->delete();
|
||||||
$this->dispatch('success', 'Application deleted successfully.');
|
$this->dispatch('success', 'Application deleted.');
|
||||||
return redirect()->route('project.service.configuration', $this->parameters);
|
return redirect()->route('project.service.configuration', $this->parameters);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -58,7 +58,7 @@ public function submit()
|
|||||||
$this->validate();
|
$this->validate();
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
updateCompose($this->application);
|
updateCompose($this->application);
|
||||||
$this->dispatch('success', 'Application saved successfully.');
|
$this->dispatch('success', 'Application saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -48,7 +48,7 @@ public function saveCompose($raw)
|
|||||||
public function instantSave()
|
public function instantSave()
|
||||||
{
|
{
|
||||||
$this->service->save();
|
$this->service->save();
|
||||||
$this->dispatch('success', 'Service settings saved successfully.');
|
$this->dispatch('success', 'Service settings saved.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submit()
|
public function submit()
|
||||||
@ -62,7 +62,7 @@ public function submit()
|
|||||||
$this->service->saveComposeConfigs();
|
$this->service->saveComposeConfigs();
|
||||||
$this->dispatch('refreshStacks');
|
$this->dispatch('refreshStacks');
|
||||||
$this->dispatch('refreshEnvs');
|
$this->dispatch('refreshEnvs');
|
||||||
$this->dispatch('success', 'Service saved successfully.');
|
$this->dispatch('success', 'Service saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -120,9 +120,9 @@ public function saveVariables($isPreview)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($isPreview) {
|
if ($isPreview) {
|
||||||
$this->dispatch('success', 'Preview environment variables updated successfully.');
|
$this->dispatch('success', 'Preview environment variables updated.');
|
||||||
} else {
|
} else {
|
||||||
$this->dispatch('success', 'Environment variables updated successfully.');
|
$this->dispatch('success', 'Environment variables updated.');
|
||||||
}
|
}
|
||||||
$this->refreshEnvs();
|
$this->refreshEnvs();
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->serialize();
|
$this->serialize();
|
||||||
$this->env->save();
|
$this->env->save();
|
||||||
$this->dispatch('success', 'Environment variable updated successfully.');
|
$this->dispatch('success', 'Environment variable updated.');
|
||||||
$this->dispatch('refreshEnvs');
|
$this->dispatch('refreshEnvs');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return handleError($e);
|
return handleError($e);
|
||||||
|
@ -52,7 +52,7 @@ public function submit()
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->resource->save();
|
$this->resource->save();
|
||||||
$this->dispatch('success', 'Resource limits updated successfully.');
|
$this->dispatch('success', 'Resource limits updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public function submit($data)
|
|||||||
}
|
}
|
||||||
$task->save();
|
$task->save();
|
||||||
$this->refreshTasks();
|
$this->refreshTasks();
|
||||||
$this->dispatch('success', 'Scheduled task added successfully.');
|
$this->dispatch('success', 'Scheduled task added.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public function submit()
|
|||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->task->save();
|
$this->task->save();
|
||||||
$this->dispatch('success', 'Scheduled task updated successfully.');
|
$this->dispatch('success', 'Scheduled task updated.');
|
||||||
$this->dispatch('refreshTasks');
|
$this->dispatch('refreshTasks');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public function instantSave()
|
|||||||
refresh_server_connection($this->server->privateKey);
|
refresh_server_connection($this->server->privateKey);
|
||||||
$this->validateServer(false);
|
$this->validateServer(false);
|
||||||
$this->server->settings->save();
|
$this->server->settings->save();
|
||||||
$this->dispatch('success', 'Server updated successfully.');
|
$this->dispatch('success', 'Server updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -113,6 +113,6 @@ public function submit()
|
|||||||
$this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage;
|
$this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage;
|
||||||
$this->server->settings->save();
|
$this->server->settings->save();
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
$this->dispatch('success', 'Server updated successfully.');
|
$this->dispatch('success', 'Server updated.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public function configureLogDrain()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->dispatch('serverRefresh');
|
$this->dispatch('serverRefresh');
|
||||||
$this->dispatch('success', 'Log drain service started successfully.');
|
$this->dispatch('success', 'Log drain service started.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ public function submit(string $type)
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$this->server->settings->save();
|
$this->server->settings->save();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
return true;
|
return true;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
if ($type === 'newrelic') {
|
if ($type === 'newrelic') {
|
||||||
|
@ -17,7 +17,7 @@ public function delete(string $fileName)
|
|||||||
$proxy_path = get_proxy_path();
|
$proxy_path = get_proxy_path();
|
||||||
$file = str_replace('|', '.', $fileName);
|
$file = str_replace('|', '.', $fileName);
|
||||||
instant_remote_process(["rm -f {$proxy_path}/dynamic/{$file}"], $server);
|
instant_remote_process(["rm -f {$proxy_path}/dynamic/{$file}"], $server);
|
||||||
$this->dispatch('success', 'Success', 'File deleted.');
|
$this->dispatch('success', 'File deleted.');
|
||||||
$this->dispatch('loadDynamicConfigurations');
|
$this->dispatch('loadDynamicConfigurations');
|
||||||
$this->dispatch('refresh');
|
$this->dispatch('refresh');
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public function addDynamicConfiguration()
|
|||||||
$this->fileName = "{$this->fileName}.yaml";
|
$this->fileName = "{$this->fileName}.yaml";
|
||||||
}
|
}
|
||||||
if ($this->fileName === 'coolify.yaml') {
|
if ($this->fileName === 'coolify.yaml') {
|
||||||
$this->dispatch('error', 'Error', 'File name is reserved.');
|
$this->dispatch('error', 'File name is reserved.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$proxy_path = get_proxy_path();
|
$proxy_path = get_proxy_path();
|
||||||
@ -51,7 +51,7 @@ public function addDynamicConfiguration()
|
|||||||
if ($this->newFile) {
|
if ($this->newFile) {
|
||||||
$exists = instant_remote_process(["test -f $file && echo 1 || echo 0"], $this->server);
|
$exists = instant_remote_process(["test -f $file && echo 1 || echo 0"], $this->server);
|
||||||
if ($exists == 1) {
|
if ($exists == 1) {
|
||||||
$this->dispatch('error', 'Error', 'File already exists');
|
$this->dispatch('error', 'File already exists');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ public function addDynamicConfiguration()
|
|||||||
instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server);
|
instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server);
|
||||||
$this->dispatch('loadDynamicConfigurations');
|
$this->dispatch('loadDynamicConfigurations');
|
||||||
$this->dispatch('dynamic-configuration-added');
|
$this->dispatch('dynamic-configuration-added');
|
||||||
$this->dispatch('success', 'Success', 'Dynamic configuration saved.');
|
$this->dispatch('success', 'Dynamic configuration saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ public function validateDockerVersion()
|
|||||||
$this->docker_version = $this->server->validateDockerEngineVersion();
|
$this->docker_version = $this->server->validateDockerEngineVersion();
|
||||||
if ($this->docker_version) {
|
if ($this->docker_version) {
|
||||||
$this->dispatch('serverInstalled');
|
$this->dispatch('serverInstalled');
|
||||||
$this->dispatch('success', 'Server validated successfully.');
|
$this->dispatch('success', 'Server validated.');
|
||||||
} else {
|
} else {
|
||||||
$this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
|
$this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
|
||||||
return;
|
return;
|
||||||
|
@ -81,6 +81,6 @@ public function backup_now()
|
|||||||
}
|
}
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
$this->dispatch('success', 'Backup updated successfully.');
|
$this->dispatch('success', 'Backup updated.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public function submitFromFields() {
|
|||||||
'settings.smtp_from_name' => 'required',
|
'settings.smtp_from_name' => 'required',
|
||||||
]);
|
]);
|
||||||
$this->settings->save();
|
$this->settings->save();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ public function submitResend() {
|
|||||||
'settings.resend_api_key' => 'required'
|
'settings.resend_api_key' => 'required'
|
||||||
]);
|
]);
|
||||||
$this->settings->save();
|
$this->settings->save();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->settings->resend_enabled = false;
|
$this->settings->resend_enabled = false;
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
@ -98,7 +98,7 @@ public function submit()
|
|||||||
'settings.smtp_timeout' => 'nullable',
|
'settings.smtp_timeout' => 'nullable',
|
||||||
]);
|
]);
|
||||||
$this->settings->save();
|
$this->settings->save();
|
||||||
$this->dispatch('success', 'Settings saved successfully.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public function checkPermissions()
|
|||||||
{
|
{
|
||||||
GithubAppPermissionJob::dispatchSync($this->github_app);
|
GithubAppPermissionJob::dispatchSync($this->github_app);
|
||||||
$this->github_app->refresh()->makeVisible('client_secret')->makeVisible('webhook_secret');
|
$this->github_app->refresh()->makeVisible('client_secret')->makeVisible('webhook_secret');
|
||||||
$this->dispatch('success', 'Success', 'Github App permissions updated.');
|
$this->dispatch('success', 'Github App permissions updated.');
|
||||||
}
|
}
|
||||||
// public function check()
|
// public function check()
|
||||||
// {
|
// {
|
||||||
@ -150,7 +150,7 @@ public function submit()
|
|||||||
'github_app.is_system_wide' => 'required|bool',
|
'github_app.is_system_wide' => 'required|bool',
|
||||||
]);
|
]);
|
||||||
$this->github_app->save();
|
$this->github_app->save();
|
||||||
$this->dispatch('success', 'Success', 'Github App updated.');
|
$this->dispatch('success', 'Github App updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ public function instantSave()
|
|||||||
try {
|
try {
|
||||||
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
|
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
|
||||||
$this->github_app->save();
|
$this->github_app->save();
|
||||||
$this->dispatch('success', 'Success', 'Github App updated.');
|
$this->dispatch('success', 'Github App updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public function submit()
|
|||||||
try {
|
try {
|
||||||
$this->team->save();
|
$this->team->save();
|
||||||
refreshSession();
|
refreshSession();
|
||||||
$this->dispatch('success', 'Team updated successfully.');
|
$this->dispatch('success', 'Team updated.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ private function generate_invite_link(bool $sendEmail = false)
|
|||||||
]);
|
]);
|
||||||
$mail->subject('You have been invited to ' . currentTeam()->name . ' on ' . config('app.name') . '.');
|
$mail->subject('You have been invited to ' . currentTeam()->name . ' on ' . config('app.name') . '.');
|
||||||
send_user_an_email($mail, $this->email);
|
send_user_an_email($mail, $this->email);
|
||||||
$this->dispatch('success', 'Invitation sent via email successfully.');
|
$this->dispatch('success', 'Invitation sent via email.');
|
||||||
$this->dispatch('refreshInvitations');
|
$this->dispatch('refreshInvitations');
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,7 +146,12 @@ function copyToClipboard(text) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.Livewire.on('error', (message) => {
|
window.Livewire.on('error', (message) => {
|
||||||
if (message.length > 0) {
|
if (message.length == 1) {
|
||||||
|
window.toast('Error', {
|
||||||
|
type: 'danger',
|
||||||
|
description: message[0],
|
||||||
|
})
|
||||||
|
} else if (message.length == 2) {
|
||||||
window.toast(message[0], {
|
window.toast(message[0], {
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
description: message[1],
|
description: message[1],
|
||||||
@ -162,7 +167,12 @@ function copyToClipboard(text) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.Livewire.on('success', (message) => {
|
window.Livewire.on('success', (message) => {
|
||||||
if (message.length > 0) {
|
if (message.length == 1) {
|
||||||
|
window.toast('Success', {
|
||||||
|
type: 'success',
|
||||||
|
description: message[0],
|
||||||
|
})
|
||||||
|
} else if (message.length == 2) {
|
||||||
window.toast(message[0], {
|
window.toast(message[0], {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
description: message[1],
|
description: message[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user