2018-06-04 14:07:58 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/notifications_mailer
|
|
|
|
class NotificationsMailerPreview < ActionMailer::Preview
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/domain_expires_soon
|
|
|
|
def domain_expires_soon
|
2018-07-02 18:40:09 +02:00
|
|
|
check = Check.domain.first
|
|
|
|
NotificationsMailer.with(notification: check.notifications.first).domain_expires_soon
|
2018-06-04 14:07:58 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/domain_recurrent_failures
|
|
|
|
def domain_recurrent_failures
|
2018-07-02 18:40:09 +02:00
|
|
|
check = Check.domain.where("last_run_at != last_success_at").first
|
2018-06-04 14:07:58 +02:00
|
|
|
NotificationsMailer.with(notification: check.notifications.first).domain_recurrent_failures
|
|
|
|
end
|
2018-07-02 18:40:09 +02:00
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/ssl_expires_soon
|
|
|
|
def ssl_expires_soon
|
|
|
|
check = Check.ssl.first
|
|
|
|
NotificationsMailer.with(notification: check.notifications.first).ssl_expires_soon
|
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/ssl_recurrent_failures
|
|
|
|
def ssl_recurrent_failures
|
|
|
|
check = Check.ssl.where("last_run_at != last_success_at").first
|
|
|
|
NotificationsMailer.with(notification: check.notifications.first).ssl_recurrent_failures
|
|
|
|
end
|
2018-06-04 14:07:58 +02:00
|
|
|
end
|