diff --git a/dashboard/internet_nl_dashboard/fixtures/dashboard_production.json b/dashboard/internet_nl_dashboard/fixtures/dashboard_production.json deleted file mode 100644 index 3722d0be..00000000 --- a/dashboard/internet_nl_dashboard/fixtures/dashboard_production.json +++ /dev/null @@ -1,523 +0,0 @@ -[ - { - "model": "django_celery_beat.crontabschedule", - "pk": 3, - "fields": { - "minute": "0", - "hour": "4", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 4, - "fields": { - "minute": "0", - "hour": "0", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 5, - "fields": { - "minute": "0", - "hour": "2", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 6, - "fields": { - "minute": "0", - "hour": "3", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 7, - "fields": { - "minute": "0", - "hour": "0", - "day_of_week": "*/5", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 8, - "fields": { - "minute": "0", - "hour": "5", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 9, - "fields": { - "minute": "*/5", - "hour": "*", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 10, - "fields": { - "minute": "0", - "hour": "0", - "day_of_week": "*/7", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 11, - "fields": { - "minute": "0", - "hour": "0", - "day_of_week": "*/3", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 12, - "fields": { - "minute": "0", - "hour": "20", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 13, - "fields": { - "minute": "0", - "hour": "21", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 14, - "fields": { - "minute": "0", - "hour": "23", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 15, - "fields": { - "minute": "0", - "hour": "22", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 16, - "fields": { - "minute": "0", - "hour": "19", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 17, - "fields": { - "minute": "0", - "hour": "1", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 18, - "fields": { - "minute": "0", - "hour": "6", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 19, - "fields": { - "minute": "0", - "hour": "7", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 20, - "fields": { - "minute": "0", - "hour": "8", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 21, - "fields": { - "minute": "0", - "hour": "9", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 22, - "fields": { - "minute": "0", - "hour": "10", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 23, - "fields": { - "minute": "0", - "hour": "11", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 24, - "fields": { - "minute": "0", - "hour": "12", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 25, - "fields": { - "minute": "0", - "hour": "13", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 26, - "fields": { - "minute": "0", - "hour": "14", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 27, - "fields": { - "minute": "0", - "hour": "15", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 28, - "fields": { - "minute": "0", - "hour": "16", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 29, - "fields": { - "minute": "0", - "hour": "17", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 30, - "fields": { - "minute": "0", - "hour": "18", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 31, - "fields": { - "minute": "*/1", - "hour": "*", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 32, - "fields": { - "minute": "*/10", - "hour": "*", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 33, - "fields": { - "minute": "*/30", - "hour": "*", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 34, - "fields": { - "minute": "*/15", - "hour": "*", - "day_of_week": "*", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.crontabschedule", - "pk": 35, - "fields": { - "minute": "0", - "hour": "0", - "day_of_week": "*/2", - "day_of_month": "*", - "month_of_year": "*", - "timezone": "UTC" - } - }, - { - "model": "django_celery_beat.periodictask", - "pk": 101, - "fields": { - "name": "🔁 Check running dashboard scans", - "task": "websecmap.app.models.create_function_job", - "interval": null, - "crontab": 33, - "solar": null, - "args": "[\"dashboard.internet_nl_dashboard.scanners.scan_internet_nl_per_account.check_running_dashboard_scans\"]", - "kwargs": "{}", - "queue": "storage", - "exchange": null, - "routing_key": null, - "priority": null, - "expires": null, - "one_off": false, - "start_time": null, - "enabled": false, - "last_run_at": "2019-01-24T05:00:00Z", - "total_run_count": 0, - "date_changed": "2019-01-24T05:02:10Z", - "description": "" - } - }, - { - "model": "django_celery_beat.periodictask", - "pk": 102, - "fields": { - "name": "🔁 Run Scheduled Scans", - "task": "websecmap.app.models.create_function_job", - "interval": null, - "crontab": 33, - "solar": null, - "args": "[\"dashboard.internet_nl_dashboard.tasks.start_scans_for_lists_who_are_up_for_scanning\"]", - "kwargs": "{}", - "queue": "storage", - "exchange": null, - "routing_key": null, - "priority": null, - "expires": null, - "one_off": false, - "start_time": null, - "enabled": false, - "last_run_at": "2019-01-24T05:00:00Z", - "total_run_count": 0, - "date_changed": "2019-01-24T05:02:10Z", - "description": "" - } - }, - { - "model": "django_celery_beat.periodictask", - "pk": 103, - "fields": { - "name": "Send queued e-mail", - "task": "dashboard.internet_nl_dashboard.logic.mail.send_queued_mail", - "interval": null, - "crontab": 33, - "solar": null, - "args": "[]", - "kwargs": "{}", - "queue": "storage", - "exchange": null, - "routing_key": null, - "priority": null, - "expires": null, - "one_off": false, - "start_time": null, - "enabled": false, - "last_run_at": "2019-01-24T05:00:00Z", - "total_run_count": 0, - "date_changed": "2019-01-24T05:02:10Z", - "description": "" - } - }, - { - "model": "django_celery_beat.periodictask", - "pk": 106, - "fields": { - "name": "🔁 Progress subdomain discovery", - "task": "websecmap.app.models.create_function_job", - "interval": null, - "crontab": 33, - "solar": null, - "args": "[\"dashboard.internet_nl_dashboard.scanners.subdomains.progress_subdomain_discovery_scans\"]", - "kwargs": "{}", - "queue": "storage", - "exchange": null, - "routing_key": null, - "priority": null, - "expires": null, - "one_off": false, - "start_time": null, - "enabled": false, - "last_run_at": "2019-01-24T05:00:00Z", - "total_run_count": 0, - "date_changed": "2019-01-24T05:02:10Z", - "description": "" - } - }, - { - "model": "django_celery_beat.periodictask", - "pk": 107, - "fields": { - "name": "🔁 autoshare_report_to_front_page", - "task": "dashboard.internet_nl_dashboard.tasks.autoshare_report_to_front_page", - "interval": null, - "crontab": 33, - "solar": null, - "args": "[]", - "kwargs": "{}", - "queue": "storage", - "exchange": null, - "routing_key": null, - "priority": null, - "expires": null, - "one_off": false, - "start_time": null, - "enabled": true, - "last_run_at": "2019-01-24T05:00:00Z", - "total_run_count": 0, - "date_changed": "2019-01-24T05:02:10Z", - "description": "" - } - } -] \ No newline at end of file diff --git a/dashboard/internet_nl_dashboard/fixtures/dashboard_production_example_email_templates.json b/dashboard/internet_nl_dashboard/fixtures/dashboard_production_example_email_templates.json new file mode 100644 index 00000000..13e6cd4f --- /dev/null +++ b/dashboard/internet_nl_dashboard/fixtures/dashboard_production_example_email_templates.json @@ -0,0 +1,52 @@ +[ + { + "model": "django_mail_admin.emailtemplate", + "pk": 1, + "fields": { + "name": "scan_finished_en", + "description": "Used when a the scan on a list is finished and a report is being sent. You can translate this template to other languages by creating a new template with _nl or another language code instead of _en for english.", + "subject": "Report ready for {{list_name}}, {{scan_type}}, scoring {{report_average_internet_nl_score}}%, ⬆️ {{improvement}}, ⬇️ {{regression}}, ⏺️ {{neutral}}", + "email_html_text": "Hi {{recipient}},
\r\n
\r\nThe {{scan_type}} scan on '{{list_name}}' has finished and your report is ready. The average internet.nl score in this report is {{report_average_internet_nl_score}}%.
\r\n
\r\nView the report at this link:
\r\n\r\n {{dashboard_address}}/#/report/{{report_id}}/
\r\n\r\n\r\n{% if previous_report_available == \"False\" %}\r\n
\r\nThis is the first report for '{{list_name}}'. The next time this list is scanned, a comparison report will be included in this mail.\r\n{% endif %}\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"True\" %}\r\n
\r\nA previous report, #{{compared_report_id}}, is available but contains no changes compared to this report. Therefore no change summary was included.\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"False\" %}\r\n
\r\n

Changes compared to previous report

\r\nBelow a summary is given compared to the previous report, #{{compared_report_id}}. The previous report was made {{days_between_current_and_previous_report}} days ago and had an average score of {{previous_report_average_internet_nl_score}}%.
\r\n
\r\nYou can view the comparison in detail on the dashboard at {{dashboard_address}}/#/report/{{report_id}}/{{compared_report_id}}
\r\n
\r\n

Summary of changes

\r\n

This summary is in absolute numbers.

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{improvement}}{{regression}}{{neutral}}
ImprovementsRegressionsNeutral
\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_report_contains_improvement != \"True\" and comparison_report_contains_regression != \"True\" %}\r\n
\r\nOnly neutral changes have been observed, therefore no detailed overview of changes is included in this e-mail.
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_improvement == \"True\" or comparison_report_contains_regression == \"True\" %}\r\n{% if comparison_report_contains_improvement == \"True\" %}\r\n
\r\n

Overview of improvements:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_improvement|safe}}\r\n
DomainScoreImprovement(s)Metrics improved
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_regression == \"True\" %}\r\n
\r\n

Overview of regressions:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_regression|safe}}\r\n
DomainScoreRegeression(s)Metrics regressed
\r\n{% endif %}\r\n\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_current_report != \"\" %}\r\n
\r\nThis report includes new domains, which are not included because they could not be compared: {{ domains_exclusive_in_current_report}}.\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_other_report != \"\" %}\r\n
\r\nThe following domains have disappeared in the new report, and are thus not included above: {{ domains_exclusive_in_other_report}}.\r\n{% endif %}\r\n\r\n
\r\nRegards,
\r\nThe internet.nl dashboard
\r\n
\r\n[\r\nunsubscribe \r\n- \r\npreferences \r\n ]\r\n\r\n" + } + }, + { + "model": "django_mail_admin.emailtemplate", + "pk": 2, + "fields": { + "name": "detailed_comparison_improvement_en", + "description": "", + "subject": "Part of comparison mail", + "email_html_text": "{% for record in data %}\r\n\r\n {{ record.url }}\r\n \r\n \r\n {{ record.new.score }}%\r\n \r\n \r\n \r\n {{ record.changes.improvement }}\r\n \r\n \r\n \r\n \r\n\r\n{% endfor %}" + } + }, + { + "model": "django_mail_admin.emailtemplate", + "pk": 3, + "fields": { + "name": "detailed_comparison_regression_en", + "description": "", + "subject": "Part of comparison mail", + "email_html_text": "{% for record in data %}\r\n\r\n \r\n {{ record.url }}\r\n \r\n \r\n \r\n {{ record.new.score }}%\r\n \r\n \r\n \r\n {{ record.changes.regression }}\r\n \r\n \r\n \r\n \r\n\r\n{% endfor %}" + } + }, + { + "model": "django_mail_admin.emailtemplate", + "pk": 4, + "fields": { + "name": "scan_finished_nl", + "description": "Zie EN", + "subject": "Nieuw rapport voor {{list_name}} {{scan_type}} staat klaar, gemiddelde score: {{report_average_internet_nl_score}}% ⬆️ {{improvement}}, ⬇️ {{regression}}, ⏺️ {{neutral}}", + "email_html_text": "Beste {{recipient}},
\r\n
\r\nDe {{scan_type}} scan van lijst '{{list_name}}' is klaar en het rapport staat online. De gemiddelde score is {{report_average_internet_nl_score}}%.
\r\n
\r\nBekijk het rapport op de volgende pagina:
\r\n\r\n {{dashboard_address}}/#/report/{{report_id}}/
\r\n\r\n\r\n{% if previous_report_available == \"False\" %}\r\n
\r\nDit is het eerste rapport voor '{{list_name}}'. De volgende keer zal na het scannen van deze lijst ook een wijzigingsrapportage worden meegestuurd in deze mail.\r\n{% endif %}\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"True\" %}\r\n
\r\nHet vorige rapport, #{{compared_report_id}}, is vergeleken maar bevat geen wijzigingen ten opzichte van het huidige rapport. Daarom staat er geen wijzigingsoverzicht in deze mail.\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"False\" %}\r\n
\r\n

Wijzigingsoverzicht

\r\nOnderstaand is een samenvatting van de wijzigingen ten opzichte van het vorige rapport, #{{compared_report_id}}. Het vorige rapport was {{days_between_current_and_previous_report}} dagen geleden gepubliceerd en had een gemiddelde score van {{previous_report_average_internet_nl_score}}%.
\r\n
\r\nBekijk de details van de vergelijking op het dashboard met de volgende link: {{dashboard_address}}/#/report/{{report_id}}/{{compared_report_id}}
\r\n
\r\n

Samenvatting van wijzigingen

\r\n

Deze samenvatting is in absolute getallen.

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{improvement}}{{regression}}{{neutral}}
VerbeteringenVerslechteringenNeutraal
\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_report_contains_improvement != \"True\" and comparison_report_contains_regression != \"True\" %}\r\n
\r\nEr zijn alleen neutrale wijzigingen gemeten. Daarom is er geen overzicht van wijzigingen in deze mail gevoegd.
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_improvement == \"True\" or comparison_report_contains_regression == \"True\" %}\r\n{% if comparison_report_contains_improvement == \"True\" %}\r\n
\r\n

Overzicht van verbeteringen:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_improvement|safe}}\r\n
DomeinScoreVerbetering(en)Gemeten verbeteringen
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_regression == \"True\" %}\r\n
\r\n

Overzicht van verslechteringen:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_regression|safe}}\r\n
DomeinScoreVerslechtering(en)Gemeten verslechteringen
\r\n{% endif %}\r\n\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_current_report != \"\" %}\r\n
\r\nDit rapport bevat nieuwe domeinen. Deze zaten niet in het vorige rapport. Nieuw zijn: {{ domains_exclusive_in_current_report}}.\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_other_report != \"\" %}\r\n
\r\nEen aantal domeinen zijn deze keer niet gemeten, maar wel de vorige keer. Dat zijn: \r\n{{ domains_exclusive_in_other_report}}.\r\n{% endif %}\r\n\r\n
\r\nMet vriendelijke groet,
\r\nHet internet.nl dashboard
\r\n
\r\n[\r\nafmelden van deze mails \r\n- \r\ne-mail voorkeuren \r\n ]\r\n\r\n" + } + }, + { + "model": "django_mail_admin.emailtemplate", + "pk": 5, + "fields": { + "name": "signup_thank_you_nl", + "description": "Sent when a new person signs up for the dashboard. This mail should not contain any data that is submitted by the requester, as that might be used for all kinds of attacks / spam etc.", + "subject": "Bedankt voor uw aanmelding op het dashboard", + "email_html_text": "Beste ontvanger,\r\n\r\nWij hebben uw aanvraag voor toegang tot het dashboard in goede orde ontvangen. Wij streven ernaar om deze aanvraag binnen twee weken in behandeling te nemen.\r\n\r\nMocht u deze mail hebben ontvangen zonder dat u een aanvraag heeft gedaan vragen wij u om contact op te nemen met info@example.com.\r\n\r\nMet vriendelijke groet,\r\nInternet.nl Dashboard" + } + } +] \ No newline at end of file diff --git a/dashboard/internet_nl_dashboard/fixtures/dashboard_production_periodic_tasks.json b/dashboard/internet_nl_dashboard/fixtures/dashboard_production_periodic_tasks.json new file mode 100644 index 00000000..2a30119d --- /dev/null +++ b/dashboard/internet_nl_dashboard/fixtures/dashboard_production_periodic_tasks.json @@ -0,0 +1,214 @@ +[ + { + "model": "django_celery_beat.crontabschedule", + "pk": 31, + "fields": { + "minute": "*/1", + "hour": "*", + "day_of_week": "*", + "day_of_month": "*", + "month_of_year": "*", + "timezone": "UTC" + } + }, + { + "model": "django_celery_beat.crontabschedule", + "pk": 32, + "fields": { + "minute": "*/10", + "hour": "*", + "day_of_week": "*", + "day_of_month": "*", + "month_of_year": "*", + "timezone": "UTC" + } + }, + { + "model": "django_celery_beat.crontabschedule", + "pk": 36, + "fields": { + "minute": "0", + "hour": "4", + "day_of_week": "*", + "day_of_month": "*", + "month_of_year": "*", + "timezone": "UTC" + } + }, + { + "model": "django_celery_beat.intervalschedule", + "pk": 2, + "fields": { + "every": 10, + "period": "seconds" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 101, + "fields": { + "name": "Check running dashboard scans", + "task": "websecmap.app.models.create_function_job", + "interval": 2, + "crontab": null, + "solar": null, + "clocked": null, + "args": "[\"dashboard.internet_nl_dashboard.scanners.scan_internet_nl_per_account.check_running_dashboard_scans\"]", + "kwargs": "{}", + "queue": "storage", + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": null, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T15:09:54.137Z", + "total_run_count": 12993137, + "date_changed": "2024-06-18T15:10:04.217Z", + "description": "" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 102, + "fields": { + "name": "Run Scheduled Scans", + "task": "websecmap.app.models.create_function_job", + "interval": null, + "crontab": 31, + "solar": null, + "clocked": null, + "args": "[\"dashboard.internet_nl_dashboard.tasks.start_scans_for_lists_who_are_up_for_scanning\"]", + "kwargs": "{}", + "queue": "storage", + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": null, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T15:10:00.021Z", + "total_run_count": 2635114, + "date_changed": "2024-06-18T15:10:04.146Z", + "description": "" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 104, + "fields": { + "name": "celery.backend_cleanup", + "task": "celery.backend_cleanup", + "interval": null, + "crontab": 36, + "solar": null, + "clocked": null, + "args": "[]", + "kwargs": "{}", + "queue": null, + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": 43200, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T04:00:00.051Z", + "total_run_count": 1832, + "date_changed": "2024-06-18T04:00:33.086Z", + "description": "" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 105, + "fields": { + "name": "Send queued mail", + "task": "dashboard.internet_nl_dashboard.logic.mail.send_queued_mail", + "interval": null, + "crontab": 31, + "solar": null, + "clocked": null, + "args": "[]", + "kwargs": "{}", + "queue": null, + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": null, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T15:10:00.033Z", + "total_run_count": 1866360, + "date_changed": "2024-06-18T15:10:04.234Z", + "description": "" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 138, + "fields": { + "name": "Progress Subdomain Discovery Scans", + "task": "websecmap.app.models.create_function_job", + "interval": null, + "crontab": 31, + "solar": null, + "clocked": null, + "args": "[\"dashboard.internet_nl_dashboard.scanners.subdomains.progress_subdomain_discovery_scans\"]", + "kwargs": "{}", + "queue": "storage", + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": null, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T15:10:00.049Z", + "total_run_count": 1372383, + "date_changed": "2024-06-18T15:10:04.178Z", + "description": "" + } + }, + { + "model": "django_celery_beat.periodictask", + "pk": 139, + "fields": { + "name": "Auto share on front page", + "task": "dashboard.internet_nl_dashboard.tasks.autoshare_report_to_front_page", + "interval": null, + "crontab": 32, + "solar": null, + "clocked": null, + "args": "[]", + "kwargs": "{}", + "queue": null, + "exchange": null, + "routing_key": null, + "headers": "{}", + "priority": null, + "expires": null, + "expire_seconds": null, + "one_off": false, + "start_time": null, + "enabled": true, + "last_run_at": "2024-06-18T15:10:00.009Z", + "total_run_count": 39348, + "date_changed": "2024-06-18T15:10:04.162Z", + "description": "" + } + } +] \ No newline at end of file diff --git a/dashboard/internet_nl_dashboard/fixtures/django_mail_admin_dot_EmailTemplate.json b/dashboard/internet_nl_dashboard/fixtures/django_mail_admin_dot_EmailTemplate.json deleted file mode 100644 index ff8c4c76..00000000 --- a/dashboard/internet_nl_dashboard/fixtures/django_mail_admin_dot_EmailTemplate.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "model": "django_mail_admin.emailtemplate", - "pk": 1, - "fields": { - "name": "scan_finished_en", - "description": "Used when a the scan on a list is finished and a report is being sent. You can translate this template to other languages by creating a new template with _nl or another language code instead of _en for english.", - "subject": "Report ready for {{list_name}}, scoring {{report_average_internet_nl_score}}", - "email_html_text": "Hi {{recipient}},
\r\n
\r\nThe {{scan_type}} scan on '{{list_name}}' has finished and your report is ready. The average internet.nl score in this report is {{report_average_internet_nl_score}}%.
\r\n
\r\nView the report at this link:
\r\n\r\n {{dashboard_address}}/spa/#/report/{{report_id}}/
\r\n\r\n\r\n{% if previous_report_available == \"False\" %}\r\n
\r\nThis is the first report for '{{list_name}}'. The next time this list is scanned, a comparison report will be included in this mail.\r\n{% endif %}\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"True\" %}\r\n
\r\nA previous report, #{{compared_report_id}}, is available but contains no changes compared to this report. Therefore no change summary was included.\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_is_empty == \"False\" %}\r\n
\r\n

Changes compared to previous report

\r\nBelow a summary is given compared to the previous report, #{{compared_report_id}}. The previous report was made {{days_between_current_and_previous_report}} days ago and had an average score of {{previous_report_average_internet_nl_score}}%.
\r\n
\r\nYou can view the comparison in detail on the dashboard at {{dashboard_address}}/spa/#/report/{{report_id}}/{{compared_report_id}}
\r\n
\r\n

Summary of changes:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{improvement}}{{regression}}{{neutral}}
ImprovementsRegressionsNeutral
\r\n{% endif %}\r\n\r\n\r\n{% if previous_report_available == \"True\" and comparison_report_contains_improvement != \"True\" and comparison_report_contains_regression != \"True\" %}\r\n
\r\nOnly neutral changes have been observed, therefore no detailed overview of changes is included in this e-mail.
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_improvement == \"True\" or comparison_report_contains_regression == \"True\" %}\r\n{% if comparison_report_contains_improvement == \"True\" %}\r\n
\r\n

Overview of improvements:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_improvement|safe}}\r\n
DomainScoreImprovement(s)Metrics improved
\r\n{% endif %}\r\n\r\n{% if comparison_report_contains_regression == \"True\" %}\r\n
\r\n

Overview of regressions:

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{comparison_table_regression|safe}}\r\n
DomainScoreRegeression(s)Metrics regressed
\r\n{% endif %}\r\n\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_current_report != \"\" %}\r\n
\r\nThis report includes new domains, which are not included because they could not be compared: {{ domains_exclusive_in_current_report}}.\r\n{% endif %}\r\n\r\n{% if domains_exclusive_in_other_report != \"\" %}\r\n
\r\nThe following domains have disappeared in the new report, and are thus not included above: {{ domains_exclusive_in_other_report}}.\r\n{% endif %}\r\n\r\n
\r\nRegards,
\r\nThe internet.nl dashboard
\r\n
\r\n[\r\nunsubscribe \r\n- \r\npreferences \r\n ]\r\n\r\n" - } - }, - { - "model": "django_mail_admin.emailtemplate", - "pk": 2, - "fields": { - "name": "detailed_comparison_improvement_en", - "description": "", - "subject": "Part of comparison mail", - "email_html_text": "{% for record in data %}\r\n\r\n {{ record.url }}\r\n \r\n \r\n \r\n {{ record.new.score }}%\r\n \r\n \r\n \r\n {{ record.changes.improvement }}\r\n \r\n \r\n \r\n \r\n\r\n{% endfor %}" - } - }, - { - "model": "django_mail_admin.emailtemplate", - "pk": 3, - "fields": { - "name": "detailed_comparison_regression_en", - "description": "", - "subject": "Part of comparison mail", - "email_html_text": "{% for record in data %}\r\n\r\n \r\n {{ record.url }}\r\n \r\n \r\n \r\n \r\n {{ record.new.score }}%\r\n \r\n \r\n \r\n {{ record.changes.regression }}\r\n \r\n \r\n \r\n \r\n\r\n{% endfor %}" - } - } -] \ No newline at end of file diff --git a/docs/input/Installation.rst b/docs/input/Installation.rst index 354a293f..12aa9cfc 100644 --- a/docs/input/Installation.rst +++ b/docs/input/Installation.rst @@ -37,6 +37,13 @@ Server installation 1: Setting the SECRET_KEY and FIELD_ENCRYPTION_KEY (will happen on installation?) Automate this... 2: Creating the first application user (automated probably) +The fixtures needed to be installed are: + +* dashboard_production_periodic_tasks +* dashboard_production_example_email_templates + +Possibly an account has to be added and connected to the user. Should this be a command line thing? + Backend application ======================