fixes
This commit is contained in:
@@ -18,13 +18,13 @@ return new class extends Migration
|
||||
['team_id' => $team->id],
|
||||
[
|
||||
'smtp_enabled' => $team->smtp_enabled ?? false,
|
||||
'smtp_from_address' => Crypt::encryptString($team->smtp_from_address),
|
||||
'smtp_from_name' => Crypt::encryptString($team->smtp_from_name),
|
||||
'smtp_recipients' => Crypt::encryptString($team->smtp_recipients),
|
||||
'smtp_host' => Crypt::encryptString($team->smtp_host),
|
||||
'smtp_from_address' => $team->smtp_from_address ? Crypt::encryptString($team->smtp_from_address) : null,
|
||||
'smtp_from_name' => $team->smtp_from_name ? Crypt::encryptString($team->smtp_from_name) : null,
|
||||
'smtp_recipients' => $team->smtp_recipients ? Crypt::encryptString($team->smtp_recipients) : null,
|
||||
'smtp_host' => $team->smtp_host ? Crypt::encryptString($team->smtp_host) : null,
|
||||
'smtp_port' => $team->smtp_port,
|
||||
'smtp_encryption' => $team->smtp_encryption,
|
||||
'smtp_username' => Crypt::encryptString($team->smtp_username),
|
||||
'smtp_username' => $team->smtp_username ? Crypt::encryptString($team->smtp_username) : null,
|
||||
'smtp_password' => $team->smtp_password,
|
||||
'smtp_timeout' => $team->smtp_timeout,
|
||||
|
||||
|
@@ -92,8 +92,8 @@ return new class extends Migration
|
||||
->where('id', $setting->team_id)
|
||||
->update([
|
||||
'telegram_enabled' => $setting->telegram_enabled,
|
||||
'telegram_token' => Crypt::decryptString($setting->telegram_token),
|
||||
'telegram_chat_id' => Crypt::decryptString($setting->telegram_chat_id),
|
||||
'telegram_token' => $setting->telegram_token ? Crypt::decryptString($setting->telegram_token) : null,
|
||||
'telegram_chat_id' => $setting->telegram_chat_id ? Crypt::decryptString($setting->telegram_chat_id) : null,
|
||||
|
||||
'telegram_notifications_deployments' => $setting->deployment_success_telegram_notifications || $setting->deployment_failure_telegram_notifications,
|
||||
'telegram_notifications_status_changes' => $setting->status_change_telegram_notifications,
|
||||
@@ -101,10 +101,10 @@ return new class extends Migration
|
||||
'telegram_notifications_scheduled_tasks' => $setting->scheduled_task_success_telegram_notifications || $setting->scheduled_task_failure_telegram_notifications,
|
||||
'telegram_notifications_server_disk_usage' => $setting->server_disk_usage_telegram_notifications,
|
||||
|
||||
'telegram_notifications_deployments_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_deployment_success_topic_id),
|
||||
'telegram_notifications_status_changes_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_status_change_topic_id),
|
||||
'telegram_notifications_database_backups_message_thread_id' => Crypt::decryptString($setting->telegram_notifications_backup_success_topic_id),
|
||||
'telegram_notifications_scheduled_tasks_thread_id' => Crypt::decryptString($setting->telegram_notifications_scheduled_task_success_topic_id),
|
||||
'telegram_notifications_deployments_message_thread_id' => $setting->telegram_notifications_deployment_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_deployment_success_topic_id) : null,
|
||||
'telegram_notifications_status_changes_message_thread_id' => $setting->telegram_notifications_status_change_topic_id ? Crypt::decryptString($setting->telegram_notifications_status_change_topic_id) : null,
|
||||
'telegram_notifications_database_backups_message_thread_id' => $setting->telegram_notifications_backup_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_backup_success_topic_id) : null,
|
||||
'telegram_notifications_scheduled_tasks_thread_id' => $setting->telegram_notifications_scheduled_task_success_topic_id ? Crypt::decryptString($setting->telegram_notifications_scheduled_task_success_topic_id) : null,
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
\Log::error('Error migrating telegram notification settings from teams table: '.$e->getMessage());
|
||||
|
@@ -39,7 +39,9 @@
|
||||
label="Deployment Success" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="deploymentFailureDiscordNotifications"
|
||||
label="Deployment Failure" />
|
||||
{{-- <x-forms.checkbox instantSave="saveModel" helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container." id="statusChangeDiscordNotifications" label="Container Status Changes" /> --}}
|
||||
<x-forms.checkbox instantSave="saveModel"
|
||||
helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container."
|
||||
id="statusChangeDiscordNotifications" label="Container Status Changes" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
|
||||
|
@@ -119,13 +119,16 @@
|
||||
label="Deployment Success" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="deploymentFailureEmailNotifications"
|
||||
label="Deployment Failure" />
|
||||
{{-- <x-forms.checkbox instantSave="saveModel" helper="Send an email when a container status changes. It will send and email for Stopped and Restarted events of a container." id="statusChangeEmailNotifications" label="Container Status Changes" /> --}}
|
||||
<x-forms.checkbox instantSave="saveModel"
|
||||
helper="Send an email when a container status changes. It will send and email for Stopped and Restarted events of a container."
|
||||
id="statusChangeEmailNotifications" label="Container Status Changes" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
|
||||
<h3 class="font-medium mb-3">Backups</h3>
|
||||
<div class="flex flex-col gap-1.5 pl-1">
|
||||
<x-forms.checkbox instantSave="saveModel" id="backupSuccessEmailNotifications" label="Backup Success" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="backupSuccessEmailNotifications"
|
||||
label="Backup Success" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="backupFailureEmailNotifications"
|
||||
label="Backup Failure" />
|
||||
</div>
|
||||
|
@@ -39,7 +39,9 @@
|
||||
label="Deployment Success" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="deploymentFailureSlackNotifications"
|
||||
label="Deployment Failure" />
|
||||
{{-- <x-forms.checkbox instantSave="saveModel" helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container." id="statusChangeSlackNotifications" label="Container Status Changes" /> --}}
|
||||
<x-forms.checkbox instantSave="saveModel"
|
||||
helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container."
|
||||
id="statusChangeSlackNotifications" label="Container Status Changes" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
|
||||
|
@@ -55,11 +55,15 @@
|
||||
<x-forms.input type="password" placeholder="Custom Telegram Topic ID"
|
||||
id="telegramNotificationsDeploymentFailureTopicId" />
|
||||
</div>
|
||||
{{-- <h4 class="font-medium mt-3">Container Status Changes</h4>
|
||||
<div class="pl-1">
|
||||
<x-forms.checkbox instantSave="saveModel" id="statusChangeTelegramNotifications" label="Enabled" helper="Send a notification when a container status changes. It will send a notification for Stopped and Restarted events of a container." />
|
||||
<x-forms.input helper="Topic ID for container status notifications" id="telegramNotificationsStatusChangeTopicId" label="Container Status Topic ID" />
|
||||
</div> --}}
|
||||
<div class="pl-1 flex gap-2">
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox instantSave="saveModel" id="statusChangeTelegramNotifications"
|
||||
label="Container Status Changes"
|
||||
helper="Send a notification when a container status changes. It will send a notification for Stopped and Restarted events of a container." />
|
||||
</div>
|
||||
<x-forms.input type="password" id="telegramNotificationsStatusChangeTopicId"
|
||||
placeholder="Custom Telegram Topic ID" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
|
||||
|
Reference in New Issue
Block a user