Commit Graph

56 Commits

Author SHA1 Message Date
thnilsen
ea582aeed6 Fix bug notifications not being sent.
The code to handle sending of notification was missing. This change
makes two different options available on how notifications will be
handled which will be controlled by CRON_SERVER_IP config option.

 - If CRON_SERVER_IP is set, the server with the given IP should
   call URL ../admin/?task=cron every x minutes. If the config
   is left empty, the notification will be called once the
   incident has  been saved. (The latter meothod might cause
   server timeout if there are large numbers of subscribers!)

Other minor changes:

 - Removed old commented code

 - Removed call to syslog used for debugging
2020-08-15 21:09:57 +02:00
thnilsen
4a4a3f7bdd Merged Upstream master 2020-06-16 20:20:51 +02:00
thnilsen
e3d8e3ecf8 Added queue to handle sending of subscribers notifications 2020-06-16 20:11:25 +02:00
Vojtěch Sajdl
570895c7bd
Fix #102 - strip tags when saving incident 2020-06-03 09:13:54 +02:00
thnilsen
02cd19a439 Fixes issue #64 2020-05-23 17:03:08 +02:00
thnilsen
62e6f08e4f Code cleanup as suggested by the codacy service.
- Renamed get_service_details to populate_impacted_services
- Removed unused variables
2018-12-07 22:46:16 +01:00
Thomas Nilsen
c08264f4f7 Minor code cleanup suggested by codacy service 2018-11-25 21:33:18 +01:00
Thomas Nilsen
e98b4da649 Use new notification class 2018-11-25 18:45:54 +01:00
Thomas Nilsen
528cb77952 Reverses partial changes commited in PR #63
- Removes not needed re-translation of statuses. These fails to be
  translated due to index.php calling config.php after performing
  the translation. See #64 for details

- Amend SQL query to use named fields to prevent potential failure
  in future upgrades if table should change.
2018-11-25 18:26:30 +01:00
Thomas Nilsen
b5c5a2c8cf Moved, renamed and modified Telegram related files.
- Made functions from ./telegram.php into a class and moved to
  classes/telegram.php

- Renamed check.php to telegram_check.php to make it easier to
  understand what the file belongs to.

- SESSIONS used to control if user is logged on or not

- Telegram users will be identified as typeID = 2 in the
  subscribers table.
2018-11-25 17:25:44 +01:00
Thomas Nilsen
82e3dcb11e Add new classes
This implements the following new classes

- mailer.php Class to handle smtp/mail related tasks. This implements
  support for PHPMailer()

- notification.php Class to handle notification to subscribers.

- subscriber.php Class to handle the self-managment of subscribers.

- subscriptions.php Class to handle subscription to services for
  subscribers.
2018-11-25 17:18:09 +01:00
Thomas Nilsen
3fec45442e Added warning/success alert render function 2018-11-24 21:13:57 +01:00
jhuesser
b005e77664 use unused value 2018-11-23 22:10:49 +01:00
jhuesser
d0d0572b82 removed unused lastname 2018-11-23 22:10:49 +01:00
jhuesser
efe4c3d42f mange subscriptions 2018-11-23 22:10:49 +01:00
jhuesser
8c305d8a93 bug fixes and debuging stuff removed 2018-11-23 22:10:49 +01:00
jhuesser
d02ebc25ab send new incident to subscriber 2018-11-23 22:10:49 +01:00
Vojtěch Sajdl
554edc403a
Merge pull request #70 from thnilsen/add_services_to_panel
Add services to panel
2018-11-21 13:42:30 +01:00
Thomas Nilsen
d0824170ac Fix admin url (#68)
* Add prerequisite checks to install script. - Pryx/server-status#31

* Add option to use existing URL for privacy policy. Pryx/server-status#41

- Also moved the gitbug icon to the left of the footer as it looked like it was part of the imprint/policy link.
- Fixed Imprint & Privacy policy text so that it will be translated.

* Admin page is redirected to wrong URL on save. Fix Pryx/server-status#67
2018-11-21 11:42:04 +01:00
Thomas Nilsen
42815bacd6 Remove duplicate column name in SQL query 2018-11-21 11:24:39 +01:00
Thomas Nilsen
e41b45e067 Replaced "Posted by" with "Impacted services". Addresses suggestion in Pryx/server-status#69
* Extended Incident class with service_id and services_names.
2018-11-21 10:50:21 +01:00
Thomas Nilsen
c75f83c2ef Add impacted services to each incident view 2018-11-19 09:19:23 +01:00
thnilsen
d41cf42ab7 Adding norwegian language (#63)
* Added Norwegian language translation (nb_NO/Norsk Bokmål)

* Fixes display of translated overall status to selected language. Only english was shown prior, no matter the selected language.

* Fixes missed translation of norwegian (nb_NO)
2018-11-05 23:57:54 +01:00
Vojtěch Sajdl
93565fc014
Fix #54 - fixed time checking 2018-08-23 20:40:27 +02:00
Jan Jon
9e472db6f9 Fix#10 (#28)
Fix#10 - Add name, surname and username editing
2018-07-22 21:03:07 +02:00
Vojtěch Sajdl
77337a1078
Fix #43 - fixed sql 2018-07-10 14:34:22 +02:00
Vojtěch Sajdl
c115899350
Fix for serbian not displaying locale name 2018-05-09 13:54:42 +02:00
Vojtěch Sajdl
b2e6954ac9
Fix #33 - finishing touches 2018-04-20 17:39:34 +02:00
Vojtěch Sajdl
55f669b5d8
Naming change, more dead code & vars removed 2018-04-20 16:49:49 +02:00
Vojtěch Sajdl
f121211a14
Re #33 - remove bunch of dead code & fix some bugs 2018-04-20 16:40:12 +02:00
Vojtěch Sajdl
4b7d8be838
Fix #25 - refactored incident getting 2018-04-14 12:39:00 +02:00
Vojtěch Sajdl
e0a455e0ea
Fix #19 2018-04-13 23:41:05 +02:00
Vojtěch Sajdl
14407ef0a3
Fix remember me 2018-04-13 22:58:06 +02:00
Vojtěch Sajdl
f9c247854f
Fix #11 - add second part of api 2018-04-13 22:38:10 +02:00
Vojtěch Sajdl
3980f5daa6
Make locale negotiator respect HTTP Accept-Language format 2018-04-13 22:00:23 +02:00
Vojtěch Sajdl
9f7e15fcd1
Re #11 - start working on an api
Also some locale negotiator bugfixes & it is now possible to serialize Service and Incident classess to JSON
2018-04-13 21:31:07 +02:00
Vojtěch Sajdl
5afda409c1
Fix #22 - disable user button added 2018-03-10 00:07:56 +01:00
Vojtěch Sajdl
7d4bb9af2e
Fixup global replace mess 2018-01-18 22:59:44 +01:00
Vojtěch Sajdl
696b205b68
Fix #14 - show installation dialog on 404 page if config not found 2018-01-18 22:57:19 +01:00
Vojtěch Sajdl
ffd2b58f0c
Fix #6 - compatibility issues 2018-01-13 16:51:36 +01:00
Vojtěch Sajdl
7b1b68c0ef
Translations updated 2018-01-13 03:00:13 +01:00
Vojtěch Sajdl
eeb719d235
Small fixes 2018-01-13 01:03:05 +01:00
Vojtěch Sajdl
54d499eb42
Fixed some todos & added email validation 2018-01-13 00:21:11 +01:00
Vojtěch Sajdl
f310aac8b5
Minor fixes 2018-01-12 22:38:19 +01:00
Vojtěch Sajdl
c25e8bcae8
Instalator fixes and lots and lots of other bugfixes 2018-01-12 21:35:31 +01:00
Vojtěch Sajdl
5dd9a2a1bd
Add template doc, fixup rendering locale select 2018-01-07 20:51:16 +01:00
Vojtěch Sajdl
61f563c9b0
Objectify locale negotiator and template files, add documentation 2018-01-07 20:39:10 +01:00
Vojtěch Sajdl
9820686776
Bugfixes 2018-01-03 14:15:45 +01:00
Vojtěch Sajdl
333d6b40b8
Language switching, flags and some small tweaks 2018-01-02 19:37:19 +01:00
Vojtěch Sajdl
3202189967
Start working on translation system, czech translation added 2017-12-31 02:26:08 +01:00