Commit Graph

8 Commits

Author SHA1 Message Date
Andy Butland
bdb8f34da3 Netcore: Health check notifier hosted service (#9295)
* Implemented health check notifier as a hosted service.
Added validation to health check settings.

* Registered health check notifier as a hosted service.
Modified health check nested settings to use concrete classes to align with other configuration models.

* Resolved issues with email sending using development server.

* PR review comments and fixed failing unit test.

* Changed period and delay millisecond and hourly values to TimeSpans.
Changed configuration of first run time for health check notifications to use H:mm format.

* Set up SecureSocketOptions as a locally defined enum.

* Tightened up time format validation to verify input is an actual time (with hours and minutes only) and not a timespan.

* Aligned naming and namespace of health check configuration related classes with other configuration classes.

* Created constants for hex colors used in formatting health check results as HTML.

* Revert "Tightened up time format validation to verify input is an actual time (with hours and minutes only) and not a timespan."

This reverts commit f9bb8a7a825bcb58146879f18b47922e09453e2d.

* Renamed method to be clear validation is of a TimeSpan and not a time.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-30 13:56:13 +01:00
Andy Butland
fe158ec7d9 Removed custom validation of configuration enum values, reverting to framework based validation when binding direct to the enum values. 2020-09-21 21:20:46 +02:00
Andy Butland
574e4d6446 Reverted change to enum parse from string configuration value, as we can't avoid the property being evaluated before the validation has occurred. 2020-09-21 16:23:58 +02:00
Andy Butland
cce091de74 Throw exception on unexpected failure of creation on enum value from configuration, rather than falling back to a default.
This shouldn't happen in practice due to the configuration validation (e.g. by ContentSettingsValidator), so any failure of parsing here should be considered an exception.
2020-09-21 12:04:30 +02:00
Andy Butland
903e964925 Set default value for SmtpSettings DeliveryMethod configuration. 2020-09-21 08:54:03 +02:00
Andy Butland
d55b54ce49 Added unit tests for introduced unit test configuration setting builders. 2020-09-21 08:54:03 +02:00
Andy Butland
b9e67dde55 Added configuration validation for models builder and hosting settings.
Renamed models builder config class suffix to match others.
2020-09-18 12:53:10 +02:00
Andy Butland
e3a44c6717 Moved configuration setting POCOs into Umbraco.Core and adjusted references.
Amended injection of some settings to use IOptionsSnapshot.
2020-08-20 22:18:50 +01:00