mirror of
https://github.com/coollabsio/coolify.git
synced 2025-12-28 13:41:51 +00:00
- Add automated Traefik version checking job running weekly on Sundays - Implement version detection from running containers and comparison with versions.json - Add notifications across all channels (Email, Discord, Slack, Telegram, Pushover, Webhook) for outdated versions - Create dismissible callout component with localStorage persistence - Display cross-branch upgrade warnings (e.g., v3.5 -> v3.6) with changelog links - Show patch update notifications within same branch - Add warning icon that appears when callouts are dismissed - Prevent duplicate notifications during proxy restart by adding restarting parameter - Fix notification spam with transition-based logic for status changes - Enable system email settings by default in development mode - Track last saved/applied proxy settings to detect configuration drift
94 lines
3.9 KiB
PHP
94 lines
3.9 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class TelegramNotificationSettings extends Model
|
|
{
|
|
use Notifiable;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'team_id',
|
|
|
|
'telegram_enabled',
|
|
'telegram_token',
|
|
'telegram_chat_id',
|
|
|
|
'deployment_success_telegram_notifications',
|
|
'deployment_failure_telegram_notifications',
|
|
'status_change_telegram_notifications',
|
|
'backup_success_telegram_notifications',
|
|
'backup_failure_telegram_notifications',
|
|
'scheduled_task_success_telegram_notifications',
|
|
'scheduled_task_failure_telegram_notifications',
|
|
'docker_cleanup_telegram_notifications',
|
|
'server_disk_usage_telegram_notifications',
|
|
'server_reachable_telegram_notifications',
|
|
'server_unreachable_telegram_notifications',
|
|
'server_patch_telegram_notifications',
|
|
'traefik_outdated_telegram_notifications',
|
|
|
|
'telegram_notifications_deployment_success_thread_id',
|
|
'telegram_notifications_deployment_failure_thread_id',
|
|
'telegram_notifications_status_change_thread_id',
|
|
'telegram_notifications_backup_success_thread_id',
|
|
'telegram_notifications_backup_failure_thread_id',
|
|
'telegram_notifications_scheduled_task_success_thread_id',
|
|
'telegram_notifications_scheduled_task_failure_thread_id',
|
|
'telegram_notifications_docker_cleanup_thread_id',
|
|
'telegram_notifications_server_disk_usage_thread_id',
|
|
'telegram_notifications_server_reachable_thread_id',
|
|
'telegram_notifications_server_unreachable_thread_id',
|
|
'telegram_notifications_server_patch_thread_id',
|
|
'telegram_notifications_traefik_outdated_thread_id',
|
|
];
|
|
|
|
protected $casts = [
|
|
'telegram_enabled' => 'boolean',
|
|
'telegram_token' => 'encrypted',
|
|
'telegram_chat_id' => 'encrypted',
|
|
|
|
'deployment_success_telegram_notifications' => 'boolean',
|
|
'deployment_failure_telegram_notifications' => 'boolean',
|
|
'status_change_telegram_notifications' => 'boolean',
|
|
'backup_success_telegram_notifications' => 'boolean',
|
|
'backup_failure_telegram_notifications' => 'boolean',
|
|
'scheduled_task_success_telegram_notifications' => 'boolean',
|
|
'scheduled_task_failure_telegram_notifications' => 'boolean',
|
|
'docker_cleanup_telegram_notifications' => 'boolean',
|
|
'server_disk_usage_telegram_notifications' => 'boolean',
|
|
'server_reachable_telegram_notifications' => 'boolean',
|
|
'server_unreachable_telegram_notifications' => 'boolean',
|
|
'server_patch_telegram_notifications' => 'boolean',
|
|
'traefik_outdated_telegram_notifications' => 'boolean',
|
|
|
|
'telegram_notifications_deployment_success_thread_id' => 'encrypted',
|
|
'telegram_notifications_deployment_failure_thread_id' => 'encrypted',
|
|
'telegram_notifications_status_change_thread_id' => 'encrypted',
|
|
'telegram_notifications_backup_success_thread_id' => 'encrypted',
|
|
'telegram_notifications_backup_failure_thread_id' => 'encrypted',
|
|
'telegram_notifications_scheduled_task_success_thread_id' => 'encrypted',
|
|
'telegram_notifications_scheduled_task_failure_thread_id' => 'encrypted',
|
|
'telegram_notifications_docker_cleanup_thread_id' => 'encrypted',
|
|
'telegram_notifications_server_disk_usage_thread_id' => 'encrypted',
|
|
'telegram_notifications_server_reachable_thread_id' => 'encrypted',
|
|
'telegram_notifications_server_unreachable_thread_id' => 'encrypted',
|
|
'telegram_notifications_server_patch_thread_id' => 'encrypted',
|
|
'telegram_notifications_traefik_outdated_thread_id' => 'encrypted',
|
|
];
|
|
|
|
public function team()
|
|
{
|
|
return $this->belongsTo(Team::class);
|
|
}
|
|
|
|
public function isEnabled()
|
|
{
|
|
return $this->telegram_enabled;
|
|
}
|
|
}
|