Commit Graph

46 Commits

Author SHA1 Message Date
Andy Butland
2f2da679a4 Migrated scheduled publishing task to a hosted service. 2020-11-02 18:08:25 +01:00
Andy Butland
88380a17ae Migrated log scrubber backgroun task to a hosted service. 2020-10-31 14:13:24 +01:00
Andy Butland
4920fba7cb Migrated temp file cleanup background task to a hosted service. 2020-10-31 08:58:47 +01:00
Andy Butland
9cb59239d1 Migrated KeepAlive recurring task to hosted service. 2020-10-30 17:19:01 +01:00
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
Emma L Garland
7a570110d0 Netcore/feature/healthcheck replaceconfiglogic (#8934)
* Started moving to JSON instead of config.
Mild refactoring but overall keeping it the same, except for injecting IConfiguration and JSON parsing instead of XML
Tests currently unaffected, need to increase coverage

* Moved to constants for appsettings keys
Moved from IConfiguration to global settings - later to be replaced with IOptions
Updated translation messages
Installed IOptions ready for new PR
Updated to new interface, IConfigurationService

* Post-merge fix

* Namespace move from Umbraco.Web to Umbraco.Core where appropriate

* Renamed abstractsettings (from abstractconfig)
Moving out of configservice into the POCO config check

* Made the IIsCustomErrors healthcheck as obsolete, as no web.config setting). Investigate reintroducing this check in the .NET Core way (UseDevelopment).
Reducing use of abstractsettings as not needed - we don't need a config service to read the config settings anymore as they're all explicit POCOs.
Consolidated health-checks in project.

* Removed test views that weren't meant to be added

* Returned to use of abstractsettings with different use

* Moved more health checks into correct folder/namespace, and enum into their own file

* Correct namespace

* Git history/compare lost due to file move, temporarily moving back to original folder. Will do another PR to move after this

* Use existing GetStatus in abstract check for Debug mode

* Updating to return to previous logic and putting files back into line

* Macro errors returned to previous logic

* Reuse abstractsettings class

* Swapped order to assist with reviewing PR

* Updated to include itempath

* Not implemented comment to avoid confusion
Implemented NotificationEmailCheck

* Changed to IOptionsMonitor as per PR comments. Removed configurationservice as we need to rethink the fixing strategy. Updated logger.
Needs to show fix message instead of fixing. Temporary fix for IIS version

* Switched to IOptionsMonitor for all

* No longer attempts to actually fix header in config. Still need to show suggestions.

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-10-21 11:29:25 +02:00
Bjarke Berg
81e2ebda96 Cleanup
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-09-29 10:42:06 +02:00
Mole
d750d2c2c1 Use generic logger more places and clean up 2020-09-28 14:59:17 +02:00
Mole
b5aedde616 Do some ILogger cleaning 2020-09-28 08:48:49 +02:00
Bjarke Berg
35443f0e71 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	src/Umbraco.Infrastructure/Search/ExamineComponent.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
2020-09-24 08:24:35 +02:00
Bjarke Berg
0d731e7a40 Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	build/build-bootstrap.ps1
#	src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs
#	src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs
#	src/Umbraco.Infrastructure/Search/ExamineComponent.cs
#	src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
#	src/Umbraco.Web/Compose/BackOfficeUserAuditEventsComponent.cs
#	src/Umbraco.Web/Logging/WebProfilerComponent.cs
2020-09-23 13:28:36 +02:00
Bjarke Berg
e3c8bd8ced Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Core/Cache/MemberCacheRefresher.cs
#	src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs
#	src/Umbraco.Infrastructure/Search/ExamineComponent.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
#	src/Umbraco.Web/Security/MembershipHelper.cs
#	src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs
2020-09-23 12:54:13 +02:00
Mole
c0616d516a Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
# Conflicts:
#	src/Umbraco.Infrastructure/Scheduling/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Scheduling/SchedulerComponent.cs
#	src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/ContentModelValidatorTests.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs
#	src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MacrosController.cs
#	src/Umbraco.Web.BackOffice/Controllers/PackageInstallController.cs
#	src/Umbraco.Web.BackOffice/Controllers/RedirectUrlManagementController.cs
#	src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Filters/MediaItemSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Filters/MediaSaveModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
#	src/Umbraco.Web.Common/Install/InstallController.cs
2020-09-22 13:44:22 +02:00
Bjarke Berg
a80de91031 Netcore: Handle tree authentication (#8866)
* Added helper methods to invoke the authorization filters of the other controller action

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Implemented Tree Auth

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* cleanup

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Throw forbidden if user has no access instead of InternalServerError

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* EnsureBackofficeSecurity for background jobs

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-09-22 13:19:54 +02:00
Mole
ab3ac5ad91 Remove a bunch of references to the old logger 2020-09-21 11:19:46 +02:00
Mole
d61b9f54fa Merge options 2020-09-18 12:53:06 +02:00
Nikolaj
140cf69027 Use MS ILogger for XmlStore and BackgroundTask 2020-09-17 13:14:02 +02:00
Nikolaj
a18580c7f6 Remove Debug<T> from LoggerExtensions 2020-09-16 10:24:05 +02:00
Nikolaj
dda6fb12a3 Remove LogError<T> from LoggerExtensions 2020-09-16 09:40:49 +02:00
Nikolaj
633d42039e Fix a whole bunch of other errors 2020-09-15 15:14:44 +02:00
Nikolaj
0238d6eb02 Start using LoggerFactory 2020-09-15 12:40:35 +02:00
Nikolaj
02828db8fd Add work on PublishedSnapshotService 2020-09-15 08:45:40 +02:00
Nikolaj
d7e3bce741 Rename Error to align it with MS ILogger 2020-09-14 09:10:53 +02:00
Bjarke Berg
c8669b18c2 Merge remote-tracking branch 'origin/netcore/netcore' into feature/8651-config-options-patten
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-09-04 14:30:48 +02:00
Shannon
f84a93ae20 Adds IUmbracoBuilder to build the config so it's easier to split apart, ensures background tasks don't run in integration tests, uses a custom CoreRuntime to ensure we use SimpleMainDom, re-wires the UmbracoWebApplicationFactory so that duplicate Hosts are not running at the same time, fixes issues with overriding/shadowing, uses RAMDirectory in lucene for tests, fixes CoreRuntime's events that we're moved incorrectly and not backwards compat, adds new real non static events which we can use in integration tests to install the DB before the runtime state is calculated 2020-09-02 18:10:29 +10:00
Andy Butland
64f8752587 Removed introduced second constructors for IOptions based depenedencies and used Options.Create instead. 2020-08-26 11:58:44 +02:00
Andy Butland
7884e4ca17 Resolved issues such that application boots and back-office is navigable. 2020-08-24 09:29:40 +02:00
Andy Butland
2cd91a5a54 Converted to IOptions over IOptionsSnapshot due to the latter only working in scoped services.
Further amends to return to booting application.
2020-08-23 23:36:48 +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
Bjarke Berg
c57c42d2ec Fixes merge conflicts 2020-08-07 14:00:56 +02:00
Bjarke Berg
39162f0f6a Merge conflicts resolved 2020-08-06 12:59:21 +02:00
Bjarke Berg
32893d6adb Fix wrong xml doc comment 2020-07-09 11:06:38 +02:00
Bjarke Berg
70544c38ed Cleanup + Ensure temp folder exists when background jobs are started.
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-30 08:14:26 +02:00
Bjarke Berg
8f7c022f2d AB#6233 - Handle ApplicationUrl 2020-05-07 09:34:16 +02:00
Bjarke Berg
3e50333a3b Fix for logviewer issue 2020-04-24 11:52:12 +02:00
Shannon
f19e18e160 Removes new namespaces: Umbraco.Core.Cookie, Umbraco.Core.Session, Umbraco.Core.Request, these are web things and should be part of one namespace 2020-04-08 15:56:19 +10:00
Shannon
f24cae51d8 Renames IHostingEnvironmentLifetime to IApplicationShutdownRegistry 2020-03-26 15:39:20 +11:00
Shannon
612a47b16b Splits interfaces into separate ones, removes overlap between interfaces, injects the necessary bits, and much more 2020-03-25 15:06:22 +11:00
Bjarke Berg
51879c0b80 Implemented config for asp.net core 2020-03-16 14:02:08 +01:00
Bjarke Berg
e4ff481053 Cleaned up config for Keep Alive settings 2020-03-12 08:28:31 +01:00
Bjarke Berg
f446e52d8f Cleaned up condig for Logging and Tours 2020-03-12 08:24:02 +01:00
Bjarke Berg
152fcf7d1b Fixed based on review findings 2020-03-04 07:50:37 +01:00
Bjarke Berg
e9f7034365 Moved compoenents and composers 2020-03-03 07:29:51 +01:00
Bjarke Berg
accef6d96a Merged Umbraco.Examine and Umbraco.Infrastructure and moved more files into Infrastructure 2020-02-18 13:34:31 +01:00
elitsa
5ce8e29aa6 Moving Scheduling classes dependent on the recently moved HealthCheck classes - changing class accessibility level, installing needed nuget into Infrastructure proj 2020-01-28 14:38:18 +01:00
elitsa
770c4beb95 Moving Scheduling classes from Web to Abstractions and Infrastructure. 2020-01-27 12:56:00 +01:00