Commit Graph

123 Commits

Author SHA1 Message Date
Girish Ramakrishnan 8205beeabf notifications: make update alerts non-persistent
once acked, they remain acked. no need to keep nagging the user about them.
2023-03-26 15:12:39 +02:00
Girish Ramakrishnan 9182b01fe0 rework notifications.add 2023-03-26 14:43:10 +02:00
Girish Ramakrishnan 61ba3cbfc2 notifications: clearAlert 2023-03-26 14:18:37 +02:00
Johannes Zellner fc8572c2af Raise alert for when an app cannot be autoupdated 2022-08-10 12:19:54 +02:00
Girish Ramakrishnan 1549f6a4d0 fix various terminology in code
subdomain, domain - strings
location - { subdomain, domain }
bundle - { cert, key }
bundlePath - { certFilePath, keyFilePath }

vhost is really just for virtual hosting
fqdn for others
2022-07-13 10:15:09 +05:30
Girish Ramakrishnan d47b39d90b eventlog: distinguish install vs update finish 2022-04-01 14:19:53 -07:00
Girish Ramakrishnan 5ab2d9da8a notifications: remove dead code 2021-11-17 10:26:47 -08:00
Girish Ramakrishnan 445c83c8b9 make auditsource a class
this allows us to use AuditSource for the class and auditSource for
the instances!
2021-09-30 10:13:36 -07:00
Girish Ramakrishnan 50c68cd499 notifications: better oom message for redis
fixes #795
2021-09-19 17:34:41 -07:00
Girish Ramakrishnan dd16866e5a eventlog: getAll -> list 2021-08-20 11:27:35 -07:00
Girish Ramakrishnan 4cd5137292 mailer: fix error handling
previous mailer code has no callback and thus no way to pass back errors.
now with asyncification it passes back the error
2021-08-19 12:40:53 -07:00
Johannes Zellner a6e79c243e Show correct/new app version info in updated finished notification 2021-07-31 14:17:51 +02:00
Girish Ramakrishnan a1c61facdc merge userdb.js into users.js 2021-07-16 22:33:22 -07:00
Girish Ramakrishnan db685d3a56 notification: app updated message shown despite failure 2021-07-13 14:27:53 -07:00
Johannes Zellner cdad2a80d4 Remove unused require 2021-06-30 17:19:30 +02:00
Girish Ramakrishnan 9c0f983ce1 backups: fix failure notitification 2021-06-24 01:44:46 -07:00
Girish Ramakrishnan b24cf78bc0 certs: fix renewal notification 2021-06-24 01:12:33 -07:00
Girish Ramakrishnan 2b13593630 notifications: only send backup failure email on 3 consecutive fails 2021-06-24 00:48:59 -07:00
Girish Ramakrishnan 6da7218d34 certs: show daysLeft in the logs 2021-06-24 00:48:59 -07:00
Girish Ramakrishnan 54dec7ae08 notifications: delete obsolete alerts 2021-06-23 22:51:38 -07:00
Girish Ramakrishnan e9ace613e2 cert: only inform user if renewal fails and only 10 days left 2021-06-01 09:09:16 -07:00
Girish Ramakrishnan 73917e95c9 rework notifications
notifications are now system level instead of user level.

To clarify the use events/notifications/email:
* eventlog - everything that is happenning on server
* notifications - specific important events (alerts)
* email - these are really urgent things that require immediate attention. this is for
  the case where an admin does not visit the dashboard often. can also be alerts like
  bad backup config or reboot required which are not events per-se.

Notes on notifications
* oom - notification only
* appUpdated - notification only
* cert renewal failure - only raise when < 10 days to go. also send email thereafter (todo).
* Backup failure - only if last 5 backups failed (todo).
* Box update - notification only. we anyway send newsletter.
* box update available - we raise a notification. no email.
* app update available - we already have update indicator on dashboard. so, no notification or email.

Alerts:
* backup config
* disk space
* mail status
* reboot
* box updated
* ubuntu update required
2021-05-28 15:29:53 -07:00
Girish Ramakrishnan 91df8df92d add alert for ubuntu 16 2021-05-18 14:48:01 -07:00
Girish Ramakrishnan 44ac406e57 admin -> dashboard 2021-05-05 12:29:04 -07:00
Girish Ramakrishnan d437acebe2 notifications: can also mark it as unread 2021-04-21 12:20:58 -07:00
Girish Ramakrishnan bb3f9744fb notifications: fix pagination of listByUserIdPaged
we have to filter in sql query, otherwise we don't get consistent per page count
2021-04-21 10:55:31 -07:00
Girish Ramakrishnan fbceb67df9 notifications: remove app up/down 2021-04-21 10:55:31 -07:00
Girish Ramakrishnan 142af8e700 Fix notifications schema 2021-04-19 21:00:31 -07:00
Girish Ramakrishnan 0c8e0c4715 notifications: send backup fail only to owner
only superadmin has access to server and can adjust backup config
2021-04-19 20:57:10 -07:00
Girish Ramakrishnan 613da5fff9 notifications: remove user add/edit/update notifications
these just clutter the real notifications. these are in the eventlog
anyways.
2021-04-19 20:44:35 -07:00
Girish Ramakrishnan 355de5b0a4 notifications: fix update notification
the notification wasn't working because this was in apptask and the apptask died
before it could send out the email. we now move the notification to box process
and also remove the email notification.
2021-04-19 15:14:04 -07:00
Girish Ramakrishnan ef476f74bf notifications: no email for app up/down/oom events
emails will not be used for self monitoring events. these are best done
from the outside. we just log everything in eventlog and raise notifications
as well.
2021-04-15 15:29:25 -07:00
Girish Ramakrishnan 60bdc34ad0 typo 2021-03-18 12:59:51 -07:00
Girish Ramakrishnan 353369c1e9 mailer: make oom mail contain link to dashboard instead of docs 2021-01-02 12:26:34 -08:00
Girish Ramakrishnan 28dee54a39 updates: only send email notifications when not auto-updating
fixes #749
2020-12-29 17:47:51 -08:00
Girish Ramakrishnan e905c1edbe make function a bit more readable 2020-12-21 18:07:39 -08:00
Girish Ramakrishnan 9683bb6408 remove email notification for user add/remove
it's just very noisy. we anyway raise notifications
2020-12-21 08:45:18 -08:00
Girish Ramakrishnan f5ed17e3d8 add ack flag to the debug 2020-12-14 16:07:09 -08:00
Girish Ramakrishnan 933918ea27 Fix docs url 2020-09-15 14:46:22 -07:00
Girish Ramakrishnan 639bddb4b7 Do not use app.manifest.title since it may not be set for custom apps 2020-09-03 13:49:38 -07:00
Girish Ramakrishnan 738b4e60fa notification: we do not retry update/backup every 4 hours anymore 2020-08-15 10:07:05 -07:00
Girish Ramakrishnan 1b307632ab Use debug instead of console.* everywhere
No need to patch up console.* anymore

also removes supererror
2020-08-02 12:04:55 -07:00
Girish Ramakrishnan dbba502f83 remove message from debug 2020-06-04 09:17:58 -07:00
Girish Ramakrishnan 122ec75cb6 Fix links 2020-05-29 19:10:42 -07:00
Girish Ramakrishnan b32128bebf Fix quoting in emails 2020-03-07 19:12:39 -08:00
Girish Ramakrishnan 0e156b9376 migrate permissions and admin flag to user.role 2020-02-21 16:49:20 -08:00
Girish Ramakrishnan 3153fb5cbe custom: remove alerts section 2020-02-04 13:09:00 -08:00
Girish Ramakrishnan 02339d503c do not re-generate DATABASE_ERROR 2019-10-24 20:31:45 -07:00
Girish Ramakrishnan a017af41c5 Start moving db code to use BoxError as well 2019-10-24 14:09:53 -07:00
Girish Ramakrishnan 88818a1ec2 Move NotificationsError to BoxError 2019-10-22 13:00:10 -07:00