* remove grafana_plugin_management django app
it seems to be no longer used or referenced. In addition apps.api.serializers.organization.PluginOrganizationSerializer was only
referenced from within grafana_plugin_management and is thereby safe
to remove.
* DEFAULT_FROM_EMAIL -> EMAIL_FROM
* add EMAIL_FROM live setting
* EMAIL_FROM -> EMAIL_FROM_ADDRESS
* merge dev
* add test for get_from_email
* allow live settings to be null on internal API
* remove redundant tests
* remove email verification related code
* remove email verification related code
* remove sendgrid callback
* remove sendgrid related code
* remove sendgrid related code
* rename sendgrid app to email
* remove email from built-in channels
* remove email from built-in channels
* remove email from built-in channels
* add email backend: https://github.com/grafana/oncall/pull/50
* add email templater
* add email templater
* convert md to html
* add email settings to live settings
* use task to send email, handle some exceptions to create logs
* remove ERROR_NOTIFICATION_MAIL_DELIVERY_FAILED usage
* add email limit logic
* fix tests
* add docs
* remove old email templates
* remove old email templates
* add template_fields to messaging backend
* add messaging backends templates to public api
* add comment for deprecated fields
* fix test
* fix tests
* disable email by default
* don't retry on SMTPException and TimeoutError
* add tests
* bring email back to public api docs
* return ERROR_NOTIFICATION_MAIL_LIMIT_EXCEEDED
* make template_fields tuple
* build_subject_and_title -> build_subject_and_message
* add one more comment about template deprecation
* use 8 as backend id
* add comment about gaierror and BadHeaderError
* add comment on importing in notify_user_async
* edit oss docs
* Allow non-JSON custom webhook templates, provided they render as valid JSON
Previously, both the provided template _and_ the rendered template had
to be valid JSON in order for validation to pass. This was unnecessarily
restrictive: really, only the rendered template needs to be valid JSON.
It also disallowed using templates such as:
{
"labels": {{ alert_payload.labels | tojson }}
}
even though this would be valid JSON after rendering.
This commit relaxes the validation of custom webhook templates so that
they don't need to be valid JSON, provided that the rendered template
_is_ valid JSON. This is checked using a dummy dictionary of render
params, which use a constant string for the `alert_group_id` field
and a `defaultdict(dict)` for the `alert_payload` field. This should
permit templates like the one above, but still deny templates such as
{
"labels": {{ alert_payload.labels }}
}
which would otherwise fail later if `labels` is not valid JSON.
This should resolve#638.
* Use defaultdict(str) instead of defaultdict(lambda: "")
* Add missing comment to resolution note validation code
* Update validation of resolution notes in public API, too
* Add extra test cases for JSON webhook templates endpoint of public API
* schedule alpha major fixes
* Fix shift update for web schedules
* Fix priority level regex, fix getting shifts without duration
* Fix shift update for web schedules
* Fix tests for shift update
* Fix priority level test
* schedule alpha fixes
* add final schedule click handler
* fix date time picker
* fix utc timzeonr time picker
* fix utc time data
* dont use user timezone on start
Co-authored-by: Julia <ferril.darkdiver@gmail.com>
* Add hiding personal phone numbers
* Fix tests
* phone number toggler
* fixed issue where id was not set
* some improvement changes
* show toggle just for validated phone numbers
* ux changes + refactored PhoneVerification
* minor changes
* linter
* hide banner
* ux changes for phone verification
* make it full width
* linter
* show action only if phone is verified
* linter
* revert isCodeSent once phone is forgotten
* fix UserHiddenFieldsSerializer
* await for loadUser
* missing WithPermissions wrapper
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
Co-authored-by: Rares Mardare <40542072+teodosii@users.noreply.github.com>