Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: New Notification Settings #4525

Conversation

peaklabs-dev
Copy link
Member

@peaklabs-dev peaklabs-dev commented Dec 9, 2024

Needs Attention

  1. Docker CleanupJob email notifications, both success and failure emails are somehow not working (not sure why as for me these look the same like all other emails).

Error:

EmailChannel error: htmlspecialchars(): Argument #1 ($string) must be of type string, Illuminate\Mail\Message given (View: /var/www/html/resources/views/emails/docker-cleanup-success.blade.php). Failed to send email to:test@example.com, test2@example.com with subject: Coolify: Docker cleanup job succeeded on localhost

@andrasbacsai: Fixed!

  1. Test notifications when sent are sent to all notification channels enabled? should we leave it like this or how should we implement it so that it only sends to one notification channel (the one tested)?

@andrasbacsai: Fixed!

Changes

  • feat: New Notification Settings UI, much more customisable notification settings for each notification option
  • feat: More control over what notifications to receive:
    • Failed and successful deployment notifications
    • Failed and successful backup notifications
    • Failed and successful scheduled task notifications
    • Failed and successful docker cleanup notifications
    • Server High Disk usage notifications
    • Server Reachable and Unreachable notifications
  • feat: 4 new models for all Notification settings
  • feat: 4 new database tables for all notification and event settings -> Email, Telegram, Discord, Slack
  • feat: 3 Fully backward-compatible database migrations that automatically migrate all old notification settings to the new database tables and encrypt/ decrypt data accordingly
  • feat: teams table, where all notification settings were previously stored, is cleaned up and now a normal size (8 columns).
  • feat: new notification trait -> greatly reduces code duplication and makes test in the future much more maintainable
  • feat: new scheduled task successful notifications
  • feat: optional events (via UI checkbox settings) and special always enabled events that the user always receive notifications for
  • fix: encrypt all sensitiv data in the new database tables (like URLs and tokens)
  • fix: encrypt more email columns in instance settings table
  • fix: Instance settings and Email Notification Settings Resend and SMTP Save buttons (each has one) should only save their respective settings, not all settings, otherwise validation will not work correctly.
  • fix: Ability to send test email for instance settings
  • fix: Success messages are enabled again
  • fix: Other email settings should be set to false if one is enabled
  • chore: new function names, new event names, and renamed a bunch of things to make them easier to maintain and clearer about what they do.
  • chore: shared.php line size reduced and functions moved to a trait and a new shared file so we can test it better and shared.php becomes more manageable
  • chore: A lot of code has been refactored to make it more maintainable, readable and organised, with better function naming for much better testing in the future.
  • chore: remove all unused waitlist code
  • chore: removed unused seeder
  • chore: remove more unused resale license code

Issues

Images

Email

image

- Add migrations that move email, discord and telegram notifications to the new settings tables for each notification
- drop now unused columns form the teams table
- Use new notification relationships
- Use trait
- Make sure that when a new team is created, notification settings are also created
- reorder team model for better readability
- add reachable and unreachable notifications
- add docker cleanup notifications
- better defaults
@peaklabs-dev peaklabs-dev added the 🏔️ Peaklabs A label for PRs from Peaklabs. label Dec 10, 2024
@peaklabs-dev peaklabs-dev marked this pull request as ready for review December 10, 2024 15:50
@andrasbacsai
Copy link
Member

Thank you for the PR!

@andrasbacsai andrasbacsai merged commit 53dfe80 into coollabsio:next Dec 11, 2024
1 check passed
@github-actions github-actions bot removed the 🏔️ Peaklabs A label for PRs from Peaklabs. label Dec 11, 2024
@peaklabs-dev peaklabs-dev deleted the separate-success-and-failure-notifications branch December 11, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants