From 5e4d326ec2927d9895154afdbb38c493059211c9 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 08:40:59 +0100 Subject: [PATCH 01/99] Use trim method as trim isn't a property (#9605) --- .../editor/umbeditorheader.directive.js | 13 +++++----- src/Umbraco.Web.UI.Client/src/utilities.js | 25 ++++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js index 6f272f1ea2..0ac285c094 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js @@ -341,20 +341,19 @@ Use this directive to construct a header inside the main editor window. } } - scope.accessibility.a11yMessageVisible = !isEmptyOrSpaces(scope.accessibility.a11yMessage); - scope.accessibility.a11yNameVisible = !isEmptyOrSpaces(scope.accessibility.a11yName); + + scope.accessibility.a11yMessageVisible = !isNullOrWhitespace(scope.accessibility.a11yMessage); + scope.accessibility.a11yNameVisible = !isNullOrWhitespace(scope.accessibility.a11yName); }); } - - - function isEmptyOrSpaces(str) { - return str === null || str===undefined || str.trim ===''; + function isNullOrWhitespace(str) { + return str === null || str === undefined || str.trim() === ''; } function SetPageTitle(title) { - scope.$emit("$changeTitle", title); + scope.$emit("$changeTitle", title); } var unbindEventHandler = $rootScope.$on('$setAccessibleHeader', function (event, isNew, editorFor, nameLocked, name, contentTypeName, setTitle) { diff --git a/src/Umbraco.Web.UI.Client/src/utilities.js b/src/Umbraco.Web.UI.Client/src/utilities.js index 64884b589b..01e18e4e1c 100644 --- a/src/Umbraco.Web.UI.Client/src/utilities.js +++ b/src/Umbraco.Web.UI.Client/src/utilities.js @@ -71,28 +71,29 @@ const isScope = obj => obj && obj.$evalAsync && obj.$watch; const toJsonReplacer = (key, value) => { - var val = value; + var val = value; if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') { - val = undefined; + val = undefined; } else if (isWindow(value)) { - val = '$WINDOW'; - } else if (value && window.document === value) { - val = '$DOCUMENT'; + val = '$WINDOW'; + } else if (value && window.document === value) { + val = '$DOCUMENT'; } else if (isScope(value)) { - val = '$SCOPE'; - } + val = '$SCOPE'; + } return val; - } + }; + /** * Equivalent to angular.toJson */ const toJson = (obj, pretty) => { if (isUndefined(obj)) return undefined; if (!isNumber(pretty)) { - pretty = pretty ? 2 : null; + pretty = pretty ? 2 : null; } return JSON.stringify(obj, toJsonReplacer, pretty); - } + }; /** * Equivalent to angular.fromJson @@ -102,7 +103,7 @@ return val; } return JSON.parse(val); - } + }; /** * Not equivalent to angular.forEach. But like the angularJS method this does not fail on null or undefined. @@ -112,7 +113,7 @@ return obj.forEach(iterator); } return obj; - } + }; let _utilities = { noop: noop, From 451f3da8f4afb009a850b225deda32f3fbb2ebfd Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 08:58:56 +0100 Subject: [PATCH 02/99] Align datatype sidebar box properties (#9632) --- src/Umbraco.Web.UI.Client/src/less/forms.less | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index 90b2dbe37e..f38ba8f806 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -800,9 +800,12 @@ legend + .control-group { // adjustments for properties tab .form-horizontal .block-form .control-label { - display: block; - float: none; - width: 100%; + display: block; + float: none; + width: 100%; +} +.form-horizontal .block-form .controls { + margin-left: 0; } //make sure buttons are always on top From 4b387242f24e2be0306db54bbf0ac42f218323f6 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 09:04:46 +0100 Subject: [PATCH 03/99] Ensure sub-view components are not self-closed elements (#9633) --- .../src/views/components/content/umb-variant-content.html | 3 ++- src/Umbraco.Web.UI.Client/src/views/content/recyclebin.html | 3 ++- src/Umbraco.Web.UI.Client/src/views/media/edit.html | 3 ++- src/Umbraco.Web.UI.Client/src/views/media/recyclebin.html | 3 ++- src/Umbraco.Web.UI.Client/src/views/member/edit.html | 3 ++- src/Umbraco.Web.UI.Client/src/views/member/list.html | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html index 40a88ae6a6..9efc0e80bd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-variant-content.html @@ -36,7 +36,8 @@
- + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/recyclebin.html b/src/Umbraco.Web.UI.Client/src/views/content/recyclebin.html index 2981097656..410ad938f8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/recyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/recyclebin.html @@ -11,7 +11,8 @@
- + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/edit.html b/src/Umbraco.Web.UI.Client/src/views/media/edit.html index d2782a2a21..8f8a62474b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/edit.html @@ -23,7 +23,8 @@
- + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/recyclebin.html b/src/Umbraco.Web.UI.Client/src/views/media/recyclebin.html index cd4ad6d07e..fddf63bef3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/recyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/recyclebin.html @@ -12,7 +12,8 @@
- + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/member/edit.html b/src/Umbraco.Web.UI.Client/src/views/member/edit.html index 3fec222350..50c986bd6a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/member/edit.html @@ -26,7 +26,8 @@
- + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/member/list.html b/src/Umbraco.Web.UI.Client/src/views/member/list.html index a61614e8f5..4f27b54aa9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/list.html +++ b/src/Umbraco.Web.UI.Client/src/views/member/list.html @@ -18,7 +18,8 @@
- + +
From a466b49b2b9c17e8ae4612c6d01ae79293009a3e Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 09:43:42 +0100 Subject: [PATCH 04/99] Eye Dropper Color Picker (#9646) --- src/Umbraco.Core/Constants-PropertyEditors.cs | 5 ++ .../EyeDropperColorPickerConfiguration.cs | 14 +++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + .../colorpicker/colorpicker.controller.js | 8 +-- .../eyedropper/eyedropper.controller.js | 44 +++++++++++++++ .../eyedropper/eyedropper.html | 11 ++++ ...yeDropperColorPickerConfigurationEditor.cs | 53 +++++++++++++++++++ .../EyeDropperColorPickerPropertyEditor.cs | 22 ++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 2 + 9 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 src/Umbraco.Core/PropertyEditors/EyeDropperColorPickerConfiguration.cs create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.html create mode 100644 src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerConfigurationEditor.cs create mode 100644 src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerPropertyEditor.cs diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index 90f5fbd0d0..87739469d1 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -51,6 +51,11 @@ namespace Umbraco.Core /// public const string ColorPicker = "Umbraco.ColorPicker"; + /// + /// EyeDropper Color Picker. + /// + public const string ColorPickerEyeDropper = "Umbraco.ColorPicker.EyeDropper"; + /// /// Content Picker. /// diff --git a/src/Umbraco.Core/PropertyEditors/EyeDropperColorPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/EyeDropperColorPickerConfiguration.cs new file mode 100644 index 0000000000..3e74b074f9 --- /dev/null +++ b/src/Umbraco.Core/PropertyEditors/EyeDropperColorPickerConfiguration.cs @@ -0,0 +1,14 @@ +namespace Umbraco.Core.PropertyEditors +{ + /// + /// Represents the configuration for the Eye Dropper picker value editor. + /// + public class EyeDropperColorPickerConfiguration + { + [ConfigurationField("showAlpha", "Show alpha", "boolean", Description = "Allow alpha transparency selection.")] + public bool ShowAlpha { get; set; } + + [ConfigurationField("showPalette", "Show palette", "boolean", Description = "Show a palette next to the color picker.")] + public bool ShowPalette { get; set; } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index b98ad64f7a..569fdb4638 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -156,6 +156,7 @@ + diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js index c1b432b36e..886d051f4d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js @@ -2,16 +2,16 @@ function ColorPickerController($scope, $timeout) { var vm = this; - //setup the default config + // setup the default config var config = { items: [], multiple: false }; - //map the user config - angular.extend(config, $scope.model.config); + // map the user config + Utilities.extend(config, $scope.model.config); - //map back to the model + // map back to the model $scope.model.config = config; $scope.isConfigured = $scope.model.config && $scope.model.config.items && _.keys($scope.model.config.items).length > 0; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.controller.js new file mode 100644 index 0000000000..82a0d18cab --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.controller.js @@ -0,0 +1,44 @@ +function EyeDropperColorPickerController($scope, angularHelper) { + + var vm = this; + + //setup the default config + var config = { + showAlpha: true, + showPalette: true, + allowEmpty: true + }; + + // map the user config + Utilities.extend(config, $scope.model.config); + + // map back to the model + $scope.model.config = config; + + vm.options = $scope.model.config; + + vm.color = $scope.model.value || null; + + vm.selectColor = function (color) { + angularHelper.safeApply($scope, function () { + vm.color = color ? color.toString() : null; + $scope.model.value = vm.color; + $scope.propertyForm.selectedColor.$setViewValue(vm.color); + }); + }; + + // Method required by the valPropertyValidator directive (returns true if the property editor has at least one color selected) + $scope.validateMandatory = function () { + var isValid = !$scope.model.validation.mandatory || ( + $scope.model.value != null + && $scope.model.value != ""); + + return { + isValid: isValid, + errorMsg: $scope.model.validation.mandatoryMessage || "Value cannot be empty", + errorKey: "required" + }; + }; +} + +angular.module("umbraco").controller("Umbraco.PropertyEditors.EyeDropperColorPickerController", EyeDropperColorPickerController); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.html new file mode 100644 index 0000000000..821f50f92b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.html @@ -0,0 +1,11 @@ +
+ + + + + + +
diff --git a/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerConfigurationEditor.cs new file mode 100644 index 0000000000..55867feddc --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerConfigurationEditor.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using Umbraco.Core; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + internal class EyeDropperColorPickerConfigurationEditor : ConfigurationEditor + { + public EyeDropperColorPickerConfigurationEditor() + { + + } + + /// + public override Dictionary ToConfigurationEditor(EyeDropperColorPickerConfiguration configuration) + { + return new Dictionary + { + { "showAlpha", configuration.ShowAlpha }, + { "showPalette", configuration.ShowPalette } + }; + } + + /// + public override EyeDropperColorPickerConfiguration FromConfigurationEditor(IDictionary editorValues, EyeDropperColorPickerConfiguration configuration) + { + var output = new EyeDropperColorPickerConfiguration(); + + var showAlpha = true; + var showPalette = true; + + if (editorValues.TryGetValue("showAlpha", out var alpha)) + { + var attempt = alpha.TryConvertTo(); + if (attempt.Success) + showAlpha = attempt.Result; + } + + if (editorValues.TryGetValue("showPalette", out var palette)) + { + var attempt = palette.TryConvertTo(); + if (attempt.Success) + showPalette = attempt.Result; + } + + return new EyeDropperColorPickerConfiguration + { + ShowAlpha = showAlpha, + ShowPalette = showPalette + }; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerPropertyEditor.cs new file mode 100644 index 0000000000..cf0d239523 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/EyeDropperColorPickerPropertyEditor.cs @@ -0,0 +1,22 @@ +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors +{ + [DataEditor( + Constants.PropertyEditors.Aliases.ColorPickerEyeDropper, + "Eye Dropper Color Picker", + "eyedropper", + Icon = "icon-colorpicker", + Group = Constants.PropertyEditors.Groups.Pickers)] + public class EyeDropperColorPickerPropertyEditor : DataEditor + { + public EyeDropperColorPickerPropertyEditor(ILogger logger) + : base(logger) + { } + + /// + protected override IConfigurationEditor CreateConfigurationEditor() => new EyeDropperColorPickerConfigurationEditor(); + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 80c8d19a58..c3aa0433c5 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -254,6 +254,8 @@ + + From 56938a7bdcc1abab05f0c7b6c83deb209ba69e1a Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 09:57:32 +0100 Subject: [PATCH 05/99] Move relation type id and macro id to sidebar box (#9657) --- .../src/views/macros/views/settings.html | 126 ++++++++++-------- .../relationtypes/views/relationType.html | 97 ++++++++------ 2 files changed, 127 insertions(+), 96 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html index 9825a6f919..c152c33193 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html @@ -1,62 +1,76 @@ 
- - - - - {{model.macro.id}}
- {{model.macro.key}} -
-
-
- - - - - - +
- +
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
{{model.macro.id}}
+ {{model.macro.key}} +
+
+
+
+ +
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/Umbraco.Web.UI.Client/src/views/relationtypes/views/relationType.html b/src/Umbraco.Web.UI.Client/src/views/relationtypes/views/relationType.html index 100d8d9d09..8f910a6c86 100644 --- a/src/Umbraco.Web.UI.Client/src/views/relationtypes/views/relationType.html +++ b/src/Umbraco.Web.UI.Client/src/views/relationtypes/views/relationType.html @@ -1,46 +1,63 @@
- - - - -
{{model.relationType.id}}
- {{model.relationType.key}} -
- - -
    -
  • - - -
  • -
  • - - -
  • -
-
+
- - -
{{model.relationType.parentObjectTypeName}}
-
+
- - -
{{model.relationType.childObjectTypeName}}
-
+ + - - -
{{model.relationType.relations.length}}
-
-
-
+ + +
    +
  • + + +
  • +
  • + + +
  • +
+
+ + + +
{{model.relationType.parentObjectTypeName}}
+
+ + + +
{{model.relationType.childObjectTypeName}}
+
+ + + +
{{model.relationType.relations.length}}
+
+ + + +
+ +
+ + + + +
{{model.relationType.id}}
+ {{model.relationType.key}} +
+
+
+
+ +
+
From f27a3be4e685be46b6471d7bf424722ccea9846e Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 21 Feb 2021 10:30:17 +0100 Subject: [PATCH 06/99] Fix unit tests after merging PR #9646 --- src/Umbraco.Tests/Composing/TypeLoaderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index 9cd4f39c17..b0c57b685b 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -268,7 +268,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(39, types.Count()); + Assert.AreEqual(40, types.Count()); } /// From 75ee3b96229d2fe5debfdf7fb274c321ae2342a8 Mon Sep 17 00:00:00 2001 From: Chad Date: Sun, 21 Feb 2021 23:00:00 +1300 Subject: [PATCH 07/99] Speed up boot times and Improve Json (De)Serialization performance and reduce memory usage by reusing JsonSerializerSettings (#9670) --- .../ImageCropperValueConverter.cs | 12 ++-- .../NoTypeConverterJsonConverter.cs | 5 +- .../JsonSerializerSettingsBenchmarks.cs | 69 +++++++++++++++++++ .../Umbraco.Tests.Benchmarks.csproj | 1 + .../Editors/BackOfficeController.cs | 6 +- .../ImageCropperTemplateExtensions.cs | 14 ++-- src/Umbraco.Web/Mvc/JsonNetResult.cs | 9 +++ .../MultiUrlPickerValueEditor.cs | 11 +-- .../NuCache/DataSource/DatabaseDataSource.cs | 11 +-- 9 files changed, 112 insertions(+), 26 deletions(-) create mode 100644 src/Umbraco.Tests.Benchmarks/JsonSerializerSettingsBenchmarks.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs index 8926174c03..29e501f993 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs @@ -25,6 +25,12 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType) => PropertyCacheLevel.Element; + private static readonly JsonSerializerSettings ImageCropperValueJsonSerializerSettings = new JsonSerializerSettings + { + Culture = CultureInfo.InvariantCulture, + FloatParseHandling = FloatParseHandling.Decimal + }; + /// public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview) { @@ -34,11 +40,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters ImageCropperValue value; try { - value = JsonConvert.DeserializeObject(sourceString, new JsonSerializerSettings - { - Culture = CultureInfo.InvariantCulture, - FloatParseHandling = FloatParseHandling.Decimal - }); + value = JsonConvert.DeserializeObject(sourceString, ImageCropperValueJsonSerializerSettings); } catch (Exception ex) { diff --git a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs index b06ee870de..ab64d5b368 100644 --- a/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs +++ b/src/Umbraco.Core/Serialization/NoTypeConverterJsonConverter.cs @@ -19,6 +19,7 @@ namespace Umbraco.Core.Serialization internal class NoTypeConverterJsonConverter : JsonConverter { static readonly IContractResolver resolver = new NoTypeConverterContractResolver(); + private static readonly JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings { ContractResolver = resolver }; private class NoTypeConverterContractResolver : DefaultContractResolver { @@ -41,12 +42,12 @@ namespace Umbraco.Core.Serialization public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - return JsonSerializer.CreateDefault(new JsonSerializerSettings { ContractResolver = resolver }).Deserialize(reader, objectType); + return JsonSerializer.CreateDefault(JsonSerializerSettings).Deserialize(reader, objectType); } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { - JsonSerializer.CreateDefault(new JsonSerializerSettings { ContractResolver = resolver }).Serialize(writer, value); + JsonSerializer.CreateDefault(JsonSerializerSettings).Serialize(writer, value); } } } diff --git a/src/Umbraco.Tests.Benchmarks/JsonSerializerSettingsBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/JsonSerializerSettingsBenchmarks.cs new file mode 100644 index 0000000000..7f419547bd --- /dev/null +++ b/src/Umbraco.Tests.Benchmarks/JsonSerializerSettingsBenchmarks.cs @@ -0,0 +1,69 @@ +using BenchmarkDotNet.Attributes; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Umbraco.Tests.Benchmarks.Config; + +namespace Umbraco.Tests.Benchmarks +{ + [QuickRunConfig] + [MemoryDiagnoser] + public class JsonSerializerSettingsBenchmarks + { + [Benchmark] + public void SerializerSettingsInstantiation() + { + int instances = 1000; + for (int i = 0; i < instances; i++) + { + new JsonSerializerSettings(); + } + } + + [Benchmark(Baseline =true)] + public void SerializerSettingsSingleInstantiation() + { + new JsonSerializerSettings(); + } + +// // * Summary * + +// BenchmarkDotNet=v0.11.3, OS=Windows 10.0.18362 +//Intel Core i5-8265U CPU 1.60GHz(Kaby Lake R), 1 CPU, 8 logical and 4 physical cores +// [Host] : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.8.4250.0 +// Job-JIATTD : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.8.4250.0 + +//IterationCount=3 IterationTime=100.0000 ms LaunchCount = 1 +//WarmupCount=3 + +// Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op | +//-------------------------------------- |-------------:|-------------:|------------:|-------:|--------:|------------:|------------:|------------:|--------------------:| +// SerializerSettingsInstantiation | 29,120.48 ns | 5,532.424 ns | 303.2508 ns | 997.84 | 23.66 | 73.8122 | - | - | 232346 B | +// SerializerSettingsSingleInstantiation | 29.19 ns | 8.089 ns | 0.4434 ns | 1.00 | 0.00 | 0.0738 | - | - | 232 B | + +//// * Warnings * +//MinIterationTime +// JsonSerializerSettingsBenchmarks.SerializerSettingsSingleInstantiation: IterationCount= 3, IterationTime= 100.0000 ms, LaunchCount= 1, WarmupCount= 3->MinIterationTime = 96.2493 ms which is very small. It's recommended to increase it. + +//// * Legends * +// Mean : Arithmetic mean of all measurements +// Error : Half of 99.9% confidence interval +// StdDev : Standard deviation of all measurements +// Ratio : Mean of the ratio distribution ([Current]/[Baseline]) +// RatioSD : Standard deviation of the ratio distribution([Current]/[Baseline]) +// Gen 0/1k Op : GC Generation 0 collects per 1k Operations +// Gen 1/1k Op : GC Generation 1 collects per 1k Operations +// Gen 2/1k Op : GC Generation 2 collects per 1k Operations +// Allocated Memory/Op : Allocated memory per single operation(managed only, inclusive, 1KB = 1024B) +// 1 ns : 1 Nanosecond(0.000000001 sec) + +//// * Diagnostic Output - MemoryDiagnoser * + + +// // ***** BenchmarkRunner: End ***** +// Run time: 00:00:04 (4.88 sec), executed benchmarks: 2 + } +} diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index 48d69cf757..58b45aa743 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -53,6 +53,7 @@ + diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 458c76b3ae..92b67cbf1b 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -226,7 +226,7 @@ namespace Umbraco.Web.Editors .ToDictionary(pv => pv.Key, pv => pv.ToDictionary(pve => pve.valueAlias, pve => pve.value)); - return new JsonNetResult { Data = nestedDictionary, Formatting = Formatting.None }; + return new JsonNetResult(JsonNetResult.DefaultJsonSerializerSettings) { Data = nestedDictionary, Formatting = Formatting.None }; } /// @@ -273,7 +273,7 @@ namespace Umbraco.Web.Editors GetAssetList, new TimeSpan(0, 2, 0)); - return new JsonNetResult { Data = result, Formatting = Formatting.None }; + return new JsonNetResult(JsonNetResult.DefaultJsonSerializerSettings) { Data = result, Formatting = Formatting.None }; } [UmbracoAuthorize(Order = 0)] @@ -281,7 +281,7 @@ namespace Umbraco.Web.Editors public JsonNetResult GetGridConfig() { var gridConfig = Current.Configs.Grids(); - return new JsonNetResult { Data = gridConfig.EditorsConfig.Editors, Formatting = Formatting.None }; + return new JsonNetResult(JsonNetResult.DefaultJsonSerializerSettings) { Data = gridConfig.EditorsConfig.Editors, Formatting = Formatting.None }; } diff --git a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs index 26dd2a5d36..78b55a8930 100644 --- a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs +++ b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs @@ -253,19 +253,20 @@ namespace Umbraco.Web ImageCropRatioMode? ratioMode = null, bool upScale = true) => ImageCropperTemplateCoreExtensions.GetCropUrl(imageUrl, Current.ImageUrlGenerator, cropDataSet, width, height, cropAlias, quality, imageCropMode, imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBusterValue, furtherOptions, ratioMode, upScale); + private static readonly JsonSerializerSettings ImageCropperValueJsonSerializerSettings = new JsonSerializerSettings + { + Culture = CultureInfo.InvariantCulture, + FloatParseHandling = FloatParseHandling.Decimal + }; internal static ImageCropperValue DeserializeImageCropperValue(this string json) { - var imageCrops = new ImageCropperValue(); + ImageCropperValue imageCrops = null; if (json.DetectIsJson()) { try { - imageCrops = JsonConvert.DeserializeObject(json, new JsonSerializerSettings - { - Culture = CultureInfo.InvariantCulture, - FloatParseHandling = FloatParseHandling.Decimal - }); + imageCrops = JsonConvert.DeserializeObject(json, ImageCropperValueJsonSerializerSettings); } catch (Exception ex) { @@ -273,6 +274,7 @@ namespace Umbraco.Web } } + imageCrops = imageCrops ?? new ImageCropperValue(); return imageCrops; } } diff --git a/src/Umbraco.Web/Mvc/JsonNetResult.cs b/src/Umbraco.Web/Mvc/JsonNetResult.cs index da6780451e..3dd6c2f398 100644 --- a/src/Umbraco.Web/Mvc/JsonNetResult.cs +++ b/src/Umbraco.Web/Mvc/JsonNetResult.cs @@ -22,10 +22,19 @@ namespace Umbraco.Web.Mvc public JsonSerializerSettings SerializerSettings { get; set; } public Formatting Formatting { get; set; } + /// + /// Default, unchanged JsonSerializerSettings + /// + public static readonly JsonSerializerSettings DefaultJsonSerializerSettings = new JsonSerializerSettings(); + public JsonNetResult() { SerializerSettings = new JsonSerializerSettings(); } + public JsonNetResult(JsonSerializerSettings jsonSerializerSettings) + { + SerializerSettings = jsonSerializerSettings; + } public override void ExecuteResult(ControllerContext context) { diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs index 5a84e4b20c..560275b29a 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs @@ -121,6 +121,10 @@ namespace Umbraco.Web.PropertyEditors return base.ToEditor(property, dataTypeService, culture, segment); } + private static readonly JsonSerializerSettings LinkDisplayJsonSerializerSettings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; public override object FromEditor(ContentPropertyData editorValue, object currentValue) { @@ -142,11 +146,8 @@ namespace Umbraco.Web.PropertyEditors Target = link.Target, Udi = link.Udi, Url = link.Udi == null ? link.Url : null, // only save the URL for external links - }, - new JsonSerializerSettings - { - NullValueHandling = NullValueHandling.Ignore - }); + }, LinkDisplayJsonSerializerSettings + ); } catch (Exception ex) { diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs index f62014a368..f9ad0ac715 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs @@ -303,17 +303,18 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource return s; } + private static readonly JsonSerializerSettings NestedContentDataJsonSerializerSettings = new JsonSerializerSettings + { + Converters = new List { new ForceInt32Converter() } + }; + private static ContentNestedData DeserializeNestedData(string data) { // by default JsonConvert will deserialize our numeric values as Int64 // which is bad, because they were Int32 in the database - take care - var settings = new JsonSerializerSettings - { - Converters = new List { new ForceInt32Converter() } - }; - return JsonConvert.DeserializeObject(data, settings); + return JsonConvert.DeserializeObject(data, NestedContentDataJsonSerializerSettings); } } } From e554ef044574e0478805f894f96a4e18910eb2be Mon Sep 17 00:00:00 2001 From: rbottema Date: Sun, 21 Feb 2021 11:03:28 +0100 Subject: [PATCH 08/99] Fix some exceptions being logged the wrong way (#9693) In these statements, the exception was passed as a log message parameter instead of as the exception. This meant the exception and including stack trace was not logged and thus lost. --- src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs | 2 +- src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs | 2 +- src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs | 4 ++-- src/Umbraco.Web/UmbracoInjectedModule.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs b/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs index 333181f27c..1010d1db19 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs +++ b/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs @@ -91,7 +91,7 @@ namespace Umbraco.ModelsBuilder.Embedded catch (Exception e) { _mbErrors.Report("Failed to build Live models.", e); - _logger.Error("Failed to generate models.", e); + _logger.Error(e, "Failed to generate models."); } finally { diff --git a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs index 912d0e3363..8ef99383a4 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs +++ b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs @@ -308,7 +308,7 @@ namespace Umbraco.ModelsBuilder.Embedded { try { - _logger.Error("Failed to build models.", e); + _logger.Error(e, "Failed to build models."); _logger.Warn("Running without models."); // be explicit _errors.Report("Failed to build PureLive models.", e); } diff --git a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs index 560275b29a..aae691f624 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs @@ -115,7 +115,7 @@ namespace Umbraco.Web.PropertyEditors } catch (Exception ex) { - _logger.Error("Error getting links", ex); + _logger.Error(ex, "Error getting links"); } return base.ToEditor(property, dataTypeService, culture, segment); @@ -151,7 +151,7 @@ namespace Umbraco.Web.PropertyEditors } catch (Exception ex) { - _logger.Error("Error saving links", ex); + _logger.Error(ex, "Error saving links"); } return base.FromEditor(editorValue, currentValue); diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index cc130a7b56..c2ee4ce535 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -328,7 +328,7 @@ namespace Umbraco.Web } catch (Exception ex) { - _logger.Error("Could not dispose item with key " + k, ex); + _logger.Error(ex, "Could not dispose item with key {Key}", k); } try { @@ -336,7 +336,7 @@ namespace Umbraco.Web } catch (Exception ex) { - _logger.Error("Could not dispose item key " + k, ex); + _logger.Error(ex, "Could not dispose item key {Key}", k); } } } From 46ace7dc229f00bc0ab1d02f861b39e63bc24d39 Mon Sep 17 00:00:00 2001 From: Andrey Karandashov <51944778+AndreyKarandashovUKAD@users.noreply.github.com> Date: Sun, 21 Feb 2021 12:15:32 +0200 Subject: [PATCH 09/99] added swedish translations for media picker (#9730) --- src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml index 511765e604..8c282dd571 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml @@ -243,10 +243,10 @@ Installera Umbraco Forms - Stanna - Ignorera ändringar - Du har ändringar som inte är sparade - Vill du verkligen lämna sidan? Du har ändringar som inte är sparade + Stay + Discard changes + You have unsaved changes + Are you sure you want to navigate away from this page? - you have unsaved changes Klar @@ -272,6 +272,8 @@ Kopierade %0% av %1% objekt + Länktitel + Länk Namn Hantera domännamn Stäng fönstret @@ -308,7 +310,9 @@ Cache för webbplatsen har uppdaterats. Allt publicerat innehåll är nu uppdaterat. Innehåll som inte har publicerats är fortfarande opublicerat. Webbplatsens cache kommer att uppdateras. Allt innehåll som är publicerat kommer att uppdateras. Innehåll som inte är publicerat kommer att förbli opublicerat. Välj startnod för innehåll + Välj media Välj ikon + Välj länk Välj startnod för media Välj användargrupper Välj sektioner @@ -318,6 +322,9 @@ Klicka på förhandsgranskningsbilden för att se bilden i full storlek Välj ett objekt Se cachat objekt + Länk till sida + Öppnar länken i ett nytt fönster eller flik + Länk till media Redigera de olika översättningarna för ordboksinlägget %0% nedan. Du kan lägga till ytterligare språk under 'språk' i menyn till vänster. @@ -741,8 +748,8 @@ Flikar - Sortera ordningen - Skapandedatum + Sort order + Creation date Sortering klar Välj i vilken ordning du vill ha sidorna genom att dra dem upp eller ner i listan. Du kan också klicka på kolumnrubrikerna för att sortera grupper av sidor @@ -815,12 +822,12 @@ Bild - Makro + Macro Lägg till - Välj utformning + Choose layout Lägg till rad - Lägg till innehåll - Släpp innehåll + Add content + Drop content Indholdet er ikke tilladt her Indholdet er tilladt her Klicka för att lägga in @@ -847,7 +854,7 @@ Alternativt fält Alternativ text - Hölje + Casing Välj fält Konvertera radbrytningar Byter radbrytningar mot html-taggen &lt;br&gt; @@ -963,7 +970,7 @@ Senast utlåst Senast inloggad Lösenordet ändrades - Logga in + Login Startnod i mediabiblioteket Begränsa media sectionen till en specifik startnod Media startnoder From d966e89fd97edb9986516259456465f2fad03261 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 11:36:18 +0100 Subject: [PATCH 10/99] Block editor cleanup (#9664) --- .../blockeditor/blockeditor.controller.js | 5 +-- .../blockeditor/blockeditor.html | 18 +++-------- .../umbBlockListPropertyEditor.component.js | 32 +++++++++---------- ...tPropertyEditor.createButton.controller.js | 4 +-- .../blocklist/umbblocklistblock.component.js | 2 +- 5 files changed, 27 insertions(+), 34 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js index 88cda027a8..d3a87791f9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js @@ -1,6 +1,7 @@ angular.module("umbraco") .controller("Umbraco.Editors.BlockEditorController", function ($scope, localizationService, formHelper, overlayService) { + var vm = this; vm.model = $scope.model; @@ -52,7 +53,7 @@ angular.module("umbraco") vm.saveButtonState = "error"; } } - } + }; vm.close = function () { if (vm.model && vm.model.close) { @@ -93,7 +94,7 @@ angular.module("umbraco") } } - } + }; } ); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.html index 2367771804..8fe5526c53 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.html @@ -1,4 +1,4 @@ -
+
@@ -14,20 +14,12 @@ hide-description="true"> -
+ - + + -
- - -
- -
+ diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js index 56dbc68d90..613e6a8c6a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js @@ -241,23 +241,24 @@ block.hideContentInOverlay = block.config.forceHideContentEditorInOverlay === true || inlineEditing === true; block.showSettings = block.config.settingsElementTypeKey != null; - block.showCopy = vm.supportCopy && block.config.contentElementTypeKey != null;// if we have content, otherwise it doesn't make sense to copy. + // If we have content, otherwise it doesn't make sense to copy. + block.showCopy = vm.supportCopy && block.config.contentElementTypeKey != null; // Index is set by umbblocklistblock component and kept up to date by it. block.index = 0; block.setParentForm = function (parentForm) { this._parentForm = parentForm; - } + }; block.activate = activateBlock.bind(null, block); block.edit = function () { var blockIndex = vm.layout.indexOf(this.layout); editBlock(this, false, blockIndex, this._parentForm); - } + }; block.editSettings = function () { var blockIndex = vm.layout.indexOf(this.layout); editBlock(this, true, blockIndex, this._parentForm); - } + }; block.requestDelete = requestDeleteBlock.bind(null, block); block.delete = deleteBlock.bind(null, block); block.copy = copyBlock.bind(null, block); @@ -265,7 +266,6 @@ return block; } - function addNewBlock(index, contentElementTypeKey) { // Create layout entry. (not added to property model jet.) @@ -292,7 +292,6 @@ vm.setBlockFocus(blockObject); return true; - } function deleteBlock(block) { @@ -316,7 +315,6 @@ }); modelObject.removeDataAndDestroyModel(block); - } function deleteAllBlocks() { @@ -409,6 +407,7 @@ } vm.showCreateDialog = showCreateDialog; + function showCreateDialog(createIndex, $event) { if (vm.blockTypePicker) { @@ -524,7 +523,7 @@ }; - var requestCopyAllBlocks = function() { + var requestCopyAllBlocks = function () { var aliases = []; @@ -534,7 +533,7 @@ aliases.push(entry.$block.content.contentTypeAlias); // No need to clone the data as its begin handled by the clipboardService. - return {"layout": entry.$block.layout, "data": entry.$block.data, "settingsData":entry.$block.settingsData} + return { "layout": entry.$block.layout, "data": entry.$block.data, "settingsData": entry.$block.settingsData } } ); @@ -543,9 +542,9 @@ var contentNodeName = "?"; var contentNodeIcon = null; - if(vm.umbVariantContent) { + if (vm.umbVariantContent) { contentNodeName = vm.umbVariantContent.editor.content.name; - if(vm.umbVariantContentEditors) { + if (vm.umbVariantContentEditors) { contentNodeIcon = vm.umbVariantContentEditors.content.icon.split(" ")[0]; } else if (vm.umbElementEditorContent) { contentNodeIcon = vm.umbElementEditorContent.model.documentType.icon.split(" ")[0]; @@ -555,13 +554,15 @@ contentNodeIcon = vm.umbElementEditorContent.model.documentType.icon.split(" ")[0]; } - localizationService.localize("clipboard_labelForArrayOfItemsFrom", [vm.model.label, contentNodeName]).then(function(localizedLabel) { + localizationService.localize("clipboard_labelForArrayOfItemsFrom", [vm.model.label, contentNodeName]).then(function (localizedLabel) { clipboardService.copyArray(clipboardService.TYPES.BLOCK, aliases, elementTypesToCopy, localizedLabel, contentNodeIcon || "icon-thumbnail-list", vm.model.id); }); - } + }; + function copyBlock(block) { clipboardService.copy(clipboardService.TYPES.BLOCK, block.content.contentTypeAlias, {"layout": block.layout, "data": block.data, "settingsData":block.settingsData}, block.label, block.content.icon, block.content.udi); } + function requestPasteFromClipboard(index, pasteEntry, pasteType) { if (pasteEntry === undefined) { @@ -599,7 +600,6 @@ vm.currentBlockInFocus = blockObject; return true; - } function requestDeleteBlock(block) { @@ -620,6 +620,7 @@ overlayService.confirmDelete(overlay); }); } + function requestDeleteAllBlocks() { localizationService.localizeMany(["content_nestedContentDeleteAllItems", "general_delete"]).then(function (data) { overlayService.confirmDelete({ @@ -647,7 +648,7 @@ requestDeleteBlock: requestDeleteBlock, deleteBlock: deleteBlock, openSettingsForBlock: openSettingsForBlock - } + }; vm.sortableOptions = { axis: "y", @@ -664,7 +665,6 @@ } }; - function onAmountOfBlocksChanged() { // enable/disable property actions diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.createButton.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.createButton.controller.js index 98d4f4ea3a..365ec809ac 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.createButton.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.createButton.controller.js @@ -9,9 +9,9 @@ var vm = this; vm.plusPosX = 0; - vm.onMouseMove = function($event) { + vm.onMouseMove = function ($event) { vm.plusPosX = $event.offsetX; - } + }; }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js index 41d76475e4..285437b011 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js @@ -78,7 +78,7 @@ model.block.index = index; model.block.updateLabel(); } - } + }; } From 616992332a720a575ac3e4550c3ff12f665323c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fatay=20UNCU?= <34659246+cagatayuncu@users.noreply.github.com> Date: Sun, 21 Feb 2021 13:40:51 +0300 Subject: [PATCH 11/99] Clean Code and use async methed (#9747) --- src/Umbraco.Web/AspNetHttpContextAccessor.cs | 10 ++-------- src/Umbraco.Web/FormDataCollectionExtensions.cs | 4 ++-- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 2 +- src/Umbraco.Web/HttpUrlHelperExtensions.cs | 4 ++-- src/Umbraco.Web/HybridEventMessagesAccessor.cs | 4 ++-- src/Umbraco.Web/ModelStateExtensions.cs | 4 ++-- .../WebApi/AngularJsonMediaTypeFormatter.cs | 4 ++-- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Web/AspNetHttpContextAccessor.cs b/src/Umbraco.Web/AspNetHttpContextAccessor.cs index babd8dfcfa..147c37fe8c 100644 --- a/src/Umbraco.Web/AspNetHttpContextAccessor.cs +++ b/src/Umbraco.Web/AspNetHttpContextAccessor.cs @@ -7,14 +7,8 @@ namespace Umbraco.Web { public HttpContext HttpContext { - get - { - return HttpContext.Current; - } - set - { - throw new NotSupportedException(); - } + get => HttpContext.Current; + set => throw new NotSupportedException(); } } } diff --git a/src/Umbraco.Web/FormDataCollectionExtensions.cs b/src/Umbraco.Web/FormDataCollectionExtensions.cs index aabf13ac9b..ebabaa74c7 100644 --- a/src/Umbraco.Web/FormDataCollectionExtensions.cs +++ b/src/Umbraco.Web/FormDataCollectionExtensions.cs @@ -23,9 +23,9 @@ namespace Umbraco.Web if (items.Any() == false) return ""; var builder = new StringBuilder(); - foreach (var i in items.Where(i => keysToIgnore.InvariantContains(i.Key) == false)) + foreach (var (key, value) in items.Where(i => keysToIgnore.InvariantContains(i.Key) == false)) { - builder.Append(string.Format("{0}={1}&", i.Key, i.Value)); + builder.Append($"{key}={value}&"); } return builder.ToString().TrimEnd(Constants.CharArrays.Ampersand); } diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index e19ae883e9..2f55f0a1b1 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -85,7 +85,7 @@ namespace Umbraco.Web var cacheKey = new StringBuilder(partialViewName); //let's always cache by the current culture to allow variants to have different cache results var cultureName = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; - if (!String.IsNullOrEmpty(cultureName)) + if (!string.IsNullOrEmpty(cultureName)) { cacheKey.AppendFormat("{0}-", cultureName); } diff --git a/src/Umbraco.Web/HttpUrlHelperExtensions.cs b/src/Umbraco.Web/HttpUrlHelperExtensions.cs index 4e5533d327..9a2f394d90 100644 --- a/src/Umbraco.Web/HttpUrlHelperExtensions.cs +++ b/src/Umbraco.Web/HttpUrlHelperExtensions.cs @@ -103,7 +103,7 @@ namespace Umbraco.Web string routeName; if (area.IsNullOrWhiteSpace()) { - routeName = string.Format("umbraco-{0}-{1}", "api", controllerName); + routeName = $"umbraco-{"api"}-{controllerName}"; if (id == null) { return url.Route(routeName, new { controller = controllerName, action = actionName, httproute = "" }); @@ -115,7 +115,7 @@ namespace Umbraco.Web } else { - routeName = string.Format("umbraco-{0}-{1}-{2}", "api", area, controllerName); + routeName = $"umbraco-{"api"}-{area}-{controllerName}"; if (id == null) { return url.Route(routeName, new { controller = controllerName, action = actionName, httproute = "" }); diff --git a/src/Umbraco.Web/HybridEventMessagesAccessor.cs b/src/Umbraco.Web/HybridEventMessagesAccessor.cs index fddde403d8..ab67b4774f 100644 --- a/src/Umbraco.Web/HybridEventMessagesAccessor.cs +++ b/src/Umbraco.Web/HybridEventMessagesAccessor.cs @@ -12,8 +12,8 @@ namespace Umbraco.Web public EventMessages EventMessages { - get { return Value; } - set { Value = value; } + get => Value; + set => Value = value; } } } diff --git a/src/Umbraco.Web/ModelStateExtensions.cs b/src/Umbraco.Web/ModelStateExtensions.cs index e224a6122b..2b0cd01e21 100644 --- a/src/Umbraco.Web/ModelStateExtensions.cs +++ b/src/Umbraco.Web/ModelStateExtensions.cs @@ -24,11 +24,11 @@ namespace Umbraco.Web { if (dictionary == null) return; - foreach (var keyValuePair in dictionary + foreach (var (key, value) in dictionary //It can either equal the prefix exactly (model level errors) or start with the prefix. (property level errors) .Where(keyValuePair => keyValuePair.Key == prefix || keyValuePair.Key.StartsWith(prefix + "."))) { - state[keyValuePair.Key] = keyValuePair.Value; + state[key] = value; } } diff --git a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs index 0e7cf6453a..874afce0e1 100644 --- a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs +++ b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs @@ -47,8 +47,8 @@ namespace Umbraco.Web.WebApi { //write the special encoding for angular json to the start // (see: http://docs.angularjs.org/api/ng.$http) - streamWriter.Write(XsrfPrefix); - streamWriter.Flush(); + await streamWriter.WriteAsync(XsrfPrefix); + await streamWriter.FlushAsync(); await base.WriteToStreamAsync(type, value, writeStream, content, transportContext); } } From 63b417477b156f633cc4fd12c78aa28ce638679c Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 11:42:06 +0100 Subject: [PATCH 12/99] Replace tree icon in section picker with umb-icon component (#9760) --- .../infiniteeditors/sectionpicker/sectionpicker.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/sectionpicker/sectionpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/sectionpicker/sectionpicker.html index feb3b9ab53..452f4b2364 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/sectionpicker/sectionpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/sectionpicker/sectionpicker.html @@ -19,10 +19,15 @@
    -
  • +
  • -
    From f4e1b469683847d5596a73890715d0f434541d30 Mon Sep 17 00:00:00 2001 From: Jakob Bagterp <25110864+jakob-bagterp@users.noreply.github.com> Date: Sun, 21 Feb 2021 11:47:35 +0100 Subject: [PATCH 13/99] Fix: Verify that grid model is JSON object and not IPublishedContent (#9774) --- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml | 2 +- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml index 131b0515ae..bef1b88879 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml @@ -6,7 +6,7 @@ Razor helpers located at the bottom of this file *@ -@if (Model != null && Model.sections != null) +@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml index c30feb2165..801526aaeb 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml @@ -2,7 +2,7 @@ @using Umbraco.Web.Templates @using Newtonsoft.Json.Linq -@if (Model != null && Model.sections != null) +@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; From 43a77dc1e458b6f4e600f198a285dc48b5ea7d56 Mon Sep 17 00:00:00 2001 From: patrickdemooij9 Date: Sun, 21 Feb 2021 11:52:49 +0100 Subject: [PATCH 14/99] 9569: Fix image cropper buttons (#9777) --- .../views/propertyeditors/imagecropper/imagecropper.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html index 91abc3be87..84ddf7ee3b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html @@ -28,9 +28,9 @@
- - - + + +
From f167f022c150115d9f319cb39a2ced00089d0f6e Mon Sep 17 00:00:00 2001 From: Nathan Woulfe Date: Sun, 21 Feb 2021 21:00:22 +1000 Subject: [PATCH 15/99] 9769 - shift index increment before tryget to allow loop to continue if current iteration exits early (#9799) --- .../Repositories/Implement/ContentTypeCommonRepository.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs index 90774e4c0b..ec998660fd 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs @@ -171,9 +171,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement while (compositionIx < compositionDtos.Count && compositionDtos[compositionIx].ChildId == contentType.Id) { var parentDto = compositionDtos[compositionIx]; - if (!contentTypes.TryGetValue(parentDto.ParentId, out var parentContentType)) continue; - contentType.AddContentType(parentContentType); compositionIx++; + + if (!contentTypes.TryGetValue(parentDto.ParentId, out var parentContentType)) + continue; + contentType.AddContentType(parentContentType); } } } From fa49d6ed1082dc0ad82ada8fb98c5281ed13271e Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sun, 21 Feb 2021 22:03:28 +1100 Subject: [PATCH 16/99] Fixes: After deleting a member, a reindex is attempted, which fails (#9807) --- .../Cache/DistributedCacheExtensions.cs | 5 ++++- src/Umbraco.Web/Cache/MemberCacheRefresher.cs | 4 ++++ src/Umbraco.Web/Search/ExamineComponent.cs | 16 +++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs index f360d37d03..92a9dd6e98 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs @@ -135,7 +135,10 @@ namespace Umbraco.Web.Cache public static void RemoveMemberCache(this DistributedCache dc, params IMember[] members) { if (members.Length == 0) return; - dc.RefreshByPayload(MemberCacheRefresher.UniqueId, members.Select(x => new MemberCacheRefresher.JsonPayload(x.Id, x.Username))); + dc.RefreshByPayload(MemberCacheRefresher.UniqueId, members.Select(x => new MemberCacheRefresher.JsonPayload(x.Id, x.Username) + { + Removed = true + })); } #endregion diff --git a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs index 736a858af3..48ae40ce3b 100644 --- a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs @@ -33,6 +33,10 @@ namespace Umbraco.Web.Cache public int Id { get; } public string Username { get; } + // TODO: In netcore change this to be get only and adjust the ctor. We cannot do that now since that + // is a breaking change due to only having a single jsonconstructor allowed. + public bool Removed { get; set; } + } #region Define diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs index c9d7b7cf56..eb6b81ba16 100644 --- a/src/Umbraco.Web/Search/ExamineComponent.cs +++ b/src/Umbraco.Web/Search/ExamineComponent.cs @@ -271,10 +271,20 @@ namespace Umbraco.Web.Search break; case MessageType.RefreshByPayload: var payload = (MemberCacheRefresher.JsonPayload[])args.MessageObject; - var members = payload.Select(x => _services.MemberService.GetById(x.Id)); - foreach(var m in members) + foreach(var p in payload) { - ReIndexForMember(m); + if (p.Removed) + { + DeleteIndexForEntity(p.Id, false); + } + else + { + var m = _services.MemberService.GetById(p.Id); + if (m != null) + { + ReIndexForMember(m); + } + } } break; case MessageType.RefreshAll: From 1906ef02788fedb27980696118f2233940767d4b Mon Sep 17 00:00:00 2001 From: jesperweber Date: Sun, 21 Feb 2021 12:35:50 +0100 Subject: [PATCH 17/99] Updating danish translations (#9832) --- .../src/views/contentblueprints/intro.html | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/intro.html b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/intro.html index 66695ace91..57c29d31d6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/intro.html +++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/intro.html @@ -17,7 +17,7 @@ What are Content Templates?

- Content Templates are pre-defined content that can be selected when creating a new content node. + Content Templates are pre-defined content that can be selected when creating a new content node.

diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 494416d777..e8de8e55aa 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -307,6 +307,7 @@ Vælg dato og klokkeslæt for at udgive og/eller afpublicere indholdet. Opret ny Indsæt fra udklipsmappen + Dette element er i papirkurven Opret en ny indholdsskabelon fra '%0%' @@ -1691,10 +1692,14 @@ Mange hilsner fra Umbraco robotten Du kan kun have Tilføj op til elementer + URL(er) + URL(er) valgt elementer valgt Ugyldig dato Ikke et tal Ugyldig e-mail + Feltet er påkrævet + Feltet er påkrævet %1% mere.]]> %1% for mange.]]> @@ -1875,6 +1880,23 @@ Mange hilsner fra Umbraco robotten Error! The ElementType of this block does not exist anymore + + Hvad er Indholdsskabeloner? + Indholdsskabeloner er foruddefineret indhold der kan vælges når der oprettes nye indholdselementer. + Hvordan opretter jeg en Indholdsskabelon? + + Der er to måder at oprette Indholdsskabeloner på:

+
    +
  • Højreklik på en indholdsnode og vælg "Opret indholdsskabelon" for at oprette en ny Indholdsskabelon.
  • +
  • Højreklik på Indholdsskabeloner i sektionen Indstillinger og vælg den dokumenttype du vil oprette en Indholdsskabelon for.
  • +
+

Når indholdsskabelonen har fået et navn, kan redaktører begynde at bruge indholdsskabelonen som udgangspunkt for deres nye side.

+ ]]> +
+ Hvordan vedligeholder jeg Indholdsskabeloner? + Du kan redigere og slette Indholdsskabeloner fra "Indholdsskabeloner" i sektionen Indstillinger. Fold dokumenttypen som Indholdsskabelonen er baseret på ud og klik på den for at redigere eller slette den. + Afslut Afslut forhåndsvisning From 82701fbacd02cf8aefa26b88eb7ad7ea8b18de04 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 12:37:51 +0100 Subject: [PATCH 18/99] Fixes #9824 - Filtering in block picker doesn't work (#9831) --- .../blockpicker/blockpicker.controller.js | 22 +++++++------ .../blockpicker/blockpicker.html | 31 ++++++++++--------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js index 2894e0bef4..90803a3765 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js @@ -1,11 +1,14 @@ angular.module("umbraco") .controller("Umbraco.Editors.BlockPickerController", function ($scope, localizationService) { - var vm = this; + var vm = this; vm.navigation = []; + vm.filter = { + searchTerm: '' + }; localizationService.localizeMany(["blockEditor_tabCreateEmpty", "blockEditor_tabClipboard"]).then( function (data) { @@ -28,33 +31,32 @@ angular.module("umbraco") vm.activeTab = vm.navigation[0]; } ); - - vm.onNavigationChanged = function(tab) { + vm.onNavigationChanged = function (tab) { vm.activeTab.active = false; vm.activeTab = tab; vm.activeTab.active = true; - } + }; - vm.clickClearClipboard = function() { + vm.clickClearClipboard = function () { vm.onNavigationChanged(vm.navigation[0]); vm.navigation[1].disabled = true;// disabled ws determined when creating the navigation, so we need to update it here. vm.model.clipboardItems = [];// This dialog is not connected via the clipboardService events, so we need to update manually. vm.model.clickClearClipboard(); - } + }; vm.model = $scope.model; - vm.selectItem = function(item, $event) { + vm.selectItem = function (item, $event) { vm.model.selectedItem = item; vm.model.submit($scope.model, $event); - } + }; - vm.close = function() { + vm.close = function () { if ($scope.model && $scope.model.close) { $scope.model.close($scope.model); } - } + }; } ); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.html index 4b08d4e5fc..b72de0960d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.html @@ -12,35 +12,35 @@ hide-description="true"> -
+ -
+
- -
+
+
-
+ From 01991db257405bf698132c4c63fbf25d99b00c90 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 12:42:20 +0100 Subject: [PATCH 19/99] Fixes #9625 - Searching icons for "box" returns all icons (#9848) --- .../infiniteeditors/iconpicker/iconpicker.controller.js | 4 ++++ .../views/common/infiniteeditors/iconpicker/iconpicker.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.controller.js index 59a9aed4bb..51c2c15898 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.controller.js @@ -10,6 +10,10 @@ function IconPickerController($scope, localizationService, iconHelper) { var vm = this; + vm.filter = { + searchTerm: '' + }; + vm.selectIcon = selectIcon; vm.selectColor = selectColor; vm.submit = submit; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.html index 7368d2f39b..19fe679189 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/iconpicker/iconpicker.html @@ -20,7 +20,7 @@
    -
  • +
  • From c11d07dede63e686e59f8382c899729c0e900448 Mon Sep 17 00:00:00 2001 From: Rachel Breeze Date: Sun, 21 Feb 2021 12:00:48 +0000 Subject: [PATCH 21/99] Performance and accessibility improvements on the embed screen (#9810) --- .../infiniteeditors/embed/embed.controller.js | 38 +++++++++++++------ .../common/infiniteeditors/embed/embed.html | 17 +++++---- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.controller.js index c3d1312109..e29ba996c7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.controller.js @@ -18,8 +18,11 @@ preview: "", success: false, info: "", - supportsDimensions: false - }; + a11yInfo: "", + supportsDimensions: false, + originalWidth: 360, + originalHeight: 240 + }; if ($scope.model.modify) { Utilities.extend($scope.model.embed, $scope.model.modify); @@ -32,8 +35,8 @@ vm.changeSize = changeSize; vm.submit = submit; vm.close = close; - - function onInit() { + + function onInit() { if (!$scope.model.title) { localizationService.localize("general_embed").then(function(value){ $scope.model.title = value; @@ -46,8 +49,8 @@ if ($scope.model.embed.url) { $scope.model.embed.show = true; $scope.model.embed.info = ""; + $scope.model.embed.a11yInfo = ""; $scope.model.embed.success = false; - vm.loading = true; $http({ @@ -67,6 +70,7 @@ //not supported $scope.model.embed.preview = ""; $scope.model.embed.info = "Not supported"; + $scope.model.embed.a11yInfo = $scope.model.embed.info; $scope.model.embed.success = false; $scope.model.embed.supportsDimensions = false; vm.trustedPreview = null; @@ -75,6 +79,7 @@ //error $scope.model.embed.preview = ""; $scope.model.embed.info = "Could not embed media - please ensure the URL is valid"; + $scope.model.embed.a11yInfo = $scope.model.embed.info; $scope.model.embed.success = false; $scope.model.embed.supportsDimensions = false; vm.trustedPreview = null; @@ -83,6 +88,8 @@ $scope.model.embed.success = true; $scope.model.embed.supportsDimensions = response.data.SupportsDimensions; $scope.model.embed.preview = response.data.Markup; + $scope.model.embed.info = ""; + $scope.model.embed.a11yInfo = "Retrieved URL"; vm.trustedPreview = $sce.trustAsHtml(response.data.Markup); break; } @@ -94,24 +101,28 @@ $scope.model.embed.supportsDimensions = false; $scope.model.embed.preview = ""; $scope.model.embed.info = "Could not embed media - please ensure the URL is valid"; - + $scope.model.embed.a11yInfo = $scope.model.embed.info; vm.loading = false; }); } else { $scope.model.embed.supportsDimensions = false; $scope.model.embed.preview = ""; $scope.model.embed.info = "Please enter a URL"; + $scope.model.embed.a11yInfo = $scope.model.embed.info; } } function changeSize(type) { - var width, height; + var width = parseInt($scope.model.embed.width, 10); + var height = parseInt($scope.model.embed.height, 10); + var originalWidth = parseInt($scope.model.embed.originalWidth, 10); + var originalHeight = parseInt($scope.model.embed.originalHeight, 10); + var resize = originalWidth !== width || originalHeight !== height; if ($scope.model.embed.constrain) { - width = parseInt($scope.model.embed.width, 10); - height = parseInt($scope.model.embed.height, 10); - if (type == 'width') { + + if (type === 'width') { origHeight = Math.round((width / origWidth) * height); $scope.model.embed.height = origHeight; } else { @@ -119,9 +130,12 @@ $scope.model.embed.width = origWidth; } } - if ($scope.model.embed.url !== "") { + $scope.model.embed.originalWidth = $scope.model.embed.width; + $scope.model.embed.originalHeight = $scope.model.embed.height; + if ($scope.model.embed.url !== "" && resize) { showPreview(); } + } function toggleConstrain() { @@ -138,7 +152,7 @@ if ($scope.model && $scope.model.close) { $scope.model.close(); } - } + } onInit(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html index 19cf9b2278..fd86f55c07 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html @@ -15,7 +15,7 @@ - + -

    + +
    - - + + - - + + - - + +
    From 01e572b7420a9dd4e2c16d928bb3bc5beffd528f Mon Sep 17 00:00:00 2001 From: Malthe Petersen Date: Sun, 21 Feb 2021 16:51:03 +0100 Subject: [PATCH 22/99] Change access level for TreeChanged event in Media and ContentService (#9487) --- src/Umbraco.Core/Services/Changes/TreeChange.cs | 2 +- src/Umbraco.Core/Services/Implement/ContentService.cs | 2 +- src/Umbraco.Core/Services/Implement/MediaService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Services/Changes/TreeChange.cs b/src/Umbraco.Core/Services/Changes/TreeChange.cs index 81c9b67c3f..605cde87a2 100644 --- a/src/Umbraco.Core/Services/Changes/TreeChange.cs +++ b/src/Umbraco.Core/Services/Changes/TreeChange.cs @@ -3,7 +3,7 @@ using System.Linq; namespace Umbraco.Core.Services.Changes { - internal class TreeChange + public class TreeChange { public TreeChange(TItem changedItem, TreeChangeTypes changeTypes) { diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index a809b83f23..8b1af5ca31 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -2606,7 +2606,7 @@ namespace Umbraco.Core.Services.Implement /// /// Occurs after change. /// - internal static event TypedEventHandler.EventArgs> TreeChanged; + public static event TypedEventHandler.EventArgs> TreeChanged; /// /// Occurs after a blueprint has been saved. diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index ac9c83458d..ec84c0738e 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -1279,7 +1279,7 @@ namespace Umbraco.Core.Services.Implement /// /// Occurs after change. /// - internal static event TypedEventHandler.EventArgs> TreeChanged; + public static event TypedEventHandler.EventArgs> TreeChanged; #endregion From 033a245a21f64f55d27b96ad929056a887210211 Mon Sep 17 00:00:00 2001 From: vidyesh-phases <44634042+vidyesh-phases@users.noreply.github.com> Date: Sun, 21 Feb 2021 21:22:43 +0530 Subject: [PATCH 23/99] Added UmbracoAuthorize attribute for BackOfficeController.ExternalLinkLoginCallback (#9500) --- src/Umbraco.Web/Editors/BackOfficeController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 92b67cbf1b..ff618ba0a6 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -351,6 +351,7 @@ namespace Umbraco.Web.Editors return RedirectToLocal(Url.Action("Default", "BackOffice")); } + [UmbracoAuthorize] [HttpGet] public async Task ExternalLinkLoginCallback() { From 6cc005315de28512de85a8794890c482e1fd66c7 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Sun, 21 Feb 2021 15:57:23 +0000 Subject: [PATCH 24/99] Unhelpful unsupported property message in Block Editor (#9525) --- .../src/views/propertyeditors/notsupported/notsupported.html | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml | 3 +-- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/notsupported/notsupported.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/notsupported/notsupported.html index a2fbb0e907..f052415a05 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/notsupported/notsupported.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/notsupported/notsupported.html @@ -1,3 +1,3 @@
    - +
    diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml index eacfcde1bf..a667f0d3c6 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml @@ -676,7 +676,6 @@ %0% yn faes ofynnol %0% yn %1% mewn fformat annilys %0% mewn fformat annilys - Briodwedd '%0%' yn defnyddio'r golygydd '%1%' sydd ddim wedi ei chynnal yn y teipiau elfen. Derbynwyd gwall o'r gweinydd @@ -701,7 +700,6 @@ Symudwch y cyrchwr ar ochr chwith y ddwy gell yr ydych eisiau cyfuno Ni allwch hollti cell sydd heb ei gyfuno. Mae gan briodwedd hon gwallau - Priodwedd '%0%' yn defnyddio'r golygydd '%1%' sydd ddim yn cael ei gefnogi mewn Mathau o Elfen. Gwall yn y ffynhonnell XSLT Nid yw'r XSLTwedi'i achub gan ei fod yn cynnwys gwall(au) Mae gwall ffurfwedd gyda'r math o ddata sy'n cael ei ddefnyddio ar gyfer y priodwedd yma, gwiriwch y fath o ddata @@ -2763,6 +2761,7 @@ Er mwyn gweinyddu eich gwefan, agorwch swyddfa gefn Umbraco a dechreuwch ychwang Rydych chi wedi gwneud newidiadau i'r cynnwys hwn. Wyt ti'n siŵr eich bod chi am eu taflu ei fwrdd? Gwaredu cread? + Priodwedd '%0%' yn defnyddio'r golygydd '%1%' sydd ddim yn cael ei gefnogi mewn blociau. Beth yw Templedi Gynnwys diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index e8de8e55aa..f2a35c4873 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -624,7 +624,6 @@ Du skal stå til venstre for de 2 celler du ønsker at samle! Du kan ikke opdele en celle, som ikke allerede er delt. Denne egenskab er ugyldig - Feltet %0% bruger editor %1% som ikke er supporteret for ElementTyper. Om @@ -1879,6 +1878,7 @@ Mange hilsner fra Umbraco robotten Error! The ElementType of this block does not exist anymore + Feltet %0% bruger editor %1% som ikke er supporteret for blokke. Hvad er Indholdsskabeloner? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index c6a5ce4821..f6dc5ba8eb 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -636,7 +636,6 @@ %0% is a mandatory field %0% at %1% is not in a correct format %0% is not in a correct format - Property '%0%' uses editor '%1%' which is not supported in Element Types. Received an error from the server @@ -2526,6 +2525,7 @@ To manage your website, simply open the Umbraco back office and start adding con Error! The ElementType of this block does not exist anymore + Property '%0%' uses editor '%1%' which is not supported in blocks. What are Content Templates? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index ad5992a195..cc1bb5843a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -660,7 +660,6 @@ Please place cursor at the left of the two cells you wish to merge You cannot split a cell that hasn't been merged. This property is invalid - Property '%0%' uses editor '%1%' which is not supported in Element Types. Options @@ -2548,6 +2547,7 @@ To manage your website, simply open the Umbraco back office and start adding con Error! The ElementType of this block does not exist anymore + Property '%0%' uses editor '%1%' which is not supported in blocks. What are Content Templates? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml index 11049a279c..2a24600a7c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml @@ -650,7 +650,6 @@ Plaats de cursor links van de twee cellen die je wilt samenvoegen Je kunt een cel die is samengevoegd niet delen Deze eigenschap is ongeldig - Eigenschap '%0%' gebruikt editor '%1%' die niet ondersteund wordt in Element Types. Opties @@ -2362,6 +2361,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Fout! Het Elementtype van dit blok bestaat niet meer + Eigenschap '%0%' gebruikt editor '%1%' die niet ondersteund wordt in blokken. Wat zijn Inhoudssjablonen? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml index fa0f909bfb..67fa7adcc4 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml @@ -631,7 +631,6 @@ %0% zorunlu bir alandır %1% konumunda %0% doğru biçimde değil %0% doğru biçimde değil - '%0%' özelliği, Öğe Türlerinde desteklenmeyen '%1%' düzenleyicisini kullanıyor. Sunucudan bir hata aldı @@ -2575,6 +2574,7 @@ Web sitenizi yönetmek için, Umbraco'nun arka ofisini açın ve içerik eklemey Hata! Bu bloğun ElementType'ı artık mevcut değil + '%0%' özelliği, bloklarda desteklenmeyen '%1%' düzenleyicisini kullanıyor. İçerik Şablonları Nedir? From 1235520325e8cbc4c314a357fddb3f21b1026eff Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Sun, 21 Feb 2021 16:01:49 +0000 Subject: [PATCH 25/99] Fix consistency in translation files for the term backoffice, Umbraco and several entity types (#9526) --- src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml | 27 +++--- src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 6 +- src/Umbraco.Web.UI/Umbraco/config/lang/de.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 91 +++++++++--------- .../Umbraco/config/lang/en_us.xml | 93 +++++++++---------- src/Umbraco.Web.UI/Umbraco/config/lang/es.xml | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/he.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/it.xml | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml | 1 - src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml | 5 +- src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml | 3 +- src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml | 1 - .../Umbraco/config/lang/zh_tw.xml | 1 - 20 files changed, 122 insertions(+), 139 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml index 2375ebaf6d..61c4abcade 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml @@ -373,7 +373,7 @@ Prohlédnout svůj web - Skrýt - Jestli se umbraco neotevírá, možná budete muset povolit na tomto webu vyskakovací okna + Jestli se Umbraco neotevírá, možná budete muset povolit na tomto webu vyskakovací okna byl otevřený v novém okně Restart Navštívit @@ -837,29 +837,29 @@ Heslo výchozího uživatele bylo úspěšně změněno od doby instalace!

    Netřeba nic dalšího dělat. Klikněte na Následující pro pokračování.]]> Heslo je změněno! Mějte skvělý start, sledujte naše uváděcí videa - Kliknutím na tlačítko následující (nebo modifikováním umbracoConfigurationStatus v souboru web.config) přijímáte licenci tohoto software tak, jak je uvedena v poli níže. Upozorňujeme, že tato distribuce Umbraca se skládá ze dvou různých licencí, open source MIT licence pro framework a umbraco freeware licence, která pokrývá UI. + Kliknutím na tlačítko následující (nebo modifikováním umbracoConfigurationStatus v souboru web.config) přijímáte licenci tohoto software tak, jak je uvedena v poli níže. Upozorňujeme, že tato distribuce Umbraca se skládá ze dvou různých licencí, open source MIT licence pro framework a Umbraco freeware licence, která pokrývá UI. Není nainstalováno. Dotčené soubory a složky - Další informace o nastavování oprávnění pro umbraco zde + Další informace o nastavování oprávnění pro Umbraco zde Musíte udělit ASP.NET oprávnění měnit následující soubory/složky Vaše nastavení oprávnění je téměř dokonalé!

    - Můžete provozovat umbraco bez potíží, ale nebudete smět instalovat balíčky, které jsou doporučené pro plné využívání všech možností umbraca.]]>
    + Můžete provozovat Umbraco bez potíží, ale nebudete smět instalovat balíčky, které jsou doporučené pro plné využívání všech možností umbraca.]]> Jak to vyřešit Klikněte zde, chcete-li číst textovou verzi výukové video o nastavovaní oprávnění pro složky umbraca, nebo si přečtěte textovou verzi.]]> Vaše nastavení oprávnění může být problém!

    - Můžete provozovat umbraco bez potíží, ale nebudete smět vytvářet složky a instalovat balíčky, které jsou doporučené pro plné využívání všech možností umbraca.]]>
    + Můžete provozovat Umbraco bez potíží, ale nebudete smět vytvářet složky a instalovat balíčky, které jsou doporučené pro plné využívání všech možností umbraca.]]> Vaše nastavení oprívnění není připraveno pro umbraco!

    - Abyste mohli umbraco provozovat, budete muset aktualizovat Vaše nastavení oprávnění.]]>
    + Abyste mohli Umbraco provozovat, budete muset aktualizovat Vaše nastavení oprávnění.]]> Vaše nastavení oprávnění je dokonalé!

    - Jste připraveni provozovat umbraco a instalovat balíčky!]]>
    + Jste připraveni provozovat Umbraco a instalovat balíčky!]]> Řešení potíží se složkami Následujte tento odkaz pro další informace o potížích s ASP.NET a vytvářením složek. Nastavování oprávnění pro složky Chci začít od nuly @@ -898,7 +898,7 @@ Abyste získali pomoc od naší oceňované komunity, projděte si dokumentaci, nebo si pusťte některá videa zdarma o tom, jak vytvořit jednoduchý web, jak používat balíčky a rychlý úvod do terminologie umbraca]]> Umbraco %0% je nainstalováno a připraveno k použití soubor /web.config a upravit klíč AppSetting umbracoConfigurationStatus dole na hodnotu '%0%'.]]> - ihned začít kliknutím na tlačítko "Spustit Umbraco" níže.
    Jestliže je pro Vás umbraco nové, + ihned začít kliknutím na tlačítko "Spustit Umbraco" níže.
    Jestliže je pro Vás Umbraco nové, spoustu zdrojů naleznete na naších stránkách "začínáme".]]>
    Spustit Umbraco

Chcete-li spravovat Váš web, jednoduše přejděte do administrace umbraca a začněte přidávat obsah, upravovat šablony a stylopisy, nebo přidávat nové funkce]]> @@ -980,7 +980,7 @@ Vyžadováno resetování hesla

- Vaše uživatelské jméno pro přihlášení do back-office Umbraco je: %0% + Vaše uživatelské jméno pro přihlášení do backoffice Umbraco je: %0%

@@ -1055,7 +1055,7 @@ Mějte hezký den! - Zdraví umbraco robot + Zdraví Umbraco robot ]]>Následující jazyky byly změněny %0%Ahoj %0%

@@ -1083,7 +1083,7 @@

Mějte hezký den!

- Zdraví umbraco robot + Zdraví Umbraco robot

]]>
Byly změněny následující jazyky:

%0% @@ -1097,7 +1097,7 @@ Vytvořit balíček - a výběrem balíčku. Balíčky umbraco mají obvykle přípony ".umb" nebo ".zip". + a výběrem balíčku. Balíčky Umbraco mají obvykle přípony ".umb" nebo ".zip". ]]> Tím se balíček odstraní Přetáhněte sem pro nahrání @@ -1328,7 +1328,6 @@ Záložky Nadřazený typ obsahu povolen Tento typ obsahu používá - jako nadřazený typ obsahu. Záložky z nadřazených typů obsahu nejsou zobrazeny a mohou byt editovány pouze na nadřazených typech obsahu samotných Na této záložce nejsou definovány žádné vlastnosti. Pro vytvoření nové vlastnosti klikněte na odkaz "přidat novou vlastnost" nahoře. Vytvořit odpovídající šablonu Přidat ikonu diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml index a667f0d3c6..0b00cfd423 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml @@ -589,7 +589,7 @@ Offer i reoli'r mynegai meysydd Ni ellir darllen yr mynegai a bydd angen ei ailadeiladu - Mae'r broses yn cymryd mwy o amser na'r disgwyl, gwiriwch y log umbraco i weld os mae wedi bod unrhyw wall yn ystod y gweithrediad hwn + Mae'r broses yn cymryd mwy o amser na'r disgwyl, gwiriwch y log Umbraco i weld os mae wedi bod unrhyw wall yn ystod y gweithrediad hwn Ni ellir ailadeiladu'r mynegai hwn oherwydd nad yw wedi'i aseinio IIndexPopulator @@ -1564,7 +1564,6 @@ Er mwyn gweinyddu eich gwefan, agorwch swyddfa gefn Umbraco a dechreuwch ychwang Tabiau Math o Gynnwys Meistr wedi'i alluogi Mae'r Math o Gynnwys yma yn defnyddio - fel Math o Gynnwys Meistr. Nid yw tabiau o Fath o Gynnwys Meistr yn cael eu dangos a gall dim ond eu golygu ar y Math o Gynnwys Meistr ei hunan Dim priodweddau wedi'u diffinio ar y tab yma. Cliciwch ar y ddolen "ychwanegu priodwedd newydd" ar y topi greu priodwedd newydd. Math o Ddogfen Feistr Creu templedi cydweddol diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index f2a35c4873..309b05ccf3 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -949,7 +949,7 @@ Mange hilsner fra Umbraco robotten

Dette er en automatisk mail for at informere dig om at opgaven '%1%' er blevet udførtpå siden '%2%' af brugeren '%3%'

Opdateringssammendrag:

%6%

Hav en fortsat god dag!

De bedste hilsner fra umbraco robotten

]]> +      RET       

Opdateringssammendrag:

%6%

Hav en fortsat god dag!

De bedste hilsner fra Umbraco robotten

]]> [%0%] Notificering om %1% udført på %2% Notificeringer @@ -1589,7 +1589,7 @@ Mange hilsner fra Umbraco robotten er ikke blevet låst ude Kodeordet er ikke blevet ændret Gentag dit nye kodeord - Du kan ændre dit kodeord, som giver dig adgang til Umbraco Back Office ved at udfylde formularen og klikke på knappen 'Skift dit kodeord' + Du kan ændre dit kodeord, som giver dig adgang til Umbraco backoffice ved at udfylde formularen og klikke på knappen 'Skift dit kodeord' Indholdskanal Opret endnu en bruger Opret nye brugere for at give dem adgang til Umbraco. Når en ny bruger oprettes, genereres der en adgangskode, som du kan dele med brugeren. @@ -1856,7 +1856,7 @@ Mange hilsner fra Umbraco robotten Label Speciel visning Vis speciel visning beskrivelsen - Overskrift hvordan denne block præsenteres i BackOffice interfacet. Vælg en .html fil der indeholder din præsensation. + Overskrift hvordan denne block præsenteres i backoffice interfacet. Vælg en .html fil der indeholder din præsensation. Indstillings model Rederings lagets størrelse Tilføj speciel visning diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml index 4f1c4c977f..b8c115c460 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/de.xml @@ -1388,7 +1388,6 @@ Registerkarten Masterdokumenttyp aktiviert Dieser Dokumenttyp verwendet - als Masterdokumenttyp. Register vom Masterdokumenttyp werden nicht angezeigt und können nur im Masterdokumenttyp selbst bearbeitet werden Für dieses Register sind keine Eigenschaften definiert. Klicken Sie oben auf "neue Eigenschaft hinzufügen", um eine neue Eigenschaft hinzuzufügen. Zugehörige Vorlage anlegen Bildsymbol hinzufügen diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index f6dc5ba8eb..dacb04d597 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -66,7 +66,7 @@ Allow access to assign culture and hostnames Allow access to view a node's history log Allow access to view a node - Allow access to change document type for a node + Allow access to change Document Type for a node Allow access to copy a node Allow access to create nodes Allow access to delete nodes @@ -190,12 +190,12 @@ History (all variants) - To change the document type for the selected content, first select from the list of valid types for this location. + To change the Document Type for the selected content, first select from the list of valid types for this location. Then confirm and/or amend the mapping of properties from the current type to the new, and click Save. The content has been re-published. Current Property Current type - The document type cannot be changed, as there are no alternatives valid for this location. An alternative will be valid if it is allowed under the parent of the selected content item and that all existing child content items are allowed to be created under it. + The Document Type cannot be changed, as there are no alternatives valid for this location. An alternative will be valid if it is allowed under the parent of the selected content item and that all existing child content items are allowed to be created under it. Document Type Changed Map Properties Map to Property @@ -204,7 +204,7 @@ none Content Select New Document Type - The document type of the selected content has been successfully changed to [new type] and the following properties mapped: + The Document Type of the selected content has been successfully changed to [new type] and the following properties mapped: to Could not complete property mapping as one or more properties have more than one mapping defined. Only alternate types valid for the current location are displayed. @@ -287,10 +287,10 @@ Are you sure you want to delete this item? Property %0% uses editor %1% which is not supported by Nested Content. Are you sure you want to delete all items? - No content types are configured for this property. - Add element type - Select element type - Select the group whose properties should be displayed. If left blank, the first group on the element type will be used. + No Content Types are configured for this property. + Add Element Type + Select Element Type + Select the group whose properties should be displayed. If left blank, the first group on the Element Type will be used. Enter an angular expression to evaluate against each item for its name. Use to display the item index Add another text box @@ -358,18 +358,18 @@ Where do you want to create the new %0% Create an item under - Select the document type you want to make a content template for + Select the Document Type you want to make a content template for Enter a folder name Choose a type and a title - Document Types within the Settings section, by editing the Allowed child node types under Permissions.]]> - Document Types within the Settings section.]]> + Document Types within the Settings section, by editing the Allowed child node types under Permissions.]]> + Document Types within the Settings section.]]> The selected page in the content tree doesn't allow for any pages to be created below it. - Edit permissions for this document type - Create a new document type - Document Types within the Settings section, by changing the Allow as root option under Permissions.]]> - Media Types Types within the Settings section, by editing the Allowed child node types under Permissions.]]> + Edit permissions for this Document Type + Create a new Document Type + Document Types within the Settings section, by changing the Allow as root option under Permissions.]]> + Media Types within the Settings section, by editing the Allowed child node types under Permissions.]]> The selected media in the tree doesn't allow for any other media to be created below it. - Edit permissions for this media type + Edit permissions for this Media Types Document Type without a template Document Type with Template The data definition for a content page that can be created by editors in the content tree and is directly accessible via a URL. @@ -382,7 +382,7 @@ Folder Used to organise the Document Types, Compositions and Element Types created in this Document Type tree. New folder - New data type + New Data Type New JavaScript file New empty partial view New partial view macro @@ -566,7 +566,7 @@ Tools to manage the index fields The index cannot be read and will need to be rebuilt - The process is taking longer than expected, check the umbraco log to see if there have been any errors during this operation + The process is taking longer than expected, check the Umbraco log to see if there have been any errors during this operation This index cannot be rebuilt because it has no assigned IIndexPopulator @@ -597,7 +597,7 @@ Create custom list view Remove custom list view - A content type, media type or member type with this alias already exists + A Content Type, Media Type or Member Type with this alias already exists Renamed @@ -617,9 +617,9 @@ Show label Width and height All property types & property data - using this data type will be deleted permanently, please confirm you want to delete these as well + using this Data Type will be deleted permanently, please confirm you want to delete these as well Yes, delete - and all property types & property data using this data type + and all property types & property data using this Data Type Select the folder to move to in the tree structure below was moved underneath @@ -908,7 +908,7 @@ ]]> I want to start from scratch learn how) You can still choose to install Runway later on. Please go to the Developer section and choose Packages. ]]> @@ -922,7 +922,7 @@ I want to start with a simple website - "Runway" is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically, + "Runway" is a simple website providing some basic Document Types and templates. The installer can set up Runway for you automatically, but you can easily edit, extend or remove it. It's not necessary and you can perfectly use Umbraco without it. However, Runway offers an easy foundation based on best practices to get you started faster than ever. If you choose to install Runway, you can optionally select basic building blocks called Runway Modules to enhance your Runway pages. @@ -949,7 +949,7 @@ Get help from our award winning community, browse the documentation or watch som started instantly by clicking the "Launch Umbraco" button below.
If you are new to Umbraco, you can find plenty of resources on our getting started pages.]]>
Launch Umbraco -To manage your website, simply open the Umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]> +To manage your website, simply open the Umbraco backoffice and start adding content, updating the templates and stylesheets or add new functionality]]>
Connection to database failed. Umbraco Version 3 Umbraco Version 4 @@ -1028,7 +1028,7 @@ To manage your website, simply open the Umbraco back office and start adding con Password reset requested

- Your username to login to the Umbraco back-office is: %0% + Your username to login to the Umbraco backoffice is: %0%

@@ -1399,7 +1399,7 @@ To manage your website, simply open the Umbraco back office and start adding con Default template - To import a document type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen) + To import a Document Type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen)New Tab TitleNode typeType @@ -1410,7 +1410,6 @@ To manage your website, simply open the Umbraco back office and start adding con TabsMaster Content Type enabledThis Content Type uses - as a Master Content Type. Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itselfNo properties defined on this tab. Click on the "add a new property" link at the top to create a new property.Create matching templateAdd icon @@ -1496,8 +1495,8 @@ To manage your website, simply open the Umbraco back office and start adding con User %0% was deletedInvite userInvitation has been re-sent to %0% - Document type was exported to file - An error occurred while exporting the document type + Document Type was exported to file + An error occurred while exporting the Document TypeAdd style @@ -1658,10 +1657,10 @@ To manage your website, simply open the Umbraco back office and start adding con Allowed child node typesAllow content of the specified types to be created underneath content of this type.Choose child node - Inherit tabs and properties from an existing document type. New tabs will be added to the current document type or merged if a tab with an identical name exists. - This content type is used in a composition, and therefore cannot be composed itself. - There are no content types available to use as a composition. - Removing a composition will delete all the associated property data. Once you save the document type there's no way back. + Inherit tabs and properties from an existing Document Type. New tabs will be added to the current Document Type or merged if a tab with an identical name exists. + This Content Type is used in a composition, and therefore cannot be composed itself. + There are no Content Types available to use as a composition. + Removing a composition will delete all the associated property data. Once you save the Document Type there's no way back.Create newUse existingEditor settings @@ -1672,12 +1671,12 @@ To manage your website, simply open the Umbraco back office and start adding con Select the folder to moveSelect the folder to copyto in the tree structure below - All Document types + All Document TypesAll DocumentsAll media items - using this document type will be deleted permanently, please confirm you want to delete these as well. - using this media type will be deleted permanently, please confirm you want to delete these as well. - using this member type will be deleted permanently, please confirm you want to delete these as well + using this Document Type will be deleted permanently, please confirm you want to delete these as well. + using this Media Type will be deleted permanently, please confirm you want to delete these as well. + using this Member Type will be deleted permanently, please confirm you want to delete these as welland all documents using this typeand all media items using this typeand all members using this type @@ -1700,11 +1699,11 @@ To manage your website, simply open the Umbraco back office and start adding con Allow editors to create segments of this content.Allow varying by cultureAllow segmentation - Element type - Is an Element type - An Element type is meant to be used for instance in Nested Content, and not in the tree. - A document type cannot be changed to an Element type once it has been used to create one or more content items. - This is not applicable for an Element type + Element Type + Is an Element Type + An Element Type is meant to be used for instance in Nested Content, and not in the tree. + A document Type cannot be changed to an Element Type once it has been used to create one or more content items. + This is not applicable for an Element TypeYou have made changes to this property. Are you sure you want to discard them?AppearanceLabel above (full-width) @@ -1867,7 +1866,7 @@ To manage your website, simply open the Umbraco back office and start adding con hasn't been locked outThe password hasn't been changedConfirm new password - You can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' button + You can change your password for accessing the Umbraco backoffice by filling out the form below and click the 'Change Password' buttonContent ChannelCreate another userCreate new users to give them access to Umbraco. When a new user is created a password will be generated that you can share with the user. @@ -2233,7 +2232,7 @@ To manage your website, simply open the Umbraco back office and start adding con CreatedCommentName - No relations for this relation type. + No relations for this Relation TypeRelation TypeRelations @@ -2277,7 +2276,7 @@ To manage your website, simply open the Umbraco back office and start adding con Partial ViewPartial View MacroMember - Data type + Data TypeSearch the redirect dashboardSearch the user group sectionSearch the users section @@ -2503,7 +2502,7 @@ To manage your website, simply open the Umbraco back office and start adding con LabelCustom viewShow custom view description - Overwrite how this block appears in the BackOffice UI. Pick a .html file containing your presentation. + Overwrite how this block appears in the backoffice UI. Pick a .html file containing your presentation.Settings modelOverlay editor sizeAdd custom view diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index cc1bb5843a..d04b1f96a6 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -67,7 +67,7 @@ Allow access to assign culture and hostnamesAllow access to view a node's history logAllow access to view a node - Allow access to change document type for a node + Allow access to change Document Type for a nodeAllow access to copy a nodeAllow access to create nodesAllow access to delete nodes @@ -193,12 +193,12 @@ History (all variants) - To change the document type for the selected content, first select from the list of valid types for this location. + To change the Document Type for the selected content, first select from the list of valid types for this location.Then confirm and/or amend the mapping of properties from the current type to the new, and click Save.The content has been re-published.Current PropertyCurrent type - The document type cannot be changed, as there are no alternatives valid for this location. An alternative will be valid if it is allowed under the parent of the selected content item and that all existing child content items are allowed to be created under it. + The Document Type cannot be changed, as there are no alternatives valid for this location. An alternative will be valid if it is allowed under the parent of the selected content item and that all existing child content items are allowed to be created under it.Document Type ChangedMap PropertiesMap to Property @@ -207,7 +207,7 @@ noneContentSelect New Document Type - The document type of the selected content has been successfully changed to [new type] and the following properties mapped: + The Document Type of the selected content has been successfully changed to [new type] and the following properties mapped:toCould not complete property mapping as one or more properties have more than one mapping defined.Only alternate types valid for the current location are displayed. @@ -292,10 +292,10 @@ Are you sure you want to delete this item?Are you sure you want to delete all items?Property %0% uses editor %1% which is not supported by Nested Content. - No content types are configured for this property. - Add element type - Select element type - Select the group whose properties should be displayed. If left blank, the first group on the element type will be used. + No Content Types are configured for this property. + Add Element Type + Select Element Type + Select the group whose properties should be displayed. If left blank, the first group on the Element Type will be used.Enter an angular expression to evaluate against each item for its name. Useto display the item indexAdd another text box @@ -365,18 +365,18 @@ Where do you want to create the new %0%Create an item under - Select the document type you want to make a content template for + Select the Document Type you want to make a content template forEnter a folder nameChoose a type and a title - Document Types within the Settings section, by editing the Allowed child node types under Permissions.]]> - Document Types within the Settings section.]]> + Document Types within the Settings section, by editing the Allowed child node types under Permissions.]]> + Document Types within the Settings section.]]>The selected page in the content tree doesn't allow for any pages to be created below it. - Edit permissions for this document type - Create a new document type - Document Types within the Settings section, by changing the Allow as root option under Permissions.]]> - Media Types Types within the Settings section, by editing the Allowed child node types under Permissions.]]> + Edit permissions for this Document Type + Create a new Document Type + Document Types within the Settings section, by changing the Allow as root option under Permissions.]]> + Media Types Types within the Settings section, by editing the Allowed child node types under Permissions.]]>The selected media in the tree doesn't allow for any other media to be created below it. - Edit permissions for this media type + Edit permissions for this Media TypeDocument Type without a templateDocument Type with TemplateThe data definition for a content page that can be created by editors in the content tree and is directly accessible via a URL. @@ -389,7 +389,7 @@ FolderUsed to organise the Document Types, Compositions and Element Types created in this Document Type tree.New folder - New data type + New Data TypeNew JavaScript fileNew empty partial viewNew partial view macro @@ -572,7 +572,7 @@ Tools to manage the indexfieldsThe index cannot be read and will need to be rebuilt - The process is taking longer than expected, check the umbraco log to see if there have been any errors during this operation + The process is taking longer than expected, check the Umbraco log to see if there have been any errors during this operationThis index cannot be rebuilt because it has no assignedIIndexPopulator @@ -602,7 +602,7 @@ Create custom list viewRemove custom list view - A content type, media type or member type with this alias already exists + A Content Type, Media Type or Member Type with this alias already existsRenamed @@ -622,9 +622,9 @@ Show labelWidth and heightAll property types & property data - using this data type will be deleted permanently, please confirm you want to delete these as well + using this Data Type will be deleted permanently, please confirm you want to delete these as wellYes, delete - and all property types & property data using this data type + and all property types & property data using this Data TypeSelect the folder to moveto in the tree structure belowwas moved underneath @@ -914,7 +914,7 @@ ]]>I want to start from scratchlearn how) You can still choose to install Runway later on. Please go to the Developer section and choose Packages. ]]> @@ -928,7 +928,7 @@ I want to start with a simple website - "Runway" is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically, + "Runway" is a simple website providing some basic Document Types and templates. The installer can set up Runway for you automatically, but you can easily edit, extend or remove it. It's not necessary and you can perfectly use Umbraco without it. However, Runway offers an easy foundation based on best practices to get you started faster than ever. If you choose to install Runway, you can optionally select basic building blocks called Runway Modules to enhance your Runway pages. @@ -955,7 +955,7 @@ Get help from our award winning community, browse the documentation or watch som started instantly by clicking the "Launch Umbraco" button below.
If you are new to Umbraco, you can find plenty of resources on our getting started pages.]]>
Launch Umbraco -To manage your website, simply open the Umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]> +To manage your website, simply open the Umbraco backoffice and start adding content, updating the templates and stylesheets or add new functionality]]>
Connection to database failed.Umbraco Version 3Umbraco Version 4 @@ -1034,7 +1034,7 @@ To manage your website, simply open the Umbraco back office and start adding con Password reset requested

- Your username to login to the Umbraco back-office is: %0% + Your username to login to the Umbraco backoffice is: %0%

@@ -1402,7 +1402,7 @@ To manage your website, simply open the Umbraco back office and start adding con Default template - To import a document type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen) + To import a Document Type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen)New Tab TitleNode typeType @@ -1413,7 +1413,6 @@ To manage your website, simply open the Umbraco back office and start adding con TabsMaster Content Type enabledThis Content Type uses - as a Master Content Type. Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itselfNo properties defined on this tab. Click on the "add a new property" link at the top to create a new property.Create matching templateAdd icon @@ -1509,8 +1508,8 @@ To manage your website, simply open the Umbraco back office and start adding con Invitation has been re-sent to %0%Cannot publish the document since the required '%0%' is not publishedValidation failed for language '%0%' - Document type was exported to file - An error occurred while exporting the document type + Document Type was exported to file + An error occurred while exporting the Document TypeThe release date cannot be in the pastCannot schedule the document for publishing since the required '%0%' is not publishedCannot schedule the document for publishing since the required '%0%' has a publish date later than a non mandatory language @@ -1676,10 +1675,10 @@ To manage your website, simply open the Umbraco back office and start adding con Allowed child node typesAllow content of the specified types to be created underneath content of this type.Choose child node - Inherit tabs and properties from an existing document type. New tabs will be added to the current document type or merged if a tab with an identical name exists. - This content type is used in a composition, and therefore cannot be composed itself. - There are no content types available to use as a composition. - Removing a composition will delete all the associated property data. Once you save the document type there's no way back. + Inherit tabs and properties from an existing Document Type. New tabs will be added to the current Document Type or merged if a tab with an identical name exists. + This Content Type is used in a composition, and therefore cannot be composed itself. + There are no Content Types available to use as a composition. + Removing a composition will delete all the associated property data. Once you save the Document Type there's no way back.Create newUse existingEditor settings @@ -1692,12 +1691,12 @@ To manage your website, simply open the Umbraco back office and start adding con Select the folder to moveSelect the folder to copyto in the tree structure below - All Document types + All Document TypesAll DocumentsAll media items - using this document type will be deleted permanently, please confirm you want to delete these as well. - using this media type will be deleted permanently, please confirm you want to delete these as well. - using this member type will be deleted permanently, please confirm you want to delete these as well + using this Document Type will be deleted permanently, please confirm you want to delete these as well. + using this Media Type will be deleted permanently, please confirm you want to delete these as well. + using this Member Type will be deleted permanently, please confirm you want to delete these as welland all documents using this typeand all media items using this typeand all members using this type @@ -1709,7 +1708,7 @@ To manage your website, simply open the Umbraco back office and start adding con Allow this property value to be displayed on the member profile pagetab has no sort orderWhere is this composition used? - This composition is currently used in the composition of the following content types: + This composition is currently used in the composition of the following Content Types:Allow variationsAllow vary by cultureAllow segmentation @@ -1720,11 +1719,11 @@ To manage your website, simply open the Umbraco back office and start adding con Allow editors to create segments of this content.Allow varying by cultureAllow segmentation - Element type - Is an element type - An element type is meant to be used for instance in Nested Content, and not in the tree. - A document type cannot be changed to an element type once it has been used to create one or more content items. - This is not applicable for an element type + Element Type + Is an Element Type + An Element Type is meant to be used for instance in Nested Content, and not in the tree. + A Document Type cannot be changed to an Element Type once it has been used to create one or more content items. + This is not applicable for an Element TypeYou have made changes to this property. Are you sure you want to discard them?AppearanceLabel above (full-width) @@ -1886,7 +1885,7 @@ To manage your website, simply open the Umbraco back office and start adding con hasn't been locked outThe password hasn't been changedConfirm new password - You can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' button + You can change your password for accessing the Umbraco backoffice by filling out the form below and click the 'Change Password' buttonContent ChannelCreate another userCreate new users to give them access to Umbraco. When a new user is created a password will be generated that you can share with the user. @@ -2255,7 +2254,7 @@ To manage your website, simply open the Umbraco back office and start adding con CreatedCommentName - No relations for this relation type. + No relations for this Relation TypeRelation TypeRelations @@ -2299,7 +2298,7 @@ To manage your website, simply open the Umbraco back office and start adding con Partial ViewPartial View MacroMember - Data type + Data TypeSearch the redirect dashboardSearch the user group sectionSearch the users section @@ -2525,7 +2524,7 @@ To manage your website, simply open the Umbraco back office and start adding con LabelCustom viewShow custom view description - Overwrite how this block appears in the BackOffice UI. Pick a .html file containing your presentation. + Overwrite how this block appears in the backoffice UI. Pick a .html file containing your presentation.Settings modelOverlay editor sizeAdd custom view diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml index 6d0fc7661a..fb11a8dd37 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/es.xml @@ -671,7 +671,7 @@ Umbraco %0% ha sido instalado y está listo para ser usadoarchivo /web.config y actualizar la clave del AppSetting UmbracoConfigurationStatus del final al valor '%0%'.]]>empezar inmediatamente pulsando el botón "Lanzar Umbraco" de debajo.
Si eres nuevo con Umbraco, puedes encontrar cantidad de recursos en nuestras páginas de cómo empezar.]]>
- Lanzar Umbraco Para administrar tu sitio web, simplemente abre el back office de Umbraco y empieza a añadir contenido, a actualizar plantillas y hojas de estilo o a añadir nueva funcionalidad]]> + Lanzar Umbraco Para administrar tu sitio web, simplemente abre el backoffice de Umbraco y empieza a añadir contenido, a actualizar plantillas y hojas de estilo o a añadir nueva funcionalidad]]>No se ha podido establecer la conexión con la base de datosUmbraco versión 3Umbraco versión 4 @@ -989,7 +989,6 @@ PestañasTipo de Contenido Maestro activadoEste Tipo de Contenido usa - como Tipo de Contenido Maestro. Las pestañas para los Tipos de Contenido Maestros no se muestran y solo se pueden modificar desde el Tipo de Contenido MaestroNo existen propiedades para esta pestaña. Haz clic en el enlace "añadir nueva propiedad" para crear una nueva propiedad.Añadir icono @@ -1284,7 +1283,7 @@ Este mail se ha generado automáticamente para informale que %2% has solicitado que el documento '%1%' sea traducido en '%5%'. - Para editarlo, vaya a la dirección http://%3%/translation/details.aspx?id=%4% o inicia sesión en umbraco y ve a http://%3% para ver las tareas pendientes de traducir. + Para editarlo, vaya a la dirección http://%3%/translation/details.aspx?id=%4% o inicia sesión en Umbraco y ve a http://%3% para ver las tareas pendientes de traducir. Espero que tenga un buen dia. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index 88c6458a31..596f51d49e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -981,7 +981,7 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Une réinitialisation de votre mot de passe a été demandée

- Votre nom d'utilisateur pour vous connecter au back-office Umbraco est : %0% + Votre nom d'utilisateur pour vous connecter au backoffice Umbraco est : %0%

@@ -1354,7 +1354,6 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à OngletsType de contenu de base activéCe type de contenu utilise - en tant que type de contenu de base. Les onglets du type de contenu de base ne sont pas affichés et peuvent seulement être modifiés à partir du type de contenu de base lui-même.Aucune propriété définie dans cet onglet. Cliquez sur le lien "Ajouter une nouvelle propriété" en-haut pour créer une nouvelle propriété.Créer le template correspondantAjouter une icône @@ -1805,7 +1804,7 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à n'a pas été bloquéLe mot de passe n'a pas été modifiéConfirmez votre nouveau mot de passe - Vous pouvez changer votre mot de passe d'accès au Back Office Umbraco en remplissant le formulaire ci-dessous puis en cliquant sur le bouton "Changer le mot de passe" + Vous pouvez changer votre mot de passe d'accès au backoffice Umbraco en remplissant le formulaire ci-dessous puis en cliquant sur le bouton "Changer le mot de passe"Canal de contenuCréer un autre utilisateurCréer de nouveaux utilisateurs pour leur donner accès à Umbraco. Lors de la création d'un nouvel utilisateur, un mot de passe est généré que vous pouvez partager avec ce dernier. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml index fcc9cfb8ad..a307dc9e1a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/he.xml @@ -449,7 +449,7 @@ Get help from our award winning community, browse the documentation or watch som started instantly by clicking the "Launch Umbraco" button below.
If you are new to Umbraco, you can find plenty of resources on our getting started pages.]]>
Launch Umbraco -To manage your website, simply open the Umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]> +To manage your website, simply open the Umbraco backoffice and start adding content, updating the templates and stylesheets or add new functionality]]>ההתחברות לבסיס הנתונים נכשלה.Umbraco גירסה 3Umbraco גירסה 4 diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml index 812da01703..835e49578b 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/it.xml @@ -422,7 +422,7 @@ Fatti aiutare dalla nostra community, consulta la documentazione o guarda alcuni /web.config e aggiornare la chiave AppSetting UmbracoConfigurationStatus impostando il valore '%0%'.]]>iniziare immediatamente cliccando sul bottone "Avvia Umbraco".
Se sei nuovo a Umbraco, si possono trovare un sacco di risorse sulle nostre pagine Getting Started.]]>
Avvia Umbraco -Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e iniziare ad aggiungere i contenuti, aggiornando i modelli e i fogli di stile o aggiungere nuove funzionalità]]> +Per gestire il tuo sito web, è sufficiente aprire il backoffice di Umbraco e iniziare ad aggiungere i contenuti, aggiornando i modelli e i fogli di stile o aggiungere nuove funzionalità]]>Connessione al database non riuscita.Umbraco Versione 3Umbraco Versione 4 @@ -603,7 +603,6 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i Utenti - Tipo di contenuto master abilitatoQuesto tipo di contenuto usa @@ -820,7 +819,7 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i AmministratoreCampo CategoriaCambia la tua password - + Conferma la nuova passwordContenuto del canaleCampo Descrizione diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml index 80aad2c301..11cc67ec98 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ja.xml @@ -804,7 +804,6 @@ Runwayをインストールして作られた新しいウェブサイトがど タブマスターコンテンツタイプが有効このコンテンツタイプの使用 - マスターコンテンツタイプについては、マスターコンテンツタイプからのタブは表示されず、マスターコンテンツタイプでのみ編集することができます。このタブにはプロパティが定義されていません、上部のリンクから新しいプロパティを作成してくださいアイコンの追加 diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml index 02f50e73b2..1f7642036e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ko.xml @@ -815,7 +815,7 @@ 관리자카테고리 필드Change Your Password - You can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' button + You can change your password for accessing the Umbraco backoffice by filling out the form below and click the 'Change Password' button컨텐츠 채널설명 필드사용자 비활성화 diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml index cc0b46f200..d5f22686fe 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml @@ -689,7 +689,6 @@ Vennlig hilsen Umbraco roboten ArkfanerHovedinnholdstype aktivertDenne dokumenttypen bruker - som hoveddokumenttype. Arkfaner fra hoveddokumenttyper vises ikke og kan kun endres på hoveddokumenttypen selv.Ingen egenskaper definert i denne arkfanen. Klikk på "legg til ny egenskap" lenken i toppen for å opprette en ny egenskap. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml index 2a24600a7c..961dcaeb16 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml @@ -902,7 +902,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Umbraco %0% is geïnstalleerd en klaar voor gebruik./web.config bestand aanpassen, en de Appsetting key UmbracoConfigurationStatus onder in het bestand veranderen naar '%0%'.]]>meteen beginnen door de "Launch Umbraco" knop hieronder te klikken.
Als je een beginnende Umbraco gebruiker bent, dan kun je you can find veel informatie op onze "getting started" pagina's vinden.]]>
- Launch Umbraco Om je website te beheren open je simpelweg de Umbraco back office en begin je inhoud toe te voegen, templates en stylesheets aan te passen of nieuwe functionaliteit toe te voegen]]> + Launch Umbraco Om je website te beheren open je simpelweg de Umbraco backoffice en begin je inhoud toe te voegen, templates en stylesheets aan te passen of nieuwe functionaliteit toe te voegen]]>Verbinding met de database mislukt.Umbraco versie 3Umbraco versie 4 @@ -1229,7 +1229,6 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je TabsBasis inhoudstype ingeschakeldDit inhoudstype gebruikt - als basis inhoudstype. Tabs van basis inhoudstypes worden niet getoond en kunnen alleen worden aangepast op het basis inhoudstype zelfGeen eigenschappen gedefinieerd op dit tabblad. Klik op de link "voeg een nieuwe eigenschap" aan de bovenkant om een ​​nieuwe eigenschap te creëren.Maak een bijpassende sjabloonIcoon toevoegen diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml index 7b3e8f1b04..300b4dff76 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml @@ -737,7 +737,7 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Twoje hasło zostało zmienioneLink, na który kliknąłeś jest niewłaściwy lub wygasłUmbraco: Resetowanie hasła - Twoja nazwa użytkownika do zalogowania się w Umbraco back-office to: %0%

Kliknij tutaj, aby zresetować Twoje hasło lub kopiuj/wklej ten URL w przeglądarce:

%1%

]]>
+ Twoja nazwa użytkownika do zalogowania się w Umbraco backoffice to: %0%

Kliknij tutaj, aby zresetować Twoje hasło lub kopiuj/wklej ten URL w przeglądarce:

%1%

]]>
Panel zarządzania @@ -981,7 +981,6 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb ZakładkiWłączono Główny Typ TreściTen Typ Treści używa - jako Główny Typ Treści. Zakładki Głównego Typu Treści nie są wyświetlone i mogą być edytowane jedynie w samym Głównym Typie TreściŻadne właściwości nie zostały zdefiniowane dla tej zakładki. Kliknij w link "dodaj nową właściwość", który znajduje się na górze strony, aby stworzyć nową właściwość.Dodaj ikonę @@ -1321,7 +1320,7 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Zmień hasło!Nowe hasłoPotwierdź nowe hasło - Możesz zmienić swoje hasło w Umbraco Back Office przez wypełnienie formularza poniżej i kliknięcie przycisku "Zmień hasło" + Możesz zmienić swoje hasło w Umbraco backoffice przez wypełnienie formularza poniżej i kliknięcie przycisku "Zmień hasło"Kanał zawartościOpisWyłącz użytkownika diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml index a430b53165..9ad4291c59 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml @@ -1327,7 +1327,6 @@ Добавить значок - в качестве родительского типа. Вкладки родительского типа не показаны и могут быть изменены непосредственно в родительском типеРодительский тип контента разрешенДанный тип контента используетШаблон по-умолчанию diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml index 8c282dd571..9c237815bf 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml @@ -558,7 +558,7 @@ Umbraco %0% är installerat och klart för användning/web.config filen och ändra AppSettingsnyckeln UmbracoConfigurationStatus på slutet till %0%]]>börja omedelbart genom att klicka på "Starta Umbraco"-knappen nedan.
Om du är en ny Umbraco användarekan du hitta massor av resurser på våra kom igång sidor.]]>
- Starta Umbraco För att administrera din webbplats öppnar du bara Umbraco back office och börjar lägga till innehåll, uppdatera mallar och stilmallar eller lägga till nya funktioner.]]> + Starta Umbraco För att administrera din webbplats öppnar du bara Umbraco backoffice och börjar lägga till innehåll, uppdatera mallar och stilmallar eller lägga till nya funktioner.]]>Anslutningen till databasen misslyckades.SeUmbraco %0% antingen för en ny installation eller en uppgradering från version 3.0.

Tryck på "next" för att börja.]]>
@@ -732,7 +732,6 @@ Användare - som huvudinnehållstyp. Tabbar från huvudinnehållstyper visas inte och kan endast redigeras på själva huvudinnehållstypen.Huvudinnehållstyp påslagenDenna huvudinnehållstyp använderDefaultmall @@ -947,7 +946,7 @@ Ändra lösenordÄndra bildBekräfta det nya lösenordet - Du kan byta ditt lösenord för Umbraco Back Office genom att fylla i nedanstående formulär och klicka på knappen "Ändra lösenord". + Du kan byta ditt lösenord för Umbraco backoffice genom att fylla i nedanstående formulär och klicka på knappen "Ändra lösenord".InnehållskanalSkapa en till användareSkapa nya användare för att ge dom åtkomst till Umbraco. När en ny användare skapas kommer ett lösenord genereras som du kan dela med användaren. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml index 67fa7adcc4..82ef1ba628 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml @@ -561,7 +561,7 @@ Dizini yönetmek için araçlaralanlarDizin okunamıyor ve yeniden oluşturulması gerekecek - İşlem beklenenden uzun sürüyor, bu işlem sırasında herhangi bir hata olup olmadığını görmek için umbraco günlüğünü kontrol edin + İşlem beklenenden uzun sürüyor, bu işlem sırasında herhangi bir hata olup olmadığını görmek için Umbraco günlüğünü kontrol edinBu dizin, atanmış olmadığı için yeniden oluşturulamazIIndexPopulator @@ -1468,7 +1468,6 @@ Web sitenizi yönetmek için, Umbraco'nun arka ofisini açın ve içerik eklemey SekmelerAna İçerik Türü etkinleştirildiBu İçerik Türü kullanır - Ana İçerik Türü olarak . Ana İçerik Türlerinden sekmeler gösterilmez ve yalnızca Ana İçerik Türünün kendisinde düzenlenebilirBu sekmede tanımlanmış özellik yok. Yeni bir mülk oluşturmak için üstteki "yeni mülk ekle" bağlantısını tıklayın.Eşleşen şablon oluşturSimge ekle diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml index 6344efe0bc..916bca0dbd 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml @@ -847,7 +847,6 @@ 选项卡主控文档类型激活该文档类型使用 - 作为主控文档类型. 主控文档类型的标签只能在主控文档类型里修改。没有字段设置在该标签页添加图标 diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml index c912daa56e..23123f9bfa 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -834,7 +834,6 @@ 選項卡主控文件類型啟動該文檔類型使用 - 作為主控文件類型. 主控文件類型的標籤只能在主控文件類型裡修改。沒有欄位設置在該標籤頁增加圖示 From 40f0fbe9391217900a766929a76ff9f1364f484e Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Sun, 21 Feb 2021 16:03:37 +0000 Subject: [PATCH 26/99] Make abstract FileSystemWrapper class methods virtual (#9528) --- src/Umbraco.Core/IO/FileSystemWrapper.cs | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Core/IO/FileSystemWrapper.cs b/src/Umbraco.Core/IO/FileSystemWrapper.cs index 14d028c16d..3091a645d5 100644 --- a/src/Umbraco.Core/IO/FileSystemWrapper.cs +++ b/src/Umbraco.Core/IO/FileSystemWrapper.cs @@ -23,94 +23,94 @@ namespace Umbraco.Core.IO internal IFileSystem InnerFileSystem { get; set; } - public IEnumerable GetDirectories(string path) + public virtual IEnumerable GetDirectories(string path) { return InnerFileSystem.GetDirectories(path); } - public void DeleteDirectory(string path) + public virtual void DeleteDirectory(string path) { InnerFileSystem.DeleteDirectory(path); } - public void DeleteDirectory(string path, bool recursive) + public virtual void DeleteDirectory(string path, bool recursive) { InnerFileSystem.DeleteDirectory(path, recursive); } - public bool DirectoryExists(string path) + public virtual bool DirectoryExists(string path) { return InnerFileSystem.DirectoryExists(path); } - public void AddFile(string path, Stream stream) + public virtual void AddFile(string path, Stream stream) { InnerFileSystem.AddFile(path, stream); } - public void AddFile(string path, Stream stream, bool overrideExisting) + public virtual void AddFile(string path, Stream stream, bool overrideExisting) { InnerFileSystem.AddFile(path, stream, overrideExisting); } - public IEnumerable GetFiles(string path) + public virtual IEnumerable GetFiles(string path) { return InnerFileSystem.GetFiles(path); } - public IEnumerable GetFiles(string path, string filter) + public virtual IEnumerable GetFiles(string path, string filter) { return InnerFileSystem.GetFiles(path, filter); } - public Stream OpenFile(string path) + public virtual Stream OpenFile(string path) { return InnerFileSystem.OpenFile(path); } - public void DeleteFile(string path) + public virtual void DeleteFile(string path) { InnerFileSystem.DeleteFile(path); } - public bool FileExists(string path) + public virtual bool FileExists(string path) { return InnerFileSystem.FileExists(path); } - public string GetRelativePath(string fullPathOrUrl) + public virtual string GetRelativePath(string fullPathOrUrl) { return InnerFileSystem.GetRelativePath(fullPathOrUrl); } - public string GetFullPath(string path) + public virtual string GetFullPath(string path) { return InnerFileSystem.GetFullPath(path); } - public string GetUrl(string path) + public virtual string GetUrl(string path) { return InnerFileSystem.GetUrl(path); } - public DateTimeOffset GetLastModified(string path) + public virtual DateTimeOffset GetLastModified(string path) { return InnerFileSystem.GetLastModified(path); } - public DateTimeOffset GetCreated(string path) + public virtual DateTimeOffset GetCreated(string path) { return InnerFileSystem.GetCreated(path); } - public long GetSize(string path) + public virtual long GetSize(string path) { return InnerFileSystem.GetSize(path); } - public bool CanAddPhysical => InnerFileSystem.CanAddPhysical; + public virtual bool CanAddPhysical => InnerFileSystem.CanAddPhysical; - public void AddFile(string path, string physicalPath, bool overrideIfExists = true, bool copy = false) + public virtual void AddFile(string path, string physicalPath, bool overrideIfExists = true, bool copy = false) { InnerFileSystem.AddFile(path, physicalPath, overrideIfExists, copy); } From 6aaefe160bd09a98a8e35456b52309e13a006f4b Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Feb 2021 17:17:10 +0100 Subject: [PATCH 27/99] Decimal step size validation (#9334) Co-authored-by: Sebastiaan Janssen --- .../src/views/propertyeditors/decimal/decimal.html | 9 +++++++-- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 6 ++++-- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 4 ++++ src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html index ac2fdabf3d..fb68a67c60 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html @@ -9,10 +9,15 @@ aria-required="{{model.validation.mandatory}}" id="{{model.alias}}" val-server="value" - fix-number min="{{model.config.min}}" max="{{model.config.max}}" step="{{model.config.step}}" /> + min="{{model.config.min}}" + max="{{model.config.max}}" + step="{{model.config.step}}" + ng-step="model.config.step" + fix-number /> - + Not a number + Not a valid numeric step size {{decimalFieldForm.decimalField.errorMsg}} diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 309b05ccf3..250b1b4579 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1696,9 +1696,11 @@ Mange hilsner fra Umbraco robotten elementer valgt Ugyldig dato Ikke et tal + Ikke en gyldig numerisk trinstørrelse Ugyldig e-mail - Feltet er påkrævet - Feltet er påkrævet + Værdien kan ikke være tom + Værdien kan ikke være tom + Værdien er ugyldig, som ikke matcher det korrekte format %1% mere.]]> %1% for mange.]]> diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index dacb04d597..9d6240325d 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -2072,7 +2072,11 @@ To manage your website, simply open the Umbraco backoffice and start adding cont items selected Invalid date Not a number + Not a valid numeric step size Invalid email + Value cannot be null + Value cannot be empty + Value is invalid, it does not match the correct pattern Custom validation %1% more.]]> %1% too many.]]> diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index d04b1f96a6..622806d933 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -2090,6 +2090,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont items selected Invalid date Not a number + Not a valid numeric step size Invalid email Value cannot be null Value cannot be empty From d85b6694fe66b1b9f51f6a7c215916f2ac73c6e5 Mon Sep 17 00:00:00 2001 From: Matthew-Wise <6782865+Matthew-Wise@users.noreply.github.com> Date: Sun, 21 Feb 2021 16:19:48 +0000 Subject: [PATCH 28/99] Make models builder properties virtual to allow mocking (#9335) --- src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs | 6 +++--- src/Umbraco.Tests/ModelsBuilder/BuilderTests.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs b/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs index e59900bdc4..148d0869d4 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs +++ b/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs @@ -246,7 +246,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building WriteGeneratedCodeAttribute(sb, "\t\t"); sb.AppendFormat("\t\t[ImplementPropertyType(\"{0}\")]\n", property.Alias); - sb.Append("\t\tpublic "); + sb.Append("\t\tpublic virtual "); WriteClrType(sb, property.ClrTypeName); sb.AppendFormat(" {0} => ", @@ -307,14 +307,14 @@ namespace Umbraco.ModelsBuilder.Embedded.Building if (mixinStatic) { - sb.Append("\t\tpublic "); + sb.Append("\t\tpublic virtual "); WriteClrType(sb, property.ClrTypeName); sb.AppendFormat(" {0} => {1}(this);\n", property.ClrName, MixinStaticGetterName(property.ClrName)); } else { - sb.Append("\t\tpublic "); + sb.Append("\t\tpublic virtual "); WriteClrType(sb, property.ClrTypeName); sb.AppendFormat(" {0} => this.Value", property.ClrName); diff --git a/src/Umbraco.Tests/ModelsBuilder/BuilderTests.cs b/src/Umbraco.Tests/ModelsBuilder/BuilderTests.cs index 4f35c57d04..5a64ab1b73 100644 --- a/src/Umbraco.Tests/ModelsBuilder/BuilderTests.cs +++ b/src/Umbraco.Tests/ModelsBuilder/BuilderTests.cs @@ -97,7 +97,7 @@ namespace Umbraco.Web.PublishedModels [global::System.CodeDom.Compiler.GeneratedCodeAttribute(""Umbraco.ModelsBuilder.Embedded"", """ + version + @""")] [ImplementPropertyType(""prop1"")] - public string Prop1 => this.Value(""prop1""); + public virtual string Prop1 => this.Value(""prop1""); } } "; @@ -212,7 +212,7 @@ namespace Umbraco.Web.PublishedModels [global::System.CodeDom.Compiler.GeneratedCodeAttribute(""Umbraco.ModelsBuilder.Embedded"", """ + version + @""")] [ImplementPropertyType(""foo"")] - public global::System.Collections.Generic.IEnumerable Foo => this.Value>(""foo""); + public virtual global::System.Collections.Generic.IEnumerable Foo => this.Value>(""foo""); } } "; From 6eb260001d3d4045f4c29ef6e26d85d27c1e4ce8 Mon Sep 17 00:00:00 2001 From: mcl-sz Date: Sun, 21 Feb 2021 17:22:28 +0100 Subject: [PATCH 29/99] Ensure that upload file(s) in the MediaPicker is returned (#9367) The onUploadComplete function returns the last files that are added to a mediafolder. While this works correct by default and in most situations, it doesn't work as expected when a diffrent sorting is used for Media-items. For example, we've added events to sort Media-items automatically by name alphabetically when they are created/uploaded to keep them better organised. By sorting the $scope.files array by the Id-property, it ensures that the function returns the uploaded files, instead of the last files in the folder. --- .../infiniteeditors/mediapicker/mediapicker.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js index 6f9ce6ee34..fec2e632c5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js @@ -327,10 +327,10 @@ angular.module("umbraco") gotoFolder($scope.currentFolder).then(function () { $timeout(function () { if ($scope.multiPicker) { - var images = _.rest($scope.images, $scope.images.length - files.length); + var images = _.rest(_.sortBy($scope.images, 'id'), $scope.images.length - files.length); images.forEach(image => selectMedia(image)); } else { - var image = $scope.images[$scope.images.length - 1]; + var image = _.sortBy($scope.images, 'id')[$scope.images.length - 1]; clickHandler(image); } }); From b8540ca128bf1622ff26eb21d331577776d5a725 Mon Sep 17 00:00:00 2001 From: Chad Date: Mon, 22 Feb 2021 11:22:49 +1300 Subject: [PATCH 30/99] Improve speed and reduce allocations by implementing logger overloads to avoid params [] allocation (#8917) * Implement logger overloads to avoid params [] allocation * Implement console logger ILogger * Call correct signature * Fix exceptions * Introduce ILogger2 * fix logger reference Co-authored-by: Nathan Woulfe --- .../Composing/ComponentCollection.cs | 2 +- src/Umbraco.Core/Composing/Composers.cs | 4 +- src/Umbraco.Core/Composing/TypeFinder.cs | 6 +- src/Umbraco.Core/Composing/TypeLoader.cs | 29 +- .../Configuration/Grid/GridEditorsConfig.cs | 2 +- src/Umbraco.Core/IO/FileSystems.cs | 4 +- src/Umbraco.Core/IO/MediaFileSystem.cs | 2 +- src/Umbraco.Core/IO/PhysicalFileSystem.cs | 12 +- .../Logging/DebugDiagnosticsLogger.cs | 60 +++ src/Umbraco.Core/Logging/DisposableTimer.cs | 10 +- src/Umbraco.Core/Logging/ILogger.cs | 7 +- src/Umbraco.Core/Logging/ILogger2.cs | 240 ++++++++++ src/Umbraco.Core/Logging/LogProfiler.cs | 4 +- src/Umbraco.Core/Logging/Logger2Extensions.cs | 442 ++++++++++++++++++ src/Umbraco.Core/Logging/OwinLogger.cs | 18 +- src/Umbraco.Core/Logging/ProfilingLogger.cs | 58 +++ .../Logging/Serilog/SerilogLogger.cs | 124 +++++ src/Umbraco.Core/Manifest/ManifestParser.cs | 2 +- src/Umbraco.Core/Manifest/ManifestWatcher.cs | 2 +- .../Migrations/Install/DatabaseBuilder.cs | 10 +- .../Migrations/Install/DatabaseDataCreator.cs | 4 +- .../Install/DatabaseSchemaCreator.cs | 20 +- src/Umbraco.Core/Migrations/MigrationPlan.cs | 8 +- .../Upgrade/V_8_0_0/DataTypeMigration.cs | 6 +- .../DataTypes/PreValueMigratorCollection.cs | 2 +- .../DropDownPropertyEditorsMigration.cs | 2 +- .../MergeDateAndDateTimePropertyEditor.cs | 2 +- ...adioAndCheckboxPropertyEditorsMigration.cs | 2 +- src/Umbraco.Core/Models/Member.cs | 4 +- .../Packaging/PackageActionRunner.cs | 4 +- .../Packaging/PackageDataInstallation.cs | 18 +- .../Implement/ContentRepositoryBase.cs | 2 +- .../Implement/ContentTypeRepository.cs | 2 +- .../Implement/ContentTypeRepositoryBase.cs | 6 +- .../Persistence/UmbracoDatabase.cs | 8 +- .../Persistence/UmbracoDatabaseFactory.cs | 2 +- .../PropertyEditors/DataValueEditor.cs | 2 +- .../ValueConverters/GridValueConverter.cs | 2 +- .../ImageCropperValueConverter.cs | 4 +- .../ValueConverters/JsonValueConverter.cs | 2 +- src/Umbraco.Core/Runtime/CoreRuntime.cs | 4 +- src/Umbraco.Core/Runtime/MainDom.cs | 8 +- src/Umbraco.Core/Runtime/SqlMainDomLock.cs | 6 +- src/Umbraco.Core/RuntimeState.cs | 6 +- src/Umbraco.Core/Scoping/Scope.cs | 2 +- src/Umbraco.Core/Scoping/ScopeProvider.cs | 2 +- .../Services/Implement/ContentService.cs | 38 +- .../Implement/LocalizedTextService.cs | 8 +- .../LocalizedTextServiceFileSources.cs | 6 +- .../Services/Implement/NotificationService.cs | 2 +- .../Sync/DatabaseServerMessenger.cs | 6 +- src/Umbraco.Core/Sync/ServerMessengerBase.cs | 6 +- src/Umbraco.Core/Umbraco.Core.csproj | 2 + src/Umbraco.Core/UriExtensions.cs | 3 +- src/Umbraco.Examine/IndexRebuilder.cs | 2 +- src/Umbraco.Examine/UmbracoContentIndex.cs | 2 +- src/Umbraco.Examine/UmbracoExamineIndex.cs | 2 +- .../LoggerAllocationBenchmark.cs | 58 +++ .../Umbraco.Tests.Benchmarks.csproj | 1 + .../DictionaryPublishedContent.cs | 2 +- .../LegacyXmlPublishedCache/PreviewContent.cs | 4 +- .../PublishedMediaCache.cs | 4 +- .../LegacyXmlPublishedCache/XmlStore.cs | 16 +- .../XmlStoreFilePersister.cs | 6 +- .../Services/ContentServicePerformanceTest.cs | 2 +- .../TestHelpers/ConsoleLogger.cs | 57 +++ .../Cache/DistributedCacheBinder.cs | 2 +- .../ContentAppFactoryCollection.cs | 2 +- .../Editors/AuthenticationController.cs | 8 +- .../Editors/BackOfficeController.cs | 14 +- src/Umbraco.Web/Editors/ContentController.cs | 2 +- .../Editors/ContentControllerBase.cs | 2 +- .../Editors/ContentTypeController.cs | 6 +- .../Editors/DashboardController.cs | 6 +- .../Editors/DictionaryController.cs | 4 +- .../Editors/ExamineManagementController.cs | 4 +- src/Umbraco.Web/Editors/PasswordChanger.cs | 6 +- .../Editors/RelationTypeController.cs | 4 +- src/Umbraco.Web/Editors/TinyMceController.cs | 2 +- .../HealthCheck/HealthCheckController.cs | 2 +- .../HealthCheck/HealthCheckResults.cs | 8 +- .../ImageCropperTemplateExtensions.cs | 3 +- .../Controllers/InstallApiController.cs | 6 +- .../ClientDependencyConfiguration.cs | 2 +- src/Umbraco.Web/Macros/MacroRenderer.cs | 6 +- .../Media/UploadAutoFillProperties.cs | 2 +- .../Mapping/ContentPropertyBasicMapper.cs | 2 +- .../Models/Mapping/DataTypeMapDefinition.cs | 2 +- .../Models/Mapping/MacroMapDefinition.cs | 2 +- src/Umbraco.Web/Mvc/RenderMvcController.cs | 2 +- .../BlockEditorPropertyEditor.cs | 2 +- .../ImageCropperPropertyEditor.cs | 2 +- .../NestedContentPropertyEditor.cs | 4 +- .../RichTextEditorPastedImages.cs | 2 +- .../PropertyEditors/RteEmbedController.cs | 2 +- .../PublishedCache/NuCache/ContentStore.cs | 6 +- .../NuCache/DataSource/DatabaseDataSource.cs | 4 +- .../NuCache/PublishedSnapshotService.cs | 14 +- .../PublishedContentTypeCache.cs | 4 +- .../Routing/ContentFinderByConfigured404.cs | 2 +- .../Routing/ContentFinderByIdPath.cs | 4 +- .../Routing/ContentFinderByRedirectUrl.cs | 6 +- src/Umbraco.Web/Routing/ContentFinderByUrl.cs | 4 +- .../Routing/ContentFinderByUrlAlias.cs | 2 +- .../Routing/ContentFinderByUrlAndTemplate.cs | 8 +- src/Umbraco.Web/Routing/DefaultUrlProvider.cs | 2 +- .../Routing/NotFoundHandlerHelper.cs | 2 +- src/Umbraco.Web/Routing/PublishedRouter.cs | 38 +- .../Scheduling/BackgroundTaskRunner.cs | 26 +- src/Umbraco.Web/Scheduling/KeepAlive.cs | 2 +- .../Scheduling/ScheduledPublishing.cs | 2 +- src/Umbraco.Web/Scheduling/TempFileCleanup.cs | 4 +- src/Umbraco.Web/Search/ExamineComponent.cs | 2 +- src/Umbraco.Web/Security/MembershipHelper.cs | 2 +- .../Providers/UmbracoMembershipProvider.cs | 16 +- src/Umbraco.Web/Templates/HtmlUrlParser.cs | 2 +- .../Trees/ContentTreeControllerBase.cs | 2 +- src/Umbraco.Web/UmbracoApplicationBase.cs | 6 +- src/Umbraco.Web/UmbracoModule.cs | 2 +- .../FileUploadCleanupFilterAttribute.cs | 10 +- .../WebApi/UnhandledExceptionLogger.cs | 2 +- 121 files changed, 1364 insertions(+), 316 deletions(-) create mode 100644 src/Umbraco.Core/Logging/ILogger2.cs create mode 100644 src/Umbraco.Core/Logging/Logger2Extensions.cs create mode 100644 src/Umbraco.Tests.Benchmarks/LoggerAllocationBenchmark.cs diff --git a/src/Umbraco.Core/Composing/ComponentCollection.cs b/src/Umbraco.Core/Composing/ComponentCollection.cs index 62b240f10f..6501a3a28c 100644 --- a/src/Umbraco.Core/Composing/ComponentCollection.cs +++ b/src/Umbraco.Core/Composing/ComponentCollection.cs @@ -51,7 +51,7 @@ namespace Umbraco.Core.Composing } catch (Exception ex) { - _logger.Error(ex, "Error while terminating component {ComponentType}.", componentType.FullName); + _logger.Error(ex, "Error while terminating component {ComponentType}.", componentType.FullName); } } } diff --git a/src/Umbraco.Core/Composing/Composers.cs b/src/Umbraco.Core/Composing/Composers.cs index b2e6c9d068..1528c6760d 100644 --- a/src/Umbraco.Core/Composing/Composers.cs +++ b/src/Umbraco.Core/Composing/Composers.cs @@ -114,7 +114,7 @@ namespace Umbraco.Core.Composing // bit verbose but should help for troubleshooting //var text = "Ordered Composers: " + Environment.NewLine + string.Join(Environment.NewLine, sortedComposerTypes) + Environment.NewLine; - _logger.Debug("Ordered Composers: {SortedComposerTypes}", sortedComposerTypes); + _logger.Debug>("Ordered Composers: {SortedComposerTypes}", sortedComposerTypes); return sortedComposerTypes; } @@ -205,7 +205,7 @@ namespace Umbraco.Core.Composing catch (Exception e) { // in case of an error, force-dump everything to log - _logger.Info("Composer Report:\r\n{ComposerReport}", GetComposersReport(requirements)); + _logger.Info("Composer Report:\r\n{ComposerReport}", GetComposersReport(requirements)); _logger.Error(e, "Failed to sort composers."); throw; } diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs index 394d9480ae..5bf9eb89a9 100644 --- a/src/Umbraco.Core/Composing/TypeFinder.cs +++ b/src/Umbraco.Core/Composing/TypeFinder.cs @@ -11,7 +11,7 @@ using System.Web.Compilation; using System.Web.Hosting; using Umbraco.Core.Composing; using Umbraco.Core.IO; - +using Umbraco.Core.Logging; namespace Umbraco.Core.Composing { /// @@ -441,7 +441,7 @@ namespace Umbraco.Core.Composing } catch (TypeLoadException ex) { - Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly); + Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly); continue; } @@ -507,7 +507,7 @@ namespace Umbraco.Core.Composing } catch (TypeLoadException ex) { - Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly); + Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly); continue; } diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index 6d0b1a0514..f5c75ff607 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Threading; @@ -477,7 +478,7 @@ namespace Umbraco.Core.Composing if (--attempts == 0) throw; - _logger.Debug("Attempted to get filestream for file {Path} failed, {NumberOfAttempts} attempts left, pausing for {PauseMilliseconds} milliseconds", path, attempts, pauseMilliseconds); + _logger.Debug("Attempted to get filestream for file {Path} failed, {NumberOfAttempts} attempts left, pausing for {PauseMilliseconds} milliseconds", path, attempts, pauseMilliseconds); Thread.Sleep(pauseMilliseconds); } } @@ -498,7 +499,7 @@ namespace Umbraco.Core.Composing if (--attempts == 0) throw; - _logger.Debug("Attempted to delete file {Path} failed, {NumberOfAttempts} attempts left, pausing for {PauseMilliseconds} milliseconds", path, attempts, pauseMilliseconds); + _logger.Debug("Attempted to delete file {Path} failed, {NumberOfAttempts} attempts left, pausing for {PauseMilliseconds} milliseconds", path, attempts, pauseMilliseconds); Thread.Sleep(pauseMilliseconds); } } @@ -571,7 +572,7 @@ namespace Umbraco.Core.Composing if (!typeof(IDiscoverable).IsAssignableFrom(typeof(T))) { // warn - _logger.Debug("Running a full, " + (cache ? "" : "non-") + "cached, scan for non-discoverable type {TypeName} (slow).", typeof(T).FullName); + _logger.Debug("Running a full, " + (cache ? "" : "non-") + "cached, scan for non-discoverable type {TypeName} (slow).", typeof(T).FullName); return GetTypesInternal( typeof(T), null, @@ -589,7 +590,7 @@ namespace Umbraco.Core.Composing // warn if (!cache) - _logger.Debug("Running a non-cached, filter for discoverable type {TypeName} (slowish).", typeof(T).FullName); + _logger.Debug("Running a non-cached, filter for discoverable type {TypeName} (slowish).", typeof(T).FullName); // filter the cached discovered types (and maybe cache the result) return GetTypesInternal( @@ -621,7 +622,7 @@ namespace Umbraco.Core.Composing // if not IDiscoverable, directly get types if (!typeof(IDiscoverable).IsAssignableFrom(typeof(T))) { - _logger.Debug("Running a full, " + (cache ? "" : "non-") + "cached, scan for non-discoverable type {TypeName} / attribute {AttributeName} (slow).", typeof(T).FullName, typeof(TAttribute).FullName); + _logger.Debug("Running a full, " + (cache ? "" : "non-") + "cached, scan for non-discoverable type {TypeName} / attribute {AttributeName} (slow).", typeof(T).FullName, typeof(TAttribute).FullName); return GetTypesInternal( typeof(T), typeof(TAttribute), @@ -639,7 +640,7 @@ namespace Umbraco.Core.Composing // warn if (!cache) - _logger.Debug("Running a non-cached, filter for discoverable type {TypeName} / attribute {AttributeName} (slowish).", typeof(T).FullName, typeof(TAttribute).FullName); + _logger.Debug("Running a non-cached, filter for discoverable type {TypeName} / attribute {AttributeName} (slowish).", typeof(T).FullName, typeof(TAttribute).FullName); // filter the cached discovered types (and maybe cache the result) return GetTypesInternal( @@ -669,7 +670,7 @@ namespace Umbraco.Core.Composing cache &= specificAssemblies == null; if (!cache) - _logger.Debug("Running a full, non-cached, scan for types / attribute {AttributeName} (slow).", typeof(TAttribute).FullName); + _logger.Debug("Running a full, non-cached, scan for types / attribute {AttributeName} (slow).", typeof(TAttribute).FullName); return GetTypesInternal( typeof (object), typeof (TAttribute), @@ -725,7 +726,7 @@ namespace Umbraco.Core.Composing if (typeList != null) { // need to put some logging here to try to figure out why this is happening: http://issues.umbraco.org/issue/U4-3505 - _logger.Debug("Getting {TypeName}: found a cached type list.", GetName(baseType, attributeType)); + _logger.Debug("Getting {TypeName}: found a cached type list.", GetName(baseType, attributeType)); return typeList.Types; } @@ -756,7 +757,7 @@ namespace Umbraco.Core.Composing // so in this instance there will never be a result. if (cacheResult.Exception is CachedTypeNotFoundInFileException || cacheResult.Success == false) { - _logger.Debug("Getting {TypeName}: failed to load from cache file, must scan assemblies.", GetName(baseType, attributeType)); + _logger.Debug("Getting {TypeName}: failed to load from cache file, must scan assemblies.", GetName(baseType, attributeType)); scan = true; } else @@ -775,7 +776,7 @@ namespace Umbraco.Core.Composing catch (Exception ex) { // in case of any exception, we have to exit, and revert to scanning - _logger.Error(ex, "Getting {TypeName}: failed to load cache file type {CacheType}, reverting to scanning assemblies.", GetName(baseType, attributeType), type); + _logger.Error(ex, "Getting {TypeName}: failed to load cache file type {CacheType}, reverting to scanning assemblies.", GetName(baseType, attributeType), type); scan = true; break; } @@ -783,7 +784,7 @@ namespace Umbraco.Core.Composing if (scan == false) { - _logger.Debug("Getting {TypeName}: loaded types from cache file.", GetName(baseType, attributeType)); + _logger.Debug("Getting {TypeName}: loaded types from cache file.", GetName(baseType, attributeType)); } } } @@ -791,7 +792,7 @@ namespace Umbraco.Core.Composing if (scan) { // either we had to scan, or we could not get the types from the cache file - scan now - _logger.Debug("Getting {TypeName}: " + action + ".", GetName(baseType, attributeType)); + _logger.Debug("Getting {TypeName}: " + action + ".", GetName(baseType, attributeType)); foreach (var t in finder()) typeList.Add(t); @@ -809,11 +810,11 @@ namespace Umbraco.Core.Composing UpdateCache(); } - _logger.Debug("Got {TypeName}, caching ({CacheType}).", GetName(baseType, attributeType), added.ToString().ToLowerInvariant()); + _logger.Debug("Got {TypeName}, caching ({CacheType}).", GetName(baseType, attributeType), added.ToString().ToLowerInvariant()); } else { - _logger.Debug("Got {TypeName}.", GetName(baseType, attributeType)); + _logger.Debug("Got {TypeName}.", GetName(baseType, attributeType)); } return typeList.Types; diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index d434da8c70..82f9bd2afe 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.Configuration.Grid } catch (Exception ex) { - _logger.Error(ex, "Could not parse the contents of grid.editors.config.js into a JSON array '{Json}", sourceString); + _logger.Error(ex, "Could not parse the contents of grid.editors.config.js into a JSON array '{Json}", sourceString); } } diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 8906752dd1..3b05adb20f 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -225,7 +225,7 @@ namespace Umbraco.Core.IO _shadowCurrentId = id; - _logger.Debug("Shadow '{ShadowId}'", _shadowCurrentId); + _logger.Debug("Shadow '{ShadowId}'", _shadowCurrentId); foreach (var wrapper in _shadowWrappers) wrapper.Shadow(_shadowCurrentId); @@ -242,7 +242,7 @@ namespace Umbraco.Core.IO if (id != _shadowCurrentId) throw new InvalidOperationException("Not the current shadow."); - _logger.Debug("UnShadow '{ShadowId}' {Status}", id, completed ? "complete" : "abort"); + _logger.Debug("UnShadow '{ShadowId}' {Status}", id, completed ? "complete" : "abort"); var exceptions = new List(); foreach (var wrapper in _shadowWrappers) diff --git a/src/Umbraco.Core/IO/MediaFileSystem.cs b/src/Umbraco.Core/IO/MediaFileSystem.cs index 05c02171ba..6743275be0 100644 --- a/src/Umbraco.Core/IO/MediaFileSystem.cs +++ b/src/Umbraco.Core/IO/MediaFileSystem.cs @@ -51,7 +51,7 @@ namespace Umbraco.Core.IO } catch (Exception e) { - _logger.Error(e, "Failed to delete media file '{File}'.", file); + _logger.Error(e, "Failed to delete media file '{File}'.", file); } }); } diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index a833ba43af..5ebe6817e5 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -74,11 +74,11 @@ namespace Umbraco.Core.IO } catch (UnauthorizedAccessException ex) { - Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath); + Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath); } catch (DirectoryNotFoundException ex) { - Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath); + Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath); } return Enumerable.Empty(); @@ -110,7 +110,7 @@ namespace Umbraco.Core.IO } catch (DirectoryNotFoundException ex) { - Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath); + Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath); } } @@ -190,11 +190,11 @@ namespace Umbraco.Core.IO } catch (UnauthorizedAccessException ex) { - Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath); + Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath); } catch (DirectoryNotFoundException ex) { - Current.Logger.Error(ex, "Directory not found for '{FullPath}'", fullPath); + Current.Logger.Error(ex, "Directory not found for '{FullPath}'", fullPath); } return Enumerable.Empty(); @@ -227,7 +227,7 @@ namespace Umbraco.Core.IO } catch (FileNotFoundException ex) { - Current.Logger.Error(ex.InnerException, "DeleteFile failed with FileNotFoundException for '{Path}'", fullPath); + Current.Logger.Error(ex.InnerException, "DeleteFile failed with FileNotFoundException for '{Path}'", fullPath); } } diff --git a/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs b/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs index d1bde55306..8f26f7e75c 100644 --- a/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs +++ b/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs @@ -129,5 +129,65 @@ namespace Umbraco.Core.Logging { System.Diagnostics.Debug.WriteLine(MessageTemplates.Render(messageTemplate, propertyValues), reporting.FullName); } + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1, T2 propertyValue2) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1, T2 propertyValue2) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + /// + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1, T2 propertyValue2) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1,propertyValue2 }); + /// + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + + public void Warn(Type reporting, string message, T0 propertyValue0) + => Warn(reporting, message, new object[] { propertyValue0 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Info(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Info(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0) + => Info(reporting, messageTemplate, new object[] { propertyValue0 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Debug(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Debug(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0) + => Debug(reporting, messageTemplate, new object[] { propertyValue0 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1,propertyValue2 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0 }); } } diff --git a/src/Umbraco.Core/Logging/DisposableTimer.cs b/src/Umbraco.Core/Logging/DisposableTimer.cs index ed98e5cfab..63ae3c2792 100644 --- a/src/Umbraco.Core/Logging/DisposableTimer.cs +++ b/src/Umbraco.Core/Logging/DisposableTimer.cs @@ -37,10 +37,10 @@ namespace Umbraco.Core.Logging switch (_level) { case LogLevel.Debug: - logger.Debug(loggerType, "{StartMessage} [Timing {TimingId}]", startMessage, _timingId); + logger.Debug(loggerType, "{StartMessage} [Timing {TimingId}]", startMessage, _timingId); break; case LogLevel.Information: - logger.Info(loggerType, "{StartMessage} [Timing {TimingId}]", startMessage, _timingId); + logger.Info(loggerType, "{StartMessage} [Timing {TimingId}]", startMessage, _timingId); break; default: throw new ArgumentOutOfRangeException(nameof(level)); @@ -84,15 +84,15 @@ namespace Umbraco.Core.Logging { if (_failed) { - _logger.Error(_loggerType, _failException, "{FailMessage} ({Duration}ms) [Timing {TimingId}]", _failMessage, Stopwatch.ElapsedMilliseconds, _timingId); + _logger.Error(_loggerType, _failException, "{FailMessage} ({Duration}ms) [Timing {TimingId}]", _failMessage, Stopwatch.ElapsedMilliseconds, _timingId); } else switch (_level) { case LogLevel.Debug: - _logger.Debug(_loggerType, "{EndMessage} ({Duration}ms) [Timing {TimingId}]", _endMessage, Stopwatch.ElapsedMilliseconds, _timingId); + _logger.Debug(_loggerType, "{EndMessage} ({Duration}ms) [Timing {TimingId}]", _endMessage, Stopwatch.ElapsedMilliseconds, _timingId); break; case LogLevel.Information: - _logger.Info(_loggerType, "{EndMessage} ({Duration}ms) [Timing {TimingId}]", _endMessage, Stopwatch.ElapsedMilliseconds, _timingId); + _logger.Info(_loggerType, "{EndMessage} ({Duration}ms) [Timing {TimingId}]", _endMessage, Stopwatch.ElapsedMilliseconds, _timingId); break; // filtered in the ctor //default: diff --git a/src/Umbraco.Core/Logging/ILogger.cs b/src/Umbraco.Core/Logging/ILogger.cs index 4f49d0b3b4..d8272b6aa0 100644 --- a/src/Umbraco.Core/Logging/ILogger.cs +++ b/src/Umbraco.Core/Logging/ILogger.cs @@ -52,7 +52,7 @@ namespace Umbraco.Core.Logging /// A message template. /// Property values. void Fatal(Type reporting, Exception exception, string messageTemplate, params object[] propertyValues); - + /// /// Logs a fatal message. /// @@ -92,7 +92,7 @@ namespace Umbraco.Core.Logging /// A message template. /// Property values. void Error(Type reporting, Exception exception, string messageTemplate, params object[] propertyValues); - + /// /// Logs an error message. /// @@ -132,6 +132,7 @@ namespace Umbraco.Core.Logging /// A message template. /// Property values. void Warn(Type reporting, Exception exception, string messageTemplate, params object[] propertyValues); + /// /// Logs an information message. @@ -147,6 +148,7 @@ namespace Umbraco.Core.Logging /// A message template. /// Property values. void Info(Type reporting, string messageTemplate, params object[] propertyValues); + /// /// Logs a debugging message. @@ -177,5 +179,6 @@ namespace Umbraco.Core.Logging /// A message template. /// Property values. void Verbose(Type reporting, string messageTemplate, params object[] propertyValues); + } } diff --git a/src/Umbraco.Core/Logging/ILogger2.cs b/src/Umbraco.Core/Logging/ILogger2.cs new file mode 100644 index 0000000000..0db8021f58 --- /dev/null +++ b/src/Umbraco.Core/Logging/ILogger2.cs @@ -0,0 +1,240 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Umbraco.Core.Logging +{ + public interface ILogger2 : ILogger + { + /// + /// Logs a fatal message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a fatal message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a fatal message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0); + + /// + /// Logs an error message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs an error message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs an error message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0); + + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + /// Property value 1 + void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// An exception. + /// A message template. + /// Property value 0 + void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0); + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + void Warn(Type reporting, string message, T0 propertyValue0); + + /// + /// Logs a info message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a info message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a info message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + void Info(Type reporting, string messageTemplate, T0 propertyValue0); + + /// + /// Logs a debug message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a debug message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a debug message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + void Debug(Type reporting, string messageTemplate, T0 propertyValue0); + + /// + /// Logs a verbose message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a verbose message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a verbose message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + void Verbose(Type reporting, string messageTemplate, T0 propertyValue0); + + + /// + /// Logs a error message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + void Error(Type reporting, string messageTemplate, T0 propertyValue0); + + /// + /// Logs a error message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Error(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + + /// + /// Logs a error message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Error(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + + /// + /// Logs a warning message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Warn(string messageTemplate, T0 propertyValue0, T1 propertyValue1); + /// + /// Logs a warning message. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Warn(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + /// Property value 2 + void Warn(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); + /// + /// Logs a warning message with an exception. + /// + /// The reporting type. + /// A message template. + /// Property value 0 + /// Property value 1 + void Warn(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1); + } +} diff --git a/src/Umbraco.Core/Logging/LogProfiler.cs b/src/Umbraco.Core/Logging/LogProfiler.cs index 74dae545b4..c0f8d1b525 100644 --- a/src/Umbraco.Core/Logging/LogProfiler.cs +++ b/src/Umbraco.Core/Logging/LogProfiler.cs @@ -24,8 +24,8 @@ namespace Umbraco.Core.Logging /// public IDisposable Step(string name) { - _logger.Debug("Begin: {ProfileName}", name); - return new LightDisposableTimer(duration => _logger.Info("End {ProfileName} ({ProfileDuration}ms)", name, duration)); + _logger.Debug("Begin: {ProfileName}", name); + return new LightDisposableTimer(duration => _logger.Info("End {ProfileName} ({ProfileDuration}ms)", name, duration)); } /// diff --git a/src/Umbraco.Core/Logging/Logger2Extensions.cs b/src/Umbraco.Core/Logging/Logger2Extensions.cs new file mode 100644 index 0000000000..c6c1352055 --- /dev/null +++ b/src/Umbraco.Core/Logging/Logger2Extensions.cs @@ -0,0 +1,442 @@ +using System; + +namespace Umbraco.Core.Logging +{ + public static class Logger2Extensions + { + public static void Debug(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Debug(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Debug(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(reporting, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Debug(reporting, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Debug(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(reporting, messageTemplate, propertyValue0); + } + else + { + logger.Debug(reporting, messageTemplate, propertyValue0); + } + } + + public static void Error(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Error(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Error(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Error(reporting, exception, messageTemplate, propertyValue0); + } + else + { + logger.Error(reporting, exception, messageTemplate, propertyValue0); + } + } + + public static void Fatal(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Fatal(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Fatal(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Fatal(reporting, exception, messageTemplate, propertyValue0); + } + else + { + logger.Fatal(reporting, exception, messageTemplate, propertyValue0); + } + } + + public static void Info(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Info(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Info(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Info(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Info(reporting, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Info(reporting, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Info(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Info(reporting, messageTemplate, propertyValue0); + } + else + { + logger.Info(reporting, messageTemplate, propertyValue0); + } + } + + public static void Verbose(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Verbose(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Verbose(this ILogger logger, Type reporting, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Verbose(reporting, messageTemplate, propertyValue0); + } + else + { + logger.Verbose(reporting, messageTemplate, propertyValue0); + } + } + + public static void Warn(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(reporting, messageTemplate, exception, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Warn(reporting, messageTemplate, exception, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Warn(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(reporting, messageTemplate, exception, propertyValue0, propertyValue1); + } + else + { + logger.Warn(reporting, messageTemplate, exception, propertyValue0, propertyValue1); + } + } + + public static void Warn(this ILogger logger, Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(reporting, messageTemplate, exception, propertyValue0); + } + else + { + logger.Warn(reporting, messageTemplate, exception, propertyValue0); + } + } + + public static void Warn(this ILogger logger, Type reporting, string message, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(reporting, message, propertyValue0); + } + else + { + logger.Warn(reporting, message, propertyValue0); + } + } + + // + public static void Error(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), exception, messageTemplate, propertyValue0); + } + else + { + logger.Error(typeof(T), exception, messageTemplate, propertyValue0); + } + } + + public static void Error(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Error(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Error(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Error(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + public static void Error(this ILogger logger, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), messageTemplate, propertyValue0); + } + else + { + logger.Error(typeof(T), messageTemplate, propertyValue0); + } + } + public static void Error(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Error(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + } + public static void Error(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Error(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Error(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + public static void Warn(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), exception, messageTemplate, propertyValue0); + } + else + { + logger.Warn(typeof(T), exception, messageTemplate, propertyValue0); + } + } + + public static void Warn(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Warn(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1); + } + } + + public static void Warn(this ILogger logger, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Warn(typeof(T), exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + public static void Warn(this ILogger logger, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), messageTemplate, propertyValue0); + } + else + { + logger.Warn(typeof(T), messageTemplate, propertyValue0); + } + } + public static void Warn(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Warn(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + } + public static void Warn(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Warn(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Warn(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + + + public static void Info(this ILogger logger, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Info(typeof(T), messageTemplate, propertyValue0); + } + else + { + logger.Info(typeof(T), messageTemplate, propertyValue0); + } + } + public static void Info(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Info(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Info(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + } + public static void Info(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Info(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Info(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + public static void Debug(this ILogger logger, string messageTemplate, T0 propertyValue0) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(typeof(T), messageTemplate, propertyValue0); + } + else + { + logger.Debug(typeof(T), messageTemplate, propertyValue0); + } + } + public static void Debug(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + else + { + logger.Debug(typeof(T), messageTemplate, propertyValue0, propertyValue1); + } + } + public static void Debug(this ILogger logger, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + if (logger is ILogger2 logger2) + { + logger2.Debug(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + else + { + logger.Debug(typeof(T), messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + } + } +} diff --git a/src/Umbraco.Core/Logging/OwinLogger.cs b/src/Umbraco.Core/Logging/OwinLogger.cs index 5601cb53f2..7fc36e748c 100644 --- a/src/Umbraco.Core/Logging/OwinLogger.cs +++ b/src/Umbraco.Core/Logging/OwinLogger.cs @@ -26,34 +26,34 @@ namespace Umbraco.Core.Logging switch (eventType) { case TraceEventType.Critical: - _logger.Fatal(_type.Value, exception, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Fatal(_type.Value, exception, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Error: - _logger.Error(_type.Value, exception, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Error(_type.Value, exception, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Warning: _logger.Warn(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Information: - _logger.Info(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Info(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Verbose: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Start: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Stop: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Suspend: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Resume: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; case TraceEventType.Transfer: - _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); + _logger.Debug(_type.Value, "[{EventType}] Event Id: {EventId}, State: {State}", eventType, eventId, state); return true; default: throw new ArgumentOutOfRangeException("eventType"); diff --git a/src/Umbraco.Core/Logging/ProfilingLogger.cs b/src/Umbraco.Core/Logging/ProfilingLogger.cs index d642926147..e49aaa26c6 100644 --- a/src/Umbraco.Core/Logging/ProfilingLogger.cs +++ b/src/Umbraco.Core/Logging/ProfilingLogger.cs @@ -127,6 +127,64 @@ namespace Umbraco.Core.Logging public void Verbose(Type reporting, string messageTemplate, params object[] propertyValues) => Logger.Verbose(reporting, messageTemplate, propertyValues); + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1, T2 propertyValue2) + => Logger.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Fatal(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Logger.Fatal(reporting, exception, messageTemplate, propertyValue0); + + public void Error(Type reporting, Exception exception, string messageTemplate, + T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Logger.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Error(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Logger.Error(reporting, exception, messageTemplate, propertyValue0); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Logger.Warn(reporting, exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Warn(reporting, exception, messageTemplate, propertyValue0, propertyValue1); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Logger.Warn(reporting, exception, messageTemplate, propertyValue0); + + public void Warn(Type reporting, string message, T0 propertyValue0) => Logger.Warn(reporting, message, propertyValue0); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Logger.Info(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Info(reporting, messageTemplate, propertyValue0, propertyValue1); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0) + => Logger.Info(reporting, messageTemplate, propertyValue0); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Logger.Debug(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Debug(reporting, messageTemplate, propertyValue0, propertyValue1); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0) + => Logger.Debug(reporting, messageTemplate, propertyValue0); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Logger.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Logger.Verbose(reporting, messageTemplate, propertyValue0, propertyValue1); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0) + => Logger.Verbose(reporting, messageTemplate, propertyValue0); + #endregion } } diff --git a/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs b/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs index a51628030e..0f6121c1ee 100644 --- a/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs +++ b/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs @@ -118,6 +118,30 @@ namespace Umbraco.Core.Logging.Serilog logger.Fatal(exception, messageTemplate, propertyValues); } + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Fatal, exception, ref messageTemplate); + logger.Fatal(exception, messageTemplate, propertyValue0); + } + + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Fatal, exception, ref messageTemplate); + logger.Fatal(exception, messageTemplate, propertyValue0, propertyValue1); + } + + /// + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Fatal, exception, ref messageTemplate); + logger.Fatal(exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + /// public void Error(Type reporting, Exception exception, string message) { @@ -154,6 +178,29 @@ namespace Umbraco.Core.Logging.Serilog DumpThreadAborts(logger, LogEventLevel.Error, exception, ref messageTemplate); logger.Error(exception, messageTemplate, propertyValues); } + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Error, exception, ref messageTemplate); + logger.Error(exception, messageTemplate, propertyValue0); + } + + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Error, exception, ref messageTemplate); + logger.Error(exception, messageTemplate, propertyValue0, propertyValue1); + } + + /// + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Error, exception, ref messageTemplate); + logger.Error(exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } private static void DumpThreadAborts(global::Serilog.ILogger logger, LogEventLevel level, Exception exception, ref string messageTemplate) { @@ -224,6 +271,12 @@ namespace Umbraco.Core.Logging.Serilog LoggerFor(reporting).Warning(message, propertyValues); } + /// + public void Warn(Type reporting, string message, T0 propertyValue0) + { + LoggerFor(reporting).Warning(message, propertyValue0); + } + /// public void Warn(Type reporting, Exception exception, string message) { @@ -235,6 +288,29 @@ namespace Umbraco.Core.Logging.Serilog { LoggerFor(reporting).Warning(exception, messageTemplate, propertyValues); } + /// + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Warning, exception, ref messageTemplate); + logger.Warning(exception, messageTemplate, propertyValue0); + } + + /// + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Warning, exception, ref messageTemplate); + logger.Warning(exception, messageTemplate, propertyValue0, propertyValue1); + } + + /// + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + var logger = LoggerFor(reporting); + DumpThreadAborts(logger, LogEventLevel.Warning, exception, ref messageTemplate); + logger.Warning(exception, messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } /// public void Info(Type reporting, string message) @@ -248,6 +324,23 @@ namespace Umbraco.Core.Logging.Serilog LoggerFor(reporting).Information(messageTemplate, propertyValues); } + + /// + public void Info(Type reporting, string messageTemplate, T0 propertyValue0) + { + LoggerFor(reporting).Information(messageTemplate, propertyValue0); + } + /// + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + LoggerFor(reporting).Information(messageTemplate, propertyValue0, propertyValue1); + } + /// + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + LoggerFor(reporting).Information(messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + /// public void Debug(Type reporting, string message) { @@ -259,6 +352,21 @@ namespace Umbraco.Core.Logging.Serilog { LoggerFor(reporting).Debug(messageTemplate, propertyValues); } + /// + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0) + { + LoggerFor(reporting).Debug(messageTemplate, propertyValue0); + } + /// + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + LoggerFor(reporting).Debug(messageTemplate, propertyValue0, propertyValue1); + } + /// + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + LoggerFor(reporting).Debug(messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } /// public void Verbose(Type reporting, string message) @@ -272,6 +380,22 @@ namespace Umbraco.Core.Logging.Serilog LoggerFor(reporting).Verbose(messageTemplate, propertyValues); } + /// + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0) + { + LoggerFor(reporting).Verbose(messageTemplate, propertyValue0); + } + /// + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + LoggerFor(reporting).Verbose(messageTemplate, propertyValue0, propertyValue1); + } + /// + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + LoggerFor(reporting).Verbose(messageTemplate, propertyValue0, propertyValue1, propertyValue2); + } + public void Dispose() { Log.CloseAndFlush(); diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs index 1ecc738b95..9bbb0875d8 100644 --- a/src/Umbraco.Core/Manifest/ManifestParser.cs +++ b/src/Umbraco.Core/Manifest/ManifestParser.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core.Manifest } catch (Exception e) { - _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); + _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path); } } diff --git a/src/Umbraco.Core/Manifest/ManifestWatcher.cs b/src/Umbraco.Core/Manifest/ManifestWatcher.cs index 4c0ddbf822..6c195edb45 100644 --- a/src/Umbraco.Core/Manifest/ManifestWatcher.cs +++ b/src/Umbraco.Core/Manifest/ManifestWatcher.cs @@ -54,7 +54,7 @@ namespace Umbraco.Core.Manifest if (_isRestarting) return; _isRestarting = true; - _logger.Info("Manifest has changed, app pool is restarting ({Path})", e.FullPath); + _logger.Info("Manifest has changed, app pool is restarting ({Path})", e.FullPath); HttpRuntime.UnloadAppDomain(); Dispose(); // uh? if the app restarts then this should be disposed anyways? } diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs index fb9b8af46d..7106ef188e 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs @@ -332,9 +332,9 @@ namespace Umbraco.Core.Migrations.Install } // save - logger.Info("Saving connection string to {ConfigFile}.", fileSource); + logger.Info("Saving connection string to {ConfigFile}.", fileSource); xml.Save(fileName, SaveOptions.DisableFormatting); - logger.Info("Saved connection string to {ConfigFile}.", fileSource); + logger.Info("Saved connection string to {ConfigFile}.", fileSource); } private static void AddOrUpdateAttribute(XElement element, string name, string value) @@ -459,7 +459,7 @@ namespace Umbraco.Core.Migrations.Install message = message + "

Installation completed!

"; //now that everything is done, we need to determine the version of SQL server that is executing - _logger.Info("Database configuration status: {DbConfigStatus}", message); + _logger.Info("Database configuration status: {DbConfigStatus}", message); return new Result { Message = message, Success = true, Percentage = "100" }; } @@ -508,7 +508,7 @@ namespace Umbraco.Core.Migrations.Install //now that everything is done, we need to determine the version of SQL server that is executing - _logger.Info("Database configuration status: {DbConfigStatus}", message); + _logger.Info("Database configuration status: {DbConfigStatus}", message); return new Result { Message = message, Success = true, Percentage = "100" }; } @@ -539,7 +539,7 @@ namespace Umbraco.Core.Migrations.Install if (_databaseSchemaValidationResult != null) { - _logger.Info("The database schema validation produced the following summary: {DbSchemaSummary}", _databaseSchemaValidationResult.GetSummary()); + _logger.Info("The database schema validation produced the following summary: {DbSchemaSummary}", _databaseSchemaValidationResult.GetSummary()); } return new Result diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index 9bd26749ad..44de611348 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Migrations.Install /// Name of the table to create base data for public void InitializeBaseData(string tableName) { - _logger.Info("Creating data in {TableName}", tableName); + _logger.Info("Creating data in {TableName}", tableName); if (tableName.Equals(Constants.DatabaseSchema.Tables.Node)) CreateNodeData(); @@ -73,7 +73,7 @@ namespace Umbraco.Core.Migrations.Install if (tableName.Equals(Constants.DatabaseSchema.Tables.KeyValue)) CreateKeyValueData(); - _logger.Info("Done creating table {TableName} data.", tableName); + _logger.Info("Done creating table {TableName} data.", tableName); } private void CreateNodeData() diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs index e9580da74a..c3756cfaad 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs @@ -100,7 +100,7 @@ namespace Umbraco.Core.Migrations.Install var tableNameAttribute = table.FirstAttribute(); var tableName = tableNameAttribute == null ? table.Name : tableNameAttribute.Value; - _logger.Info("Uninstall {TableName}", tableName); + _logger.Info("Uninstall {TableName}", tableName); try { @@ -111,7 +111,7 @@ namespace Umbraco.Core.Migrations.Install { //swallow this for now, not sure how best to handle this with diff databases... though this is internal // and only used for unit tests. If this fails its because the table doesn't exist... generally! - _logger.Error(ex, "Could not drop table {TableName}", tableName); + _logger.Error(ex, "Could not drop table {TableName}", tableName); } } } @@ -436,7 +436,7 @@ namespace Umbraco.Core.Migrations.Install var tableExist = TableExists(tableName); if (overwrite && tableExist) { - _logger.Info("Table {TableName} already exists, but will be recreated", tableName); + _logger.Info("Table {TableName} already exists, but will be recreated", tableName); DropTable(tableName); tableExist = false; @@ -445,19 +445,19 @@ namespace Umbraco.Core.Migrations.Install if (tableExist) { // The table exists and was not recreated/overwritten. - _logger.Info("Table {TableName} already exists - no changes were made", tableName); + _logger.Info("Table {TableName} already exists - no changes were made", tableName); return; } //Execute the Create Table sql _database.Execute(new Sql(createSql)); - _logger.Info("Create Table {TableName}: \n {Sql}", tableName, createSql); + _logger.Info("Create Table {TableName}: \n {Sql}", tableName, createSql); //If any statements exists for the primary key execute them here if (string.IsNullOrEmpty(createPrimaryKeySql) == false) { _database.Execute(new Sql(createPrimaryKeySql)); - _logger.Info("Create Primary Key:\n {Sql}", createPrimaryKeySql); + _logger.Info("Create Primary Key:\n {Sql}", createPrimaryKeySql); } if (SqlSyntax.SupportsIdentityInsert() && tableDefinition.Columns.Any(x => x.IsIdentity)) @@ -475,23 +475,23 @@ namespace Umbraco.Core.Migrations.Install foreach (var sql in indexSql) { _database.Execute(new Sql(sql)); - _logger.Info("Create Index:\n {Sql}", sql); + _logger.Info("Create Index:\n {Sql}", sql); } //Loop through foreignkey statements and execute sql foreach (var sql in foreignSql) { _database.Execute(new Sql(sql)); - _logger.Info("Create Foreign Key:\n {Sql}", sql); + _logger.Info("Create Foreign Key:\n {Sql}", sql); } if (overwrite) { - _logger.Info("Table {TableName} was recreated", tableName); + _logger.Info("Table {TableName} was recreated", tableName); } else { - _logger.Info("New table {TableName} was created", tableName); + _logger.Info("New table {TableName} was created", tableName); } } diff --git a/src/Umbraco.Core/Migrations/MigrationPlan.cs b/src/Umbraco.Core/Migrations/MigrationPlan.cs index 89c3c809e8..088d990221 100644 --- a/src/Umbraco.Core/Migrations/MigrationPlan.cs +++ b/src/Umbraco.Core/Migrations/MigrationPlan.cs @@ -294,11 +294,11 @@ namespace Umbraco.Core.Migrations if (migrationBuilder == null) throw new ArgumentNullException(nameof(migrationBuilder)); if (logger == null) throw new ArgumentNullException(nameof(logger)); - logger.Info("Starting '{MigrationName}'...", Name); + logger.Info("Starting '{MigrationName}'...", Name); var origState = fromState ?? string.Empty; - logger.Info("At {OrigState}", string.IsNullOrWhiteSpace(origState) ? "origin": origState); + logger.Info("At {OrigState}", string.IsNullOrWhiteSpace(origState) ? "origin": origState); if (!_transitions.TryGetValue(origState, out var transition)) ThrowOnUnknownInitialState(origState); @@ -308,7 +308,7 @@ namespace Umbraco.Core.Migrations while (transition != null) { - logger.Info("Execute {MigrationType}", transition.MigrationType.Name); + logger.Info("Execute {MigrationType}", transition.MigrationType.Name); var migration = migrationBuilder.Build(transition.MigrationType, context); migration.Migrate(); @@ -316,7 +316,7 @@ namespace Umbraco.Core.Migrations var nextState = transition.TargetState; origState = nextState; - logger.Info("At {OrigState}", origState); + logger.Info("At {OrigState}", origState); // throw a raw exception here: this should never happen as the plan has // been validated - this is just a paranoid safety test diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs index 95b272dcb4..b69158e433 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs @@ -94,7 +94,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { if (!LegacyAliases.Contains(dataType.EditorAlias)) { - _logger.Warn( + _logger.Warn( "Skipping validation of configuration for data type {NodeId} : {EditorAlias}." + " Please ensure that the configuration is valid. The site may fail to start and / or load data types and run.", dataType.NodeId, dataType.EditorAlias); @@ -104,7 +104,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { if (!LegacyAliases.Contains(newAlias)) { - _logger.Warn("Skipping validation of configuration for data type {NodeId} : {NewEditorAlias} (was: {EditorAlias})" + _logger.Warn("Skipping validation of configuration for data type {NodeId} : {NewEditorAlias} (was: {EditorAlias})" + " because no property editor with that alias was found." + " Please ensure that the configuration is valid. The site may fail to start and / or load data types and run.", dataType.NodeId, newAlias, dataType.EditorAlias); @@ -119,7 +119,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 } catch (Exception e) { - _logger.Warn(e, "Failed to validate configuration for data type {NodeId} : {NewEditorAlias} (was: {EditorAlias})." + _logger.Warn(e, "Failed to validate configuration for data type {NodeId} : {NewEditorAlias} (was: {EditorAlias})." + " Please fix the configuration and ensure it is valid. The site may fail to start and / or load data types and run.", dataType.NodeId, newAlias, dataType.EditorAlias); } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs index 06f5d45deb..2eadb6c045 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes public IPreValueMigrator GetMigrator(string editorAlias) { var migrator = this.FirstOrDefault(x => x.CanMigrate(editorAlias)); - _logger.Debug(GetType(), "Getting migrator for \"{EditorAlias}\" = {MigratorType}", editorAlias, migrator == null ? "" : migrator.GetType().Name); + _logger.Debug(GetType(), "Getting migrator for \"{EditorAlias}\" = {MigratorType}", editorAlias, migrator == null ? "" : migrator.GetType().Name); return migrator; } } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs index d30719231a..ed2681e6f1 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 } catch (Exception ex) { - Logger.Error( + Logger.Error( ex, "Invalid configuration: \"{Configuration}\", cannot convert editor.", dataType.Configuration); diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs index 37a83bdd67..d4f483c46e 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs @@ -36,7 +36,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 } catch (Exception ex) { - Logger.Error( + Logger.Error( ex, "Invalid property editor configuration detected: \"{Configuration}\", cannot convert editor, values will be cleared", dataType.Configuration); diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs index e96fa1f7e9..fadc3579f2 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs @@ -50,7 +50,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 } catch (Exception ex) { - Logger.Error( + Logger.Error( ex, "Invalid configuration: \"{Configuration}\", cannot convert editor.", dataType.Configuration); diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index 49e07a486d..07f43074a7 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -501,7 +501,7 @@ namespace Umbraco.Core.Models { void DoLog(string logPropertyAlias, string logPropertyName) { - Current.Logger.Warn("Trying to access the '{PropertyName}' property on '{MemberType}' " + + Current.Logger.Warn("Trying to access the '{PropertyName}' property on '{MemberType}' " + "but the {PropertyAlias} property does not exist on the member type so a default value is returned. " + "Ensure that you have a property type with alias: {PropertyAlias} configured on your member type in order to use the '{PropertyName}' property on the model correctly.", logPropertyName, @@ -526,7 +526,7 @@ namespace Umbraco.Core.Models { void DoLog(string logPropertyAlias, string logPropertyName) { - Current.Logger.Warn("An attempt was made to set a value on the property '{PropertyName}' on type '{MemberType}' but the " + + Current.Logger.Warn("An attempt was made to set a value on the property '{PropertyName}' on type '{MemberType}' but the " + "property type {PropertyAlias} does not exist on the member type, ensure that this property type exists so that setting this property works correctly.", logPropertyName, typeof(Member), diff --git a/src/Umbraco.Core/Packaging/PackageActionRunner.cs b/src/Umbraco.Core/Packaging/PackageActionRunner.cs index 8434f52f30..41dbc5cf4c 100644 --- a/src/Umbraco.Core/Packaging/PackageActionRunner.cs +++ b/src/Umbraco.Core/Packaging/PackageActionRunner.cs @@ -34,7 +34,7 @@ namespace Umbraco.Core.Packaging catch (Exception ex) { e.Add($"{ipa.Alias()} - {ex.Message}"); - _logger.Error(ex, "Error loading package action '{PackageActionAlias}' for package {PackageName}", ipa.Alias(), packageName); + _logger.Error(ex, "Error loading package action '{PackageActionAlias}' for package {PackageName}", ipa.Alias(), packageName); } } @@ -56,7 +56,7 @@ namespace Umbraco.Core.Packaging catch (Exception ex) { e.Add($"{ipa.Alias()} - {ex.Message}"); - _logger.Error(ex, "Error undoing package action '{PackageActionAlias}' for package {PackageName}", ipa.Alias(), packageName); + _logger.Error(ex, "Error undoing package action '{PackageActionAlias}' for package {PackageName}", ipa.Alias(), packageName); } } errors = e; diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs index 6262f99c56..016b349282 100644 --- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs @@ -564,7 +564,7 @@ namespace Umbraco.Core.Packaging var tryCreateFolder = _contentTypeService.CreateContainer(-1, rootFolder); if (tryCreateFolder == false) { - _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", rootFolder); + _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", rootFolder); throw tryCreateFolder.Exception; } var rootFolderId = tryCreateFolder.Result.Entity.Id; @@ -598,7 +598,7 @@ namespace Umbraco.Core.Packaging var tryCreateFolder = _contentTypeService.CreateContainer(current.Id, folderName); if (tryCreateFolder == false) { - _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", folderName); + _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", folderName); throw tryCreateFolder.Exception; } return _contentTypeService.GetContainer(tryCreateFolder.Result.Entity.Id); @@ -713,7 +713,7 @@ namespace Umbraco.Core.Packaging } else { - _logger.Warn("Packager: Error handling allowed templates. Template with alias '{TemplateAlias}' could not be found.", alias); + _logger.Warn("Packager: Error handling allowed templates. Template with alias '{TemplateAlias}' could not be found.", alias); } } @@ -729,7 +729,7 @@ namespace Umbraco.Core.Packaging } else { - _logger.Warn("Packager: Error handling default template. Default template with alias '{DefaultTemplateAlias}' could not be found.", defaultTemplateElement.Value); + _logger.Warn("Packager: Error handling default template. Default template with alias '{DefaultTemplateAlias}' could not be found.", defaultTemplateElement.Value); } } } @@ -801,7 +801,7 @@ namespace Umbraco.Core.Packaging if (dataTypeDefinition == null) { // TODO: We should expose this to the UI during install! - _logger.Warn("Packager: Error handling creation of PropertyType '{PropertyType}'. Could not find DataTypeDefintion with unique id '{DataTypeDefinitionId}' nor one referencing the DataType with a property editor alias (or legacy control id) '{PropertyEditorAlias}'. Did the package creator forget to package up custom datatypes? This property will be converted to a label/readonly editor if one exists.", + _logger.Warn("Packager: Error handling creation of PropertyType '{PropertyType}'. Could not find DataTypeDefintion with unique id '{DataTypeDefinitionId}' nor one referencing the DataType with a property editor alias (or legacy control id) '{PropertyEditorAlias}'. Did the package creator forget to package up custom datatypes? This property will be converted to a label/readonly editor if one exists.", property.Element("Name").Value, dataTypeDefinitionId, property.Element("Type").Value.Trim()); //convert to a label! @@ -863,7 +863,7 @@ namespace Umbraco.Core.Packaging var allowedChild = importedContentTypes.ContainsKey(alias) ? importedContentTypes[alias] : _contentTypeService.Get(alias); if (allowedChild == null) { - _logger.Warn( + _logger.Warn( "Packager: Error handling DocumentType structure. DocumentType with alias '{DoctypeAlias}' could not be found and was not added to the structure for '{DoctypeStructureAlias}'.", alias, contentType.Alias); continue; @@ -984,7 +984,7 @@ namespace Umbraco.Core.Packaging var tryCreateFolder = _dataTypeService.CreateContainer(-1, rootFolder); if (tryCreateFolder == false) { - _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", rootFolder); + _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", rootFolder); throw tryCreateFolder.Exception; } current = _dataTypeService.GetContainer(tryCreateFolder.Result.Entity.Id); @@ -1017,7 +1017,7 @@ namespace Umbraco.Core.Packaging var tryCreateFolder = _dataTypeService.CreateContainer(current.Id, folderName); if (tryCreateFolder == false) { - _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", folderName); + _logger.Error(tryCreateFolder.Exception, "Could not create folder: {FolderName}", folderName); throw tryCreateFolder.Exception; } return _dataTypeService.GetContainer(tryCreateFolder.Result.Entity.Id); @@ -1322,7 +1322,7 @@ namespace Umbraco.Core.Packaging else if (string.IsNullOrEmpty((string)elementCopy.Element("Master")) == false && templateElements.Any(x => (string)x.Element("Alias") == (string)elementCopy.Element("Master")) == false) { - _logger.Info( + _logger.Info( "Template '{TemplateAlias}' has an invalid Master '{TemplateMaster}', so the reference has been ignored.", (string)elementCopy.Element("Alias"), (string)elementCopy.Element("Master")); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index a78a073554..ddac0ee3d6 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -701,7 +701,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { if (ContentRepositoryBase.ThrowOnWarning) throw new InvalidOperationException($"The query returned multiple property sets for content {temp.Id}, {temp.ContentType.Name}"); - Logger.Warn>("The query returned multiple property sets for content {ContentId}, {ContentTypeName}", temp.Id, temp.ContentType.Name); + Logger.Warn, int, string>("The query returned multiple property sets for content {ContentId}, {ContentTypeName}", temp.Id, temp.ContentType.Name); } result[temp.VersionId] = new PropertyCollection(properties); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs index 483f2393af..6571a847a9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -228,7 +228,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (string.IsNullOrWhiteSpace(entity.Alias)) { var ex = new Exception($"ContentType '{entity.Name}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias."); - Logger.Error("ContentType '{EntityName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", entity.Name); + Logger.Error("ContentType '{EntityName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", entity.Name); throw ex; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index ed0c288691..a061337127 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -1203,7 +1203,7 @@ AND umbracoNode.id <> @id", { var ex = new InvalidOperationException($"Property Type '{pt.Name}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias."); - Logger.Error>("Property Type '{PropertyTypeName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", + Logger.Error, string>("Property Type '{PropertyTypeName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", pt.Name); throw ex; @@ -1216,7 +1216,7 @@ AND umbracoNode.id <> @id", { var ex = new InvalidOperationException($"{typeof(TEntity).Name} '{entity.Name}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias."); - Logger.Error>("{EntityTypeName} '{EntityName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", + Logger.Error, string, string>("{EntityTypeName} '{EntityName}' cannot have an empty Alias. This is most likely due to invalid characters stripped from the Alias.", typeof(TEntity).Name, entity.Name); @@ -1248,7 +1248,7 @@ AND umbracoNode.id <> @id", } else { - Logger.Warn>("Could not assign a data type for the property type {PropertyTypeAlias} since no data type was found with a property editor {PropertyEditorAlias}", propertyType.Alias, propertyType.PropertyEditorAlias); + Logger.Warn, string, string>("Could not assign a data type for the property type {PropertyTypeAlias} since no data type was found with a property editor {PropertyEditorAlias}", propertyType.Alias, propertyType.PropertyEditorAlias); } } } diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs index a95d95ea08..5e6192eb5c 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs @@ -203,10 +203,10 @@ namespace Umbraco.Core.Persistence protected override void OnException(Exception ex) { - _logger.Error(ex, "Exception ({InstanceId}).", InstanceId); - _logger.Debug("At:\r\n{StackTrace}", Environment.StackTrace); + _logger.Error(ex, "Exception ({InstanceId}).", InstanceId); + _logger.Debug("At:\r\n{StackTrace}", Environment.StackTrace); if (EnableSqlTrace == false) - _logger.Debug("Sql:\r\n{Sql}", CommandToString(LastSQL, LastArgs)); + _logger.Debug("Sql:\r\n{Sql}", CommandToString(LastSQL, LastArgs)); base.OnException(ex); } @@ -219,7 +219,7 @@ namespace Umbraco.Core.Persistence cmd.CommandTimeout = cmd.Connection.ConnectionTimeout; if (EnableSqlTrace) - _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // TODO: these escapes should be builtin + _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // TODO: these escapes should be builtin #if DEBUG_DATABASES // detects whether the command is already in use (eg still has an open reader...) diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs index baab8c486e..b113769a1a 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -162,7 +162,7 @@ namespace Umbraco.Core.Persistence // else leave unchanged } - _logger.Debug("SqlServer {SqlServerVersion}, DatabaseType is {DatabaseType} ({Source}).", + _logger.Debug("SqlServer {SqlServerVersion}, DatabaseType is {DatabaseType} ({Source}).", versionName, _databaseType, fromSettings ? "settings" : "detected"); } diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index eebe5f5722..fbcd5ec440 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -219,7 +219,7 @@ namespace Umbraco.Core.PropertyEditors var result = TryConvertValueToCrlType(editorValue.Value); if (result.Success == false) { - Current.Logger.Warn("The value {EditorValue} cannot be converted to the type {StorageTypeValue}", editorValue.Value, ValueTypes.ToStorageType(ValueType)); + Current.Logger.Warn("The value {EditorValue} cannot be converted to the type {StorageTypeValue}", editorValue.Value, ValueTypes.ToStorageType(ValueType)); return null; } return result.Result; diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/GridValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/GridValueConverter.cs index b3685457ec..fdb0a8c842 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/GridValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/GridValueConverter.cs @@ -96,7 +96,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters } catch (Exception ex) { - Current.Logger.Error(ex, "Could not parse the string '{JsonString}' to a json object", sourceString); + Current.Logger.Error(ex, "Could not parse the string '{JsonString}' to a json object", sourceString); } } diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs index 29e501f993..f8ef82076e 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs @@ -44,8 +44,8 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters } catch (Exception ex) { - // cannot deserialize, assume it may be a raw image URL - Current.Logger.Error(ex, "Could not deserialize string '{JsonString}' into an image cropper value.", sourceString); + // cannot deserialize, assume it may be a raw image url + Current.Logger.Error(ex, "Could not deserialize string '{JsonString}' into an image cropper value.", sourceString); value = new ImageCropperValue { Src = sourceString }; } diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs index 12e6238705..270c8c3b0b 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs @@ -57,7 +57,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters } catch (Exception ex) { - Current.Logger.Error(ex, "Could not parse the string '{JsonString}' to a json object", sourceString); + Current.Logger.Error(ex, "Could not parse the string '{JsonString}' to a json object", sourceString); } } diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs index 60e7851251..25bb5d3151 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs @@ -98,7 +98,7 @@ namespace Umbraco.Core.Runtime HostingEnvironment.ApplicationID, HostingEnvironment.ApplicationPhysicalPath, NetworkHelper.MachineName); - logger.Debug("Runtime: {Runtime}", GetType().FullName); + logger.Debug("Runtime: {Runtime}", GetType().FullName); // application environment ConfigureUnhandledException(); @@ -359,7 +359,7 @@ namespace Umbraco.Core.Runtime { _state.DetermineRuntimeLevel(databaseFactory); - profilingLogger.Debug("Runtime level: {RuntimeLevel} - {RuntimeLevelReason}", _state.Level, _state.Reason); + profilingLogger.Debug("Runtime level: {RuntimeLevel} - {RuntimeLevelReason}", _state.Level, _state.Reason); if (_state.Level == RuntimeLevel.Upgrade) { diff --git a/src/Umbraco.Core/Runtime/MainDom.cs b/src/Umbraco.Core/Runtime/MainDom.cs index 71842905dd..d930841289 100644 --- a/src/Umbraco.Core/Runtime/MainDom.cs +++ b/src/Umbraco.Core/Runtime/MainDom.cs @@ -101,14 +101,14 @@ namespace Umbraco.Core.Runtime lock (_locko) { - _logger.Debug("Signaled ({Signaled}) ({SignalSource})", _signaled ? "again" : "first", source); + _logger.Debug("Signaled ({Signaled}) ({SignalSource})", _signaled ? "again" : "first", source); if (_signaled) return; if (_isMainDom == false) return; // probably not needed _signaled = true; try { - _logger.Info("Stopping ({SignalSource})", source); + _logger.Info("Stopping ({SignalSource})", source); foreach (var callback in _callbacks.OrderBy(x => x.Key).Select(x => x.Value)) { try @@ -122,14 +122,14 @@ namespace Umbraco.Core.Runtime } } - _logger.Debug("Stopped ({SignalSource})", source); + _logger.Debug("Stopped ({SignalSource})", source); } finally { // in any case... _isMainDom = false; _mainDomLock.Dispose(); - _logger.Info("Released ({SignalSource})", source); + _logger.Info("Released ({SignalSource})", source); } } diff --git a/src/Umbraco.Core/Runtime/SqlMainDomLock.cs b/src/Umbraco.Core/Runtime/SqlMainDomLock.cs index f58b279a8d..d98d62cb20 100644 --- a/src/Umbraco.Core/Runtime/SqlMainDomLock.cs +++ b/src/Umbraco.Core/Runtime/SqlMainDomLock.cs @@ -100,7 +100,7 @@ namespace Umbraco.Core.Runtime // if we've inserted, then there was no MainDom so we can instantly acquire InsertLockRecord(_lockId, db); // so update with our appdomain id - _logger.Debug("Acquired with ID {LockId}", _lockId); + _logger.Debug("Acquired with ID {LockId}", _lockId); return true; } @@ -300,7 +300,7 @@ namespace Umbraco.Core.Runtime // so now we update the row with our appdomain id InsertLockRecord(_lockId, db); - _logger.Debug("Acquired with ID {LockId}", _lockId); + _logger.Debug("Acquired with ID {LockId}", _lockId); return true; } else if (mainDomRows.Count == 1 && !mainDomRows[0].Value.StartsWith(tempId)) @@ -359,7 +359,7 @@ namespace Umbraco.Core.Runtime // so now we update the row with our appdomain id InsertLockRecord(_lockId, db); - _logger.Debug("Acquired with ID {LockId}", _lockId); + _logger.Debug("Acquired with ID {LockId}", _lockId); return true; } catch (Exception ex) diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Core/RuntimeState.cs index c7a1a18d44..bfc125e44f 100644 --- a/src/Umbraco.Core/RuntimeState.cs +++ b/src/Umbraco.Core/RuntimeState.cs @@ -144,13 +144,13 @@ namespace Umbraco.Core { // there *is* a local version, but it does not match the code version // need to upgrade - _logger.Debug("Local version '{LocalVersion}' < code version '{CodeVersion}', need to upgrade Umbraco.", localVersion, codeVersion); + _logger.Debug("Local version '{LocalVersion}' < code version '{CodeVersion}', need to upgrade Umbraco.", localVersion, codeVersion); Level = RuntimeLevel.Upgrade; Reason = RuntimeLevelReason.UpgradeOldVersion; } else if (localVersion > codeVersion) { - _logger.Warn("Local version '{LocalVersion}' > code version '{CodeVersion}', downgrading is not supported.", localVersion, codeVersion); + _logger.Warn("Local version '{LocalVersion}' > code version '{CodeVersion}', downgrading is not supported.", localVersion, codeVersion); // in fact, this is bad enough that we want to throw Reason = RuntimeLevelReason.BootFailedCannotDowngrade; @@ -290,7 +290,7 @@ namespace Umbraco.Core CurrentMigrationState = KeyValueService.GetValue(database, stateValueKey); FinalMigrationState = upgrader.Plan.FinalState; - _logger.Debug("Final upgrade state is {FinalMigrationState}, database contains {DatabaseState}", FinalMigrationState, CurrentMigrationState ?? ""); + _logger.Debug("Final upgrade state is {FinalMigrationState}, database contains {DatabaseState}", FinalMigrationState, CurrentMigrationState ?? ""); return CurrentMigrationState != FinalMigrationState; } diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs index 24ef92278c..f69d62e649 100644 --- a/src/Umbraco.Core/Scoping/Scope.cs +++ b/src/Umbraco.Core/Scoping/Scope.cs @@ -311,7 +311,7 @@ namespace Umbraco.Core.Scoping if (completed.HasValue == false || completed.Value == false) { if (LogUncompletedScopes) - _logger.Debug("Uncompleted Child Scope at\r\n {StackTrace}", Environment.StackTrace); + _logger.Debug("Uncompleted Child Scope at\r\n {StackTrace}", Environment.StackTrace); _completed = false; } diff --git a/src/Umbraco.Core/Scoping/ScopeProvider.cs b/src/Umbraco.Core/Scoping/ScopeProvider.cs index 3c0fa94327..bf4e27bdb6 100644 --- a/src/Umbraco.Core/Scoping/ScopeProvider.cs +++ b/src/Umbraco.Core/Scoping/ScopeProvider.cs @@ -117,7 +117,7 @@ namespace Umbraco.Core.Scoping } // hard to inject into a static method :( - Current.Logger.Warn("Missed {TypeName} Object {ObjectKey}", typeof(T).Name, objectKey.ToString("N").Substring(0, 8)); + Current.Logger.Warn("Missed {TypeName} Object {ObjectKey}", typeof(T).Name, objectKey.ToString("N").Substring(0, 8)); #if DEBUG_SCOPES //Current.Logger.Debug("At:\r\n" + Head(Environment.StackTrace, 24)); #endif diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 8b1af5ca31..e5363d0e2b 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -1415,7 +1415,7 @@ namespace Umbraco.Core.Services.Implement var result = CommitDocumentChangesInternal(scope, d, saveEventArgs, allLangs.Value, d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } @@ -1425,7 +1425,7 @@ namespace Umbraco.Core.Services.Implement d.ContentSchedule.Clear(ContentScheduleAction.Expire, date); var result = Unpublish(d, userId: d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to unpublish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to unpublish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } } @@ -1479,7 +1479,7 @@ namespace Umbraco.Core.Services.Implement var impact = CultureImpact.Explicit(culture, IsDefaultCulture(allLangs.Value, culture)); var tryPublish = d.PublishCulture(impact) && _propertyValidationService.Value.IsPropertyDataValid(d, out invalidProperties, impact); if (invalidProperties != null && invalidProperties.Length > 0) - Logger.Warn("Scheduled publishing will fail for document {DocumentId} and culture {Culture} because of invalid properties {InvalidProperties}", + Logger.Warn("Scheduled publishing will fail for document {DocumentId} and culture {Culture} because of invalid properties {InvalidProperties}", d.Id, culture, string.Join(",", invalidProperties.Select(x => x.Alias))); publishing &= tryPublish; //set the culture to be published @@ -1496,7 +1496,7 @@ namespace Umbraco.Core.Services.Implement result = CommitDocumentChangesInternal(scope, d, saveEventArgs, allLangs.Value, d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } @@ -1510,7 +1510,7 @@ namespace Umbraco.Core.Services.Implement : SaveAndPublish(d, userId: d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } @@ -2640,7 +2640,7 @@ namespace Umbraco.Core.Services.Implement // raise Publishing event if (scope.Events.DispatchCancelable(Publishing, this, savingEventArgs.ToContentPublishingEventArgs())) { - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "publishing was cancelled"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "publishing was cancelled"); return new PublishResult(PublishResultType.FailedPublishCancelledByEvent, evtMsgs, content); } @@ -2692,7 +2692,7 @@ namespace Umbraco.Core.Services.Implement // either because it is 'publishing' or because it already has a published version if (content.PublishedState != PublishedState.Publishing && content.PublishedVersionId == 0) { - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document does not have published values"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document does not have published values"); return new PublishResult(PublishResultType.FailedPublishNothingToPublish, evtMsgs, content); } @@ -2705,20 +2705,20 @@ namespace Umbraco.Core.Services.Implement { case ContentStatus.Expired: if (!variesByCulture) - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document has expired"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document has expired"); else Logger.Info("Document {ContentName} (id={ContentId}) culture {Culture} cannot be published: {Reason}", content.Name, content.Id, culture, "document culture has expired"); return new PublishResult(!variesByCulture ? PublishResultType.FailedPublishHasExpired : PublishResultType.FailedPublishCultureHasExpired, evtMsgs, content); case ContentStatus.AwaitingRelease: if (!variesByCulture) - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document is awaiting release"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document is awaiting release"); else Logger.Info("Document {ContentName} (id={ContentId}) culture {Culture} cannot be published: {Reason}", content.Name, content.Id, culture, "document is culture awaiting release"); return new PublishResult(!variesByCulture ? PublishResultType.FailedPublishAwaitingRelease : PublishResultType.FailedPublishCultureAwaitingRelease, evtMsgs, content); case ContentStatus.Trashed: - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document is trashed"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document is trashed"); return new PublishResult(PublishResultType.FailedPublishIsTrashed, evtMsgs, content); } } @@ -2731,7 +2731,7 @@ namespace Umbraco.Core.Services.Implement var pathIsOk = content.ParentId == Constants.System.Root || IsPathPublished(GetParent(content)); if (!pathIsOk) { - Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "parent is not published"); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "parent is not published"); return new PublishResult(PublishResultType.FailedPublishPathNotPublished, evtMsgs, content); } } @@ -2768,11 +2768,11 @@ namespace Umbraco.Core.Services.Implement return new PublishResult(PublishResultType.FailedPublishNothingToPublish, evtMsgs, content); if (culturesUnpublishing.Count > 0) - Logger.Info("Document {ContentName} (id={ContentId}) cultures: {Cultures} have been unpublished.", + Logger.Info("Document {ContentName} (id={ContentId}) cultures: {Cultures} have been unpublished.", content.Name, content.Id, string.Join(",", culturesUnpublishing)); if (culturesPublishing.Count > 0) - Logger.Info("Document {ContentName} (id={ContentId}) cultures: {Cultures} have been published.", + Logger.Info("Document {ContentName} (id={ContentId}) cultures: {Cultures} have been published.", content.Name, content.Id, string.Join(",", culturesPublishing)); if (culturesUnpublishing.Count > 0 && culturesPublishing.Count > 0) @@ -2784,7 +2784,7 @@ namespace Umbraco.Core.Services.Implement return new PublishResult(PublishResultType.SuccessPublishCulture, evtMsgs, content); } - Logger.Info("Document {ContentName} (id={ContentId}) has been published.", content.Name, content.Id); + Logger.Info("Document {ContentName} (id={ContentId}) has been published.", content.Name, content.Id); return new PublishResult(evtMsgs, content); } @@ -2800,7 +2800,7 @@ namespace Umbraco.Core.Services.Implement // raise Unpublishing event if (scope.Events.DispatchCancelable(Unpublishing, this, new PublishEventArgs(content, evtMsgs))) { - Logger.Info("Document {ContentName} (id={ContentId}) cannot be unpublished: unpublishing was cancelled.", content.Name, content.Id); + Logger.Info("Document {ContentName} (id={ContentId}) cannot be unpublished: unpublishing was cancelled.", content.Name, content.Id); return new PublishResult(PublishResultType.FailedUnpublishCancelledByEvent, evtMsgs, content); } @@ -2832,12 +2832,12 @@ namespace Umbraco.Core.Services.Implement foreach (var p in pastReleases) content.ContentSchedule.Remove(p); if (pastReleases.Count > 0) - Logger.Info("Document {ContentName} (id={ContentId}) had its release date removed, because it was unpublished.", content.Name, content.Id); + Logger.Info("Document {ContentName} (id={ContentId}) had its release date removed, because it was unpublished.", content.Name, content.Id); // change state to unpublishing content.PublishedState = PublishedState.Unpublishing; - Logger.Info("Document {ContentName} (id={ContentId}) has been unpublished.", content.Name, content.Id); + Logger.Info("Document {ContentName} (id={ContentId}) has been unpublished.", content.Name, content.Id); return attempt; } @@ -3169,7 +3169,7 @@ namespace Umbraco.Core.Services.Implement if (rollbackSaveResult.Success == false) { //Log the error/warning - Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); } else { @@ -3178,7 +3178,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(RolledBack, this, rollbackEventArgs); //Logging & Audit message - Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); Audit(AuditType.RollBack, userId, id, $"Content '{content.Name}' was rolled back to version '{versionId}'"); } diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs index 4f5121def7..8f58de53bd 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs @@ -104,7 +104,7 @@ namespace Umbraco.Core.Services.Implement { if (xmlSource.ContainsKey(culture) == false) { - _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); + _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); return result; } @@ -124,7 +124,7 @@ namespace Umbraco.Core.Services.Implement { if (_dictionarySource.ContainsKey(culture) == false) { - _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); + _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); return result; } @@ -207,7 +207,7 @@ namespace Umbraco.Core.Services.Implement { if (_dictionarySource.ContainsKey(culture) == false) { - _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); + _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); return "[" + key + "]"; } @@ -245,7 +245,7 @@ namespace Umbraco.Core.Services.Implement { if (xmlSource.ContainsKey(culture) == false) { - _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); + _logger.Warn("The culture specified {Culture} was not found in any configured sources for this service", culture); return "[" + key + "]"; } diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs index 86913071fd..e25fbed509 100644 --- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs @@ -88,7 +88,7 @@ namespace Umbraco.Core.Services.Implement } catch (CultureNotFoundException) { - Current.Logger.Warn("The culture {CultureValue} found in the file {CultureFile} is not a valid culture", cultureVal, fileInfo.FullName); + Current.Logger.Warn("The culture {CultureValue} found in the file {CultureFile} is not a valid culture", cultureVal, fileInfo.FullName); //If the culture in the file is invalid, we'll just hope the file name is a valid culture below, otherwise // an exception will be thrown. } @@ -125,7 +125,7 @@ namespace Umbraco.Core.Services.Implement if (fileSourceFolder.Exists == false) { - Current.Logger.Warn("The folder does not exist: {FileSourceFolder}, therefore no sources will be discovered", fileSourceFolder.FullName); + Current.Logger.Warn("The folder does not exist: {FileSourceFolder}, therefore no sources will be discovered", fileSourceFolder.FullName); } else { @@ -203,7 +203,7 @@ namespace Umbraco.Core.Services.Implement } catch (Exception ex) { - _logger.Error(ex, "Could not load file into XML {File}", supplementaryFile.File.FullName); + _logger.Error(ex, "Could not load file into XML {File}", supplementaryFile.File.FullName); continue; } diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index 3c5f91e932..b6e42520f0 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -517,7 +517,7 @@ namespace Umbraco.Core.Services.Implement try { if (Sendmail != null) Sendmail(s, request.Mail, _logger); else s.Send(request.Mail); - _logger.Debug("Notification '{Action}' sent to {Username} ({Email})", request.Action, request.UserName, request.Email); + _logger.Debug("Notification '{Action}' sent to {Username} ({Email})", request.Action, request.UserName, request.Email); } catch (Exception ex) { diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index 7442169b44..49b0d23862 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -192,7 +192,7 @@ namespace Umbraco.Core.Sync if (count > Options.MaxProcessingInstructionCount) { //too many instructions, proceed to cold boot - Logger.Warn( + Logger.Warn( "The instruction count ({InstructionCount}) exceeds the specified MaxProcessingInstructionCount ({MaxProcessingInstructionCount})." + " The server will skip existing instructions, rebuild its caches and indexes entirely, adjust its last synced Id" + " to the latest found in the database and maintain cache updates based on that Id.", @@ -352,7 +352,7 @@ namespace Umbraco.Core.Sync } catch (JsonException ex) { - Logger.Error(ex, "Failed to deserialize instructions ({DtoId}: '{DtoInstructions}').", + Logger.Error(ex, "Failed to deserialize instructions ({DtoId}: '{DtoInstructions}').", dto.Id, dto.Instructions); @@ -410,7 +410,7 @@ namespace Umbraco.Core.Sync //} catch (Exception ex) { - Logger.Error( + Logger.Error ( ex, "DISTRIBUTED CACHE IS NOT UPDATED. Failed to execute instructions ({DtoId}: '{DtoInstructions}'). Instruction is being skipped/ignored", dto.Id, diff --git a/src/Umbraco.Core/Sync/ServerMessengerBase.cs b/src/Umbraco.Core/Sync/ServerMessengerBase.cs index bbf00c3a6b..1b13b49434 100644 --- a/src/Umbraco.Core/Sync/ServerMessengerBase.cs +++ b/src/Umbraco.Core/Sync/ServerMessengerBase.cs @@ -157,7 +157,7 @@ namespace Umbraco.Core.Sync { if (refresher == null) throw new ArgumentNullException(nameof(refresher)); - Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type RefreshByPayload", refresher.GetType()); + Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type RefreshByPayload", refresher.GetType()); var payloadRefresher = refresher as IPayloadCacheRefresher; if (payloadRefresher == null) @@ -179,7 +179,7 @@ namespace Umbraco.Core.Sync { if (refresher == null) throw new ArgumentNullException(nameof(refresher)); - Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type {MessageType}", refresher.GetType(), messageType); + Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type {MessageType}", refresher.GetType(), messageType); switch (messageType) { @@ -240,7 +240,7 @@ namespace Umbraco.Core.Sync { if (refresher == null) throw new ArgumentNullException(nameof(refresher)); - Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type {MessageType}", refresher.GetType(), messageType); + Current.Logger.Debug("Invoking refresher {RefresherType} on local server for message type {MessageType}", refresher.GetType(), messageType); var typedRefresher = refresher as ICacheRefresher; diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 569fdb4638..1cbf8a7b3f 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -131,6 +131,8 @@ + + diff --git a/src/Umbraco.Core/UriExtensions.cs b/src/Umbraco.Core/UriExtensions.cs index 60d9cd6ead..96e24e89db 100644 --- a/src/Umbraco.Core/UriExtensions.cs +++ b/src/Umbraco.Core/UriExtensions.cs @@ -4,6 +4,7 @@ using System.Linq; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.IO; +using Umbraco.Core.Logging; namespace Umbraco.Core { @@ -154,7 +155,7 @@ namespace Umbraco.Core } catch (ArgumentException) { - Current.Logger.Debug(typeof(UriExtensions), "Failed to determine if request was client side (invalid chars in path \"{Path}\"?)", url.LocalPath); + Current.Logger.Debug(typeof(UriExtensions), "Failed to determine if request was client side (invalid chars in path \"{Path}\"?)", url.LocalPath); return false; } } diff --git a/src/Umbraco.Examine/IndexRebuilder.cs b/src/Umbraco.Examine/IndexRebuilder.cs index b14ff25c57..1f953c8cbd 100644 --- a/src/Umbraco.Examine/IndexRebuilder.cs +++ b/src/Umbraco.Examine/IndexRebuilder.cs @@ -69,7 +69,7 @@ namespace Umbraco.Examine } catch (Exception e) { - _logger.Error(e, "Index populating failed for populator {Populator}", populator.GetType()); + _logger.Error(e, "Index populating failed for populator {Populator}", populator.GetType()); } } } diff --git a/src/Umbraco.Examine/UmbracoContentIndex.cs b/src/Umbraco.Examine/UmbracoContentIndex.cs index 88033b1407..2da35201b2 100644 --- a/src/Umbraco.Examine/UmbracoContentIndex.cs +++ b/src/Umbraco.Examine/UmbracoContentIndex.cs @@ -133,7 +133,7 @@ namespace Umbraco.Examine var filtered = c.NativeQuery(rawQuery); var results = filtered.Execute(); - ProfilingLogger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount); + ProfilingLogger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount); //need to queue a delete item for each one found QueueIndexOperation(results.Select(r => new IndexOperation(new ValueSet(r.Id), IndexOperationType.Delete))); diff --git a/src/Umbraco.Examine/UmbracoExamineIndex.cs b/src/Umbraco.Examine/UmbracoExamineIndex.cs index e1dd77b994..cc97178e5c 100644 --- a/src/Umbraco.Examine/UmbracoExamineIndex.cs +++ b/src/Umbraco.Examine/UmbracoExamineIndex.cs @@ -159,7 +159,7 @@ namespace Umbraco.Examine ///
protected override void AddDocument(Document doc, ValueSet valueSet, IndexWriter writer) { - ProfilingLogger.Debug(GetType(), + ProfilingLogger.Debug(GetType(), "Write lucene doc id:{DocumentId}, category:{DocumentCategory}, type:{DocumentItemType}", valueSet.Id, valueSet.Category, diff --git a/src/Umbraco.Tests.Benchmarks/LoggerAllocationBenchmark.cs b/src/Umbraco.Tests.Benchmarks/LoggerAllocationBenchmark.cs new file mode 100644 index 0000000000..818eeec7f1 --- /dev/null +++ b/src/Umbraco.Tests.Benchmarks/LoggerAllocationBenchmark.cs @@ -0,0 +1,58 @@ +using BenchmarkDotNet.Attributes; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Umbraco.Core.Logging; +using Umbraco.Tests.Benchmarks.Config; + +namespace Umbraco.Tests.Benchmarks +{ + [QuickRunWithMemoryDiagnoserConfig] + public class LoggerAllocationBenchmark + { + private string rawQuery = ""; + private int totalItemCount; + [Benchmark(Baseline = true)] + public void Baseline() + { + for (int i = 0; i < 1000; i++) + { + OriginalDebugSignature(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, totalItemCount); + } + + } + + [Benchmark()] + public void NewOverload2() + { + for (int i = 0; i < 1000; i++) + { + NewDebugSignature(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, totalItemCount); + } + } + public void OriginalDebugSignature(Type reporting, string messageTemplate, params object[] propertyValues) + { + + } + + public void NewDebugSignature(Type reporting, string messageTemplate, T1 param1, T2 param2) + { + + } + + // BenchmarkDotNet=v0.11.3, OS=Windows 10.0.18362 + //Intel Core i5-8265U CPU 1.60GHz(Kaby Lake R), 1 CPU, 8 logical and 4 physical cores + // [Host] : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.8.4180.0 + // Job-JIATTD : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.8.4180.0 + + //IterationCount=3 IterationTime=100.0000 ms LaunchCount = 1 + //WarmupCount=3 + + // Method | Mean | Error | StdDev | Ratio | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op | + //------------- |----------:|----------:|----------:|------:|------------:|------------:|------------:|--------------------:| + // Baseline | 14.599 us | 1.0882 us | 0.0596 us | 1.00 | 10.0420 | - | - | 32048 B | + // NewOverload2 | 1.775 us | 0.4056 us | 0.0222 us | 0.12 | - | - | - | - | + } +} diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index 58b45aa743..e349354dd8 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -55,6 +55,7 @@ + diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs index db8dc38d6d..d13bda9703 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/DictionaryPublishedContent.cs @@ -109,7 +109,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache else { // this is a property that does not correspond to anything, ignore and log - Current.Logger.Warn("Dropping property '{PropertyKey}' because it does not belong to the content type.", i.Key); + Current.Logger.Warn("Dropping property '{PropertyKey}' because it does not belong to the content type.", i.Key); } } } diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs index 84b6f2b91c..4bedfc9416 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PreviewContent.cs @@ -40,7 +40,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache } catch (Exception ex) { - Current.Logger.Error(ex, "Could not load preview set {PreviewSet} for user {UserId}.", _previewSet, _userId); + Current.Logger.Error(ex, "Could not load preview set {PreviewSet} for user {UserId}.", _previewSet, _userId); ClearPreviewSet(); @@ -146,7 +146,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache } catch (Exception ex) { - Current.Logger.Error(ex, "Couldn't delete preview set {FileName} for user {UserId}", file.Name, userId); + Current.Logger.Error(ex, "Couldn't delete preview set {FileName} for user {UserId}", file.Name, userId); } } diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs index 56033e6b0a..2b4ae40550 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMediaCache.cs @@ -338,7 +338,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache var miss = Interlocked.CompareExchange(ref _examineIndexMiss, 0, 0); // volatile read if (miss < ExamineIndexMissMax && Interlocked.Increment(ref _examineIndexMiss) == ExamineIndexMissMax) - Current.Logger.Warn("Failed ({ExamineIndexMissMax} times) to retrieve medias from Examine index and had to load" + Current.Logger.Warn("Failed ({ExamineIndexMissMax} times) to retrieve medias from Examine index and had to load" + " them from DB. This may indicate that the Examine index is corrupted.", ExamineIndexMissMax); return ConvertFromIMedia(media); @@ -356,7 +356,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache : ConvertFromXPathNavigator(media.Current); } - Current.Logger.Warn("Could not retrieve media {MediaId} from Examine index or from legacy library.GetMedia method", id); + Current.Logger.Warn("Could not retrieve media {MediaId} from Examine index or from legacy library.GetMedia method", id); return null; } diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs index 803b86aec5..a7e1f8598e 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs @@ -702,7 +702,7 @@ AND (umbracoNode.id=@id)"; // if something goes wrong remove the file DeleteXmlFile(); - Current.Logger.Error(ex, "Failed to save Xml to file '{FileName}'.", _xmlFileName); + Current.Logger.Error(ex, "Failed to save Xml to file '{FileName}'.", _xmlFileName); } } @@ -742,7 +742,7 @@ AND (umbracoNode.id=@id)"; // if something goes wrong remove the file DeleteXmlFile(); - Current.Logger.Error(ex, "Failed to save Xml to file '{FileName}'.", _xmlFileName); + Current.Logger.Error(ex, "Failed to save Xml to file '{FileName}'.", _xmlFileName); } } @@ -799,7 +799,7 @@ AND (umbracoNode.id=@id)"; } catch (Exception ex) { - Current.Logger.Error(ex, "Failed to load Xml from file '{FileName}'.", _xmlFileName); + Current.Logger.Error(ex, "Failed to load Xml from file '{FileName}'.", _xmlFileName); try { DeleteXmlFile(); @@ -1039,7 +1039,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; { foreach (var payload in payloads) { - Current.Logger.Debug("Notified {ChangeTypes} for content {ContentId}", payload.ChangeTypes, payload.Id); + Current.Logger.Debug("Notified {ChangeTypes} for content {ContentId}", payload.ChangeTypes, payload.Id); if (payload.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) { @@ -1072,7 +1072,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; if (content == null || content.Published == false || content.Trashed) { // no published version - Current.Logger.Debug("Notified, content {ContentId} has no published version.", payload.Id); + Current.Logger.Debug("Notified, content {ContentId} has no published version.", payload.Id); if (current != null) { @@ -1111,7 +1111,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; if (dtos.MoveNext() == false) { // gone fishing, remove (possible race condition) - Current.Logger.Debug("Notified, content {ContentId} gone fishing.", payload.Id); + Current.Logger.Debug("Notified, content {ContentId} gone fishing.", payload.Id); if (current != null) { @@ -1225,7 +1225,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; .ToArray(); foreach (var payload in payloads) - Current.Logger.Debug("Notified {ChangeTypes} for content type {ContentTypeId}", payload.ChangeTypes, payload.Id); + Current.Logger.Debug("Notified {ChangeTypes} for content type {ContentTypeId}", payload.ChangeTypes, payload.Id); if (ids.Length > 0) // must have refreshes, not only removes RefreshContentTypes(ids); @@ -1244,7 +1244,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder"; _contentTypeCache.ClearDataType(payload.Id); foreach (var payload in payloads) - Current.Logger.Debug("Notified {RemovedStatus} for data type {payload.Id}", + Current.Logger.Debug("Notified {RemovedStatus} for data type {payload.Id}", payload.Removed ? "Removed" : "Refreshed", payload.Id); diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs index 56c09b18ac..09dc0e17ef 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStoreFilePersister.cs @@ -61,7 +61,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache if (touched == false) return; - _logger.Debug("Created, save in {WaitMilliseconds}ms.", WaitMilliseconds); + _logger.Debug("Created, save in {WaitMilliseconds}ms.", WaitMilliseconds); _initialTouch = DateTime.Now; _timer = new Timer(_ => TimerRelease()); _timer.Change(WaitMilliseconds, 0); @@ -106,7 +106,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache else if (_timer == null) // we don't have a timer yet { - _logger.Debug("Touched, was idle, start and save in {WaitMilliseconds}ms.", WaitMilliseconds); + _logger.Debug("Touched, was idle, start and save in {WaitMilliseconds}ms.", WaitMilliseconds); _initialTouch = DateTime.Now; _timer = new Timer(_ => TimerRelease()); _timer.Change(WaitMilliseconds, 0); @@ -119,7 +119,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache if (DateTime.Now - _initialTouch < TimeSpan.FromMilliseconds(MaxWaitMilliseconds)) { - _logger.Debug("Touched, was waiting, can delay, save in {WaitMilliseconds}ms.", WaitMilliseconds); + _logger.Debug("Touched, was waiting, can delay, save in {WaitMilliseconds}ms.", WaitMilliseconds); _timer.Change(WaitMilliseconds, 0); } else diff --git a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs index 9f4304ebee..a3955f11aa 100644 --- a/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs +++ b/src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs @@ -128,7 +128,7 @@ namespace Umbraco.Tests.Services total.AddRange(ServiceContext.ContentService.GetPagedDescendants(content.Id, 0, int.MaxValue, out var _)); } TestProfiler.Disable(); - Current.Logger.Info("Returned {Total} items", total.Count); + Current.Logger.Info("Returned {Total} items", total.Count); } } diff --git a/src/Umbraco.Tests/TestHelpers/ConsoleLogger.cs b/src/Umbraco.Tests/TestHelpers/ConsoleLogger.cs index a3e36db363..f571f876b7 100644 --- a/src/Umbraco.Tests/TestHelpers/ConsoleLogger.cs +++ b/src/Umbraco.Tests/TestHelpers/ConsoleLogger.cs @@ -115,5 +115,62 @@ namespace Umbraco.Tests.TestHelpers { Console.WriteLine("VERBOSE {0} - {1}", reporting.Name, MessageTemplates.Render(messageTemplate, propertyValues)); } + + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Fatal(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Fatal(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Error(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Error(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Warn(Type reporting, Exception exception, string messageTemplate, T0 propertyValue0) + => Warn(reporting, exception, messageTemplate, new object[] { propertyValue0 }); + + public void Warn(Type reporting, string message, T0 propertyValue0) + => Warn(reporting, message, new object[] { propertyValue0 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Info(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Info(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Info(Type reporting, string messageTemplate, T0 propertyValue0) + => Info(reporting, messageTemplate, new object[] { propertyValue0 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Debug(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Debug(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Debug(Type reporting, string messageTemplate, T0 propertyValue0) + => Debug(reporting, messageTemplate, new object[] { propertyValue0 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1, propertyValue2 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0, propertyValue1 }); + + public void Verbose(Type reporting, string messageTemplate, T0 propertyValue0) + => Verbose(reporting, messageTemplate, new object[] { propertyValue0 }); } } diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs index 5f8d77f3b2..3ee24a23bf 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs @@ -72,7 +72,7 @@ namespace Umbraco.Web.Cache { // TODO: should this be fatal (ie, an exception)? var name = e.Sender.GetType().Name + "_" + e.EventName; - _logger.Warn("Dropping event {EventName} because no corresponding handler was found.", name); + _logger.Warn("Dropping event {EventName} because no corresponding handler was found.", name); continue; } diff --git a/src/Umbraco.Web/ContentApps/ContentAppFactoryCollection.cs b/src/Umbraco.Web/ContentApps/ContentAppFactoryCollection.cs index 07987aea3e..da587f672a 100644 --- a/src/Umbraco.Web/ContentApps/ContentAppFactoryCollection.cs +++ b/src/Umbraco.Web/ContentApps/ContentAppFactoryCollection.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web.ContentApps // dying is not user-friendly, so let's write to log instead, and wish people read logs... //throw new InvalidOperationException($"Duplicate content app aliases found: {string.Join(",", dups)}"); - _logger.Warn("Duplicate content app aliases found: {DuplicateAliases}", string.Join(",", dups)); + _logger.Warn("Duplicate content app aliases found: {DuplicateAliases}", string.Join(",", dups)); } return apps; diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs index e2ab829427..c354dd25ef 100644 --- a/src/Umbraco.Web/Editors/AuthenticationController.cs +++ b/src/Umbraco.Web/Editors/AuthenticationController.cs @@ -433,19 +433,19 @@ namespace Umbraco.Web.Editors var lockedOut = await UserManager.IsLockedOutAsync(model.UserId); if (lockedOut) { - Logger.Info("User {UserId} is currently locked out, unlocking and resetting AccessFailedCount", model.UserId); + Logger.Info("User {UserId} is currently locked out, unlocking and resetting AccessFailedCount", model.UserId); //// var user = await UserManager.FindByIdAsync(model.UserId); var unlockResult = await UserManager.SetLockoutEndDateAsync(model.UserId, DateTimeOffset.Now); if (unlockResult.Succeeded == false) { - Logger.Warn("Could not unlock for user {UserId} - error {UnlockError}", model.UserId, unlockResult.Errors.First()); + Logger.Warn("Could not unlock for user {UserId} - error {UnlockError}", model.UserId, unlockResult.Errors.First()); } var resetAccessFailedCountResult = await UserManager.ResetAccessFailedCountAsync(model.UserId); if (resetAccessFailedCountResult.Succeeded == false) { - Logger.Warn("Could not reset access failed count {UserId} - error {UnlockError}", model.UserId, unlockResult.Errors.First()); + Logger.Warn("Could not reset access failed count {UserId} - error {UnlockError}", model.UserId, unlockResult.Errors.First()); } } @@ -499,7 +499,7 @@ namespace Umbraco.Web.Editors Core.Constants.Security.BackOfficeAuthenticationType, Core.Constants.Security.BackOfficeExternalAuthenticationType); - Logger.Info("User {UserName} from IP address {RemoteIpAddress} has logged out", User.Identity == null ? "UNKNOWN" : User.Identity.Name, owinContext.Request.RemoteIpAddress); + Logger.Info("User {UserName} from IP address {RemoteIpAddress} has logged out", User.Identity == null ? "UNKNOWN" : User.Identity.Name, owinContext.Request.RemoteIpAddress); if (UserManager != null) { diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index ff618ba0a6..bf3c9d083b 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -129,7 +129,7 @@ namespace Umbraco.Web.Editors if (parts.Length != 2) { - Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); + Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); return RedirectToAction("Default"); } @@ -138,7 +138,7 @@ namespace Umbraco.Web.Editors var decoded = token.FromUrlBase64(); if (decoded.IsNullOrWhiteSpace()) { - Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); + Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); return RedirectToAction("Default"); } @@ -146,14 +146,14 @@ namespace Umbraco.Web.Editors int intId; if (int.TryParse(id, out intId) == false) { - Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); + Logger.Warn("VerifyUser endpoint reached with invalid token: {Invite}", invite); return RedirectToAction("Default"); } var identityUser = await UserManager.FindByIdAsync(intId); if (identityUser == null) { - Logger.Warn("VerifyUser endpoint reached with non existing user: {UserId}", id); + Logger.Warn("VerifyUser endpoint reached with non existing user: {UserId}", id); return RedirectToAction("Default"); } @@ -161,7 +161,7 @@ namespace Umbraco.Web.Editors if (result.Succeeded == false) { - Logger.Warn("Could not verify email, Error: {Errors}, Token: {Invite}", string.Join(",", result.Errors), invite); + Logger.Warn("Could not verify email, Error: {Errors}, Token: {Invite}", string.Join(",", result.Errors), invite); return new RedirectResult(Url.Action("Default") + "#/login/false?invite=3"); } @@ -434,7 +434,7 @@ namespace Umbraco.Web.Editors var authType = OwinContext.Authentication.GetExternalAuthenticationTypes().FirstOrDefault(x => x.AuthenticationType == loginInfo.Login.LoginProvider); if (authType == null) { - Logger.Warn("Could not find external authentication provider registered: {LoginProvider}", loginInfo.Login.LoginProvider); + Logger.Warn("Could not find external authentication provider registered: {LoginProvider}", loginInfo.Login.LoginProvider); } else { @@ -451,7 +451,7 @@ namespace Umbraco.Web.Editors shouldSignIn = autoLinkOptions.OnExternalLogin(user, loginInfo); if (shouldSignIn == false) { - Logger.Warn("The AutoLinkOptions of the external authentication provider '{LoginProvider}' have refused the login based on the OnExternalLogin method. Affected user id: '{UserId}'", loginInfo.Login.LoginProvider, user.Id); + Logger.Warn("The AutoLinkOptions of the external authentication provider '{LoginProvider}' have refused the login based on the OnExternalLogin method. Affected user id: '{UserId}'", loginInfo.Login.LoginProvider, user.Id); } } diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 7093edf23d..edc5077558 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -1978,7 +1978,7 @@ namespace Umbraco.Web.Editors if (template == null) { //ModelState.AddModelError("Template", "No template exists with the specified alias: " + contentItem.TemplateAlias); - Logger.Warn("No template exists with the specified alias: {TemplateAlias}", contentSave.TemplateAlias); + Logger.Warn("No template exists with the specified alias: {TemplateAlias}", contentSave.TemplateAlias); } else if (template.Id != contentSave.PersistedContent.TemplateId) { diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index 893c9f5941..d94ab8058f 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.Editors // get the property editor if (propertyDto.PropertyEditor == null) { - Logger.Warn("No property editor found for property {PropertyAlias}", propertyDto.Alias); + Logger.Warn("No property editor found for property {PropertyAlias}", propertyDto.Alias); continue; } diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 5074a14782..a72e27b903 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -359,7 +359,7 @@ namespace Umbraco.Web.Editors var tryCreateTemplate = Services.FileService.CreateTemplateForContentType(contentTypeAlias, contentTypeName); if (tryCreateTemplate == false) { - Logger.Warn("Could not create a template for Content Type: \"{ContentTypeAlias}\", status: {Status}", + Logger.Warn("Could not create a template for Content Type: \"{ContentTypeAlias}\", status: {Status}", contentTypeAlias, tryCreateTemplate.Result.Result); } @@ -544,7 +544,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(ex, "Error cleaning up temporary udt file in App_Data: {File}", filePath); + Logger.Error(ex, "Error cleaning up temporary udt file in App_Data: {File}", filePath); } return Request.CreateResponse(HttpStatusCode.OK); @@ -591,7 +591,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(ex, "Error uploading udt file to App_Data: {File}", destFileName); + Logger.Error(ex, "Error uploading udt file to App_Data: {File}", destFileName); } if (ext.InvariantEquals("udt")) diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index eef0b5df93..da620eb5ac 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -76,7 +76,7 @@ namespace Umbraco.Web.Editors } catch (HttpRequestException ex) { - Logger.Error(ex.InnerException ?? ex, "Error getting dashboard content from {Url}", url); + Logger.Error(ex.InnerException ?? ex, "Error getting dashboard content from {Url}", url); //it's still new JObject() - we return it like this to avoid error codes which triggers UI warnings AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 5, 0)); @@ -114,7 +114,7 @@ namespace Umbraco.Web.Editors } catch (HttpRequestException ex) { - Logger.Error(ex.InnerException ?? ex, "Error getting dashboard CSS from {Url}", url); + Logger.Error(ex.InnerException ?? ex, "Error getting dashboard CSS from {Url}", url); //it's still string.Empty - we return it like this to avoid error codes which triggers UI warnings AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 5, 0)); @@ -178,7 +178,7 @@ namespace Umbraco.Web.Editors } catch (HttpRequestException ex) { - Logger.Error(ex.InnerException ?? ex, "Error getting remote dashboard data from {UrlPrefix}{Url}", urlPrefix, url); + Logger.Error(ex.InnerException ?? ex, "Error getting remote dashboard data from {UrlPrefix}{Url}", urlPrefix, url); //it's still string.Empty - we return it like this to avoid error codes which triggers UI warnings AppCaches.RuntimeCache.InsertCacheItem(key, () => result, new TimeSpan(0, 5, 0)); diff --git a/src/Umbraco.Web/Editors/DictionaryController.cs b/src/Umbraco.Web/Editors/DictionaryController.cs index f3246276b1..fcc2e2af02 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -124,7 +124,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(GetType(), ex, "Error creating dictionary with {Name} under {ParentId}", key, parentId); + Logger.Error(GetType(), ex, "Error creating dictionary with {Name} under {ParentId}", key, parentId); return Request.CreateNotificationValidationErrorResponse("Error creating dictionary item"); } } @@ -254,7 +254,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(GetType(), ex, "Error saving dictionary with {Name} under {ParentId}", dictionary.Name, dictionary.ParentId); + Logger.Error(GetType(), ex, "Error saving dictionary with {Name} under {ParentId}", dictionary.Name, dictionary.ParentId); throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Something went wrong saving dictionary")); } } diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs index cf1dfd5d5d..49599bc8b9 100644 --- a/src/Umbraco.Web/Editors/ExamineManagementController.cs +++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs @@ -131,7 +131,7 @@ namespace Umbraco.Web.Editors if (!validate.IsSuccessStatusCode) return validate; - _logger.Info("Rebuilding index '{IndexName}'", indexName); + _logger.Info("Rebuilding index '{IndexName}'", indexName); //remove it in case there's a handler there already index.IndexOperationComplete -= Indexer_IndexOperationComplete; @@ -253,7 +253,7 @@ namespace Umbraco.Web.Editors { var indexer = (IIndex)sender; - _logger.Debug("Logging operation completed for index {IndexName}", indexer.Name); + _logger.Debug("Logging operation completed for index {IndexName}", indexer.Name); //ensure it's not listening anymore indexer.IndexOperationComplete -= Indexer_IndexOperationComplete; diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs index 2698a68b40..816325fe56 100644 --- a/src/Umbraco.Web/Editors/PasswordChanger.cs +++ b/src/Umbraco.Web/Editors/PasswordChanger.cs @@ -95,7 +95,7 @@ namespace Umbraco.Web.Editors if (resetResult.Succeeded == false) { var errors = string.Join(". ", resetResult.Errors); - _logger.Warn("Could not reset user password {PasswordErrors}", errors); + _logger.Warn("Could not reset user password {PasswordErrors}", errors); return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "resetPassword" }) }); } @@ -136,7 +136,7 @@ namespace Umbraco.Web.Editors { //no, fail with error messages for "password" var errors = string.Join(". ", changeResult.Errors); - _logger.Warn("Could not change user password {PasswordErrors}", errors); + _logger.Warn("Could not change user password {PasswordErrors}", errors); return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "password" }) }); } return Attempt.Succeed(new PasswordChangedModel()); @@ -197,7 +197,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - _logger.Warn("Could not change member password", ex); + _logger.Warn(ex,"Could not change member password"); return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); } } diff --git a/src/Umbraco.Web/Editors/RelationTypeController.cs b/src/Umbraco.Web/Editors/RelationTypeController.cs index 3e45600be9..e56d856933 100644 --- a/src/Umbraco.Web/Editors/RelationTypeController.cs +++ b/src/Umbraco.Web/Editors/RelationTypeController.cs @@ -155,7 +155,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(GetType(), ex, "Error creating relation type with {Name}", relationType.Name); + Logger.Error(GetType(), ex, "Error creating relation type with {Name}", relationType.Name); return Request.CreateNotificationValidationErrorResponse("Error creating relation type."); } } @@ -186,7 +186,7 @@ namespace Umbraco.Web.Editors } catch (Exception ex) { - Logger.Error(GetType(), ex, "Error saving relation type with {Id}", relationType.Id); + Logger.Error(GetType(), ex, "Error saving relation type with {Id}", relationType.Id); throw new HttpResponseException(Request.CreateNotificationValidationErrorResponse("Something went wrong when saving the relation type")); } } diff --git a/src/Umbraco.Web/Editors/TinyMceController.cs b/src/Umbraco.Web/Editors/TinyMceController.cs index 1d292c64fd..1ceb4f0a1f 100644 --- a/src/Umbraco.Web/Editors/TinyMceController.cs +++ b/src/Umbraco.Web/Editors/TinyMceController.cs @@ -100,7 +100,7 @@ namespace Umbraco.Web.Editors catch (Exception ex) { // IOException, PathTooLong, DirectoryNotFound, UnathorizedAccess - Logger.Error(ex, "Error when trying to move {CurrentFilePath} to {NewFilePath}", currentFile, newFilePath); + Logger.Error(ex, "Error when trying to move {CurrentFilePath} to {NewFilePath}", currentFile, newFilePath); return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, $"Error when trying to move {currentFile} to {newFilePath}", ex); } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckController.cs b/src/Umbraco.Web/HealthCheck/HealthCheckController.cs index 2f72b946de..770b41c323 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckController.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckController.cs @@ -73,7 +73,7 @@ namespace Umbraco.Web.HealthCheck } catch (Exception ex) { - _logger.Error(ex, "Exception in health check: {HealthCheckName}", check.Name); + _logger.Error(ex, "Exception in health check: {HealthCheckName}", check.Name); throw; } } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs index 61028699f0..9f58e04f79 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.HealthCheck } catch (Exception ex) { - Logger.Error(ex, "Error running scheduled health check: {HealthCheckName}", t.Name); + Logger.Error(ex, "Error running scheduled health check: {HealthCheckName}", t.Name); var message = $"Health check failed with exception: {ex.Message}. See logs for details."; return new List { @@ -62,16 +62,16 @@ namespace Umbraco.Web.HealthCheck var checkIsSuccess = result.Value.All(x => x.ResultType == StatusResultType.Success); if (checkIsSuccess) { - Logger.Info("Checks for '{HealthCheckName}' all completed successfully.", checkName); + Logger.Info("Checks for '{HealthCheckName}' all completed successfully.", checkName); } else { - Logger.Warn("Checks for '{HealthCheckName}' completed with errors.", checkName); + Logger.Warn("Checks for '{HealthCheckName}' completed with errors.", checkName); } foreach (var checkResult in checkResults) { - Logger.Info("Result for {HealthCheckName}: {HealthCheckResult}, Message: '{HealthCheckMessage}'", checkName, checkResult.ResultType, checkResult.Message); + Logger.Info("Result for {HealthCheckName}: {HealthCheckResult}, Message: '{HealthCheckMessage}'", checkName, checkResult.ResultType, checkResult.Message); } } } diff --git a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs index 78b55a8930..dad2f9e3f3 100644 --- a/src/Umbraco.Web/ImageCropperTemplateExtensions.cs +++ b/src/Umbraco.Web/ImageCropperTemplateExtensions.cs @@ -9,6 +9,7 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors.ValueConverters; using Umbraco.Web.Models; +using Umbraco.Core.Logging; namespace Umbraco.Web { @@ -270,7 +271,7 @@ namespace Umbraco.Web } catch (Exception ex) { - Current.Logger.Error(typeof(ImageCropperTemplateExtensions), ex, "Could not parse the json string: {Json}", json); + Current.Logger.Error(typeof(ImageCropperTemplateExtensions), ex, "Could not parse the json string: {Json}", json); } } diff --git a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs index d151df46f7..924bd3ff99 100644 --- a/src/Umbraco.Web/Install/Controllers/InstallApiController.cs +++ b/src/Umbraco.Web/Install/Controllers/InstallApiController.cs @@ -120,7 +120,7 @@ namespace Umbraco.Web.Install.Controllers catch (Exception ex) { - _logger.Error(ex, "An error occurred during installation step {Step}", step.Name); + _logger.Error(ex, "An error occurred during installation step {Step}", step.Name); if (ex is TargetInvocationException && ex.InnerException != null) { @@ -210,7 +210,7 @@ namespace Umbraco.Web.Install.Controllers } catch (Exception ex) { - _logger.Error(ex, "Checking if step requires execution ({Step}) failed.", step.Name); + _logger.Error(ex, "Checking if step requires execution ({Step}) failed.", step.Name); throw; } } @@ -232,7 +232,7 @@ namespace Umbraco.Web.Install.Controllers } catch (Exception ex) { - _logger.Error(ex, "Installation step {Step} failed.", step.Name); + _logger.Error(ex, "Installation step {Step} failed.", step.Name); throw; } } diff --git a/src/Umbraco.Web/JavaScript/ClientDependencyConfiguration.cs b/src/Umbraco.Web/JavaScript/ClientDependencyConfiguration.cs index 2bf069b06d..019c7e29a6 100644 --- a/src/Umbraco.Web/JavaScript/ClientDependencyConfiguration.cs +++ b/src/Umbraco.Web/JavaScript/ClientDependencyConfiguration.cs @@ -79,7 +79,7 @@ namespace Umbraco.Web.JavaScript versionAttribute.SetValue(newVersion); clientDependencyConfigXml.Save(_fileName, SaveOptions.DisableFormatting); - _logger.Info("Updated version number from {OldVersion} to {NewVersion}", oldVersion, newVersion); + _logger.Info("Updated version number from {OldVersion} to {NewVersion}", oldVersion, newVersion); return true; } } diff --git a/src/Umbraco.Web/Macros/MacroRenderer.cs b/src/Umbraco.Web/Macros/MacroRenderer.cs index 54ce640855..e6c94ef3cf 100755 --- a/src/Umbraco.Web/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web/Macros/MacroRenderer.cs @@ -89,7 +89,7 @@ namespace Umbraco.Web.Macros if (macroContent == null) return null; - _plogger.Debug("Macro content loaded from cache '{MacroCacheId}'", model.CacheIdentifier); + _plogger.Debug("Macro content loaded from cache '{MacroCacheId}'", model.CacheIdentifier); // ensure that the source has not changed // note: does not handle dependencies, and never has @@ -149,7 +149,7 @@ namespace Umbraco.Web.Macros priority: CacheItemPriority.NotRemovable ); - _plogger.Debug("Macro content saved to cache '{MacroCacheId}'", model.CacheIdentifier); + _plogger.Debug("Macro content saved to cache '{MacroCacheId}'", model.CacheIdentifier); } // gets the macro source file name @@ -284,7 +284,7 @@ namespace Umbraco.Web.Macros } catch (Exception e) { - _plogger.Warn(e, "Failed {MsgIn}", msgIn); + _plogger.Warn(e, "Failed {MsgIn}", msgIn); var macroErrorEventArgs = new MacroErrorEventArgs { diff --git a/src/Umbraco.Web/Media/UploadAutoFillProperties.cs b/src/Umbraco.Web/Media/UploadAutoFillProperties.cs index 60de03b450..4e0201ad99 100644 --- a/src/Umbraco.Web/Media/UploadAutoFillProperties.cs +++ b/src/Umbraco.Web/Media/UploadAutoFillProperties.cs @@ -74,7 +74,7 @@ namespace Umbraco.Web.Media } catch (Exception ex) { - _logger.Error(typeof(UploadAutoFillProperties), ex, "Could not populate upload auto-fill properties for file '{File}'.", filepath); + _logger.Error(typeof(UploadAutoFillProperties), ex, "Could not populate upload auto-fill properties for file '{File}'.", filepath); ResetProperties(content, autoFillConfig, culture, segment); } } diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs index 2e035430df..bcfeb5e330 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyBasicMapper.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.Models.Mapping var editor = _propertyEditors[property.PropertyType.PropertyEditorAlias]; if (editor == null) { - _logger.Error>( + _logger.Error, string>( new NullReferenceException("The property editor with alias " + property.PropertyType.PropertyEditorAlias + " does not exist"), "No property editor '{PropertyEditorAlias}' found, converting to a Label", property.PropertyType.PropertyEditorAlias); diff --git a/src/Umbraco.Web/Models/Mapping/DataTypeMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/DataTypeMapDefinition.cs index 6b5797e05b..817d99c0fd 100644 --- a/src/Umbraco.Web/Models/Mapping/DataTypeMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/DataTypeMapDefinition.cs @@ -173,7 +173,7 @@ namespace Umbraco.Web.Models.Mapping else { // weird - just leave the field without a value - but warn - _logger.Warn("Could not find a value for configuration field '{ConfigField}'", field.Key); + _logger.Warn("Could not find a value for configuration field '{ConfigField}'", field.Key); } } } diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs index e654fc16a1..216e1e100e 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs @@ -73,7 +73,7 @@ namespace Umbraco.Web.Models.Mapping { //we'll just map this to a text box paramEditor = _parameterEditors[Constants.PropertyEditors.Aliases.TextBox]; - _logger.Warn("Could not resolve a parameter editor with alias {PropertyEditorAlias}, a textbox will be rendered in it's place", source.EditorAlias); + _logger.Warn("Could not resolve a parameter editor with alias {PropertyEditorAlias}, a textbox will be rendered in it's place", source.EditorAlias); } target.View = paramEditor.GetValueEditor().View; diff --git a/src/Umbraco.Web/Mvc/RenderMvcController.cs b/src/Umbraco.Web/Mvc/RenderMvcController.cs index 64c9ad52c4..7c0345c300 100644 --- a/src/Umbraco.Web/Mvc/RenderMvcController.cs +++ b/src/Umbraco.Web/Mvc/RenderMvcController.cs @@ -68,7 +68,7 @@ namespace Umbraco.Web.Mvc var result = ViewEngines.Engines.FindView(ControllerContext, template, null); if (result.View != null) return true; - Logger.Warn("No physical template file was found for template {Template}", template); + Logger.Warn("No physical template file was found for template {Template}", template); return false; } diff --git a/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs index 8c4ebf49c3..9a3ec99fd4 100644 --- a/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs @@ -148,7 +148,7 @@ namespace Umbraco.Web.PropertyEditors { // deal with weird situations by ignoring them (no comment) row.PropertyValues.Remove(prop.Key); - _logger.Warn( + _logger.Warn( "ToEditor removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}", prop.Key, row.Key, property.PropertyType.Alias); continue; diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index b0e5bf30bd..e66af480f8 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -91,7 +91,7 @@ namespace Umbraco.Web.PropertyEditors catch (Exception ex) { if (writeLog) - Logger.Error(ex, "Could not parse image cropper value '{Json}'", value); + Logger.Error(ex, "Could not parse image cropper value '{Json}'", value); return null; } } diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs index ca3c5a2a04..1047c4317d 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -126,7 +126,7 @@ namespace Umbraco.Web.PropertyEditors { // deal with weird situations by ignoring them (no comment) row.RawPropertyValues.Remove(prop.Key); - _logger.Warn( + _logger.Warn( ex, "ConvertDbToString removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}", prop.Key, row.Id, propertyType.Alias); @@ -195,7 +195,7 @@ namespace Umbraco.Web.PropertyEditors { // deal with weird situations by ignoring them (no comment) row.RawPropertyValues.Remove(prop.Key); - _logger.Warn( + _logger.Warn( ex, "ToEditor removed property value {PropertyKey} in row {RowId} for property type {PropertyTypeAlias}", prop.Key, row.Id, property.PropertyType.Alias); diff --git a/src/Umbraco.Web/PropertyEditors/RichTextEditorPastedImages.cs b/src/Umbraco.Web/PropertyEditors/RichTextEditorPastedImages.cs index 5a3334685c..c21e2dae20 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextEditorPastedImages.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextEditorPastedImages.cs @@ -132,7 +132,7 @@ namespace Umbraco.Web.PropertyEditors } catch (Exception ex) { - _logger.Error(typeof(HtmlImageSourceParser), ex, "Could not delete temp file or folder {FileName}", absoluteTempImagePath); + _logger.Error(typeof(HtmlImageSourceParser), ex, "Could not delete temp file or folder {FileName}", absoluteTempImagePath); } } } diff --git a/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs b/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs index ca3bd36374..9c9cd929bf 100644 --- a/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs +++ b/src/Umbraco.Web/PropertyEditors/RteEmbedController.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.PropertyEditors } catch(Exception ex) { - Logger.Error(ex, "Error embedding URL {Url} - width: {Width} height: {Height}", url, width, height); + Logger.Error(ex, "Error embedding url {Url} - width: {Width} height: {Height}", url, width, height); result.OEmbedStatus = OEmbedStatus.Error; } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index f25e7fa1c3..1de53e9c6e 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -598,7 +598,7 @@ namespace Umbraco.Web.PublishedCache.NuCache throw new ArgumentException("Kit content cannot have children.", nameof(kit)); // ReSharper restore LocalizableElement - _logger.Debug("Set content ID: {KitNodeId}", kit.Node.Id); + _logger.Debug("Set content ID: {KitNodeId}", kit.Node.Id); // get existing _contentNodes.TryGetValue(kit.Node.Id, out var link); @@ -863,7 +863,7 @@ namespace Umbraco.Web.PublishedCache.NuCache if (link?.Value == null) return false; var content = link.Value; - _logger.Debug("Clear content ID: {ContentId}", content.Id); + _logger.Debug("Clear content ID: {ContentId}", content.Id); // clear the entire branch ClearBranchLocked(content); @@ -1670,7 +1670,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { if (_gen < 0) return; #if DEBUG - _logger.Debug("Dispose snapshot ({Snapshot})", _genRef?.GenObj.Count.ToString() ?? "live"); + _logger.Debug("Dispose snapshot ({Snapshot})", _genRef?.GenObj.Count.ToString() ?? "live"); #endif _gen = -1; if (_genRef != null) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs index f9ad0ac715..8079363548 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs @@ -209,7 +209,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource { if (Debugger.IsAttached) throw new InvalidOperationException("Missing cmsContentNu edited content for node " + dto.Id + ", consider rebuilding."); - Current.Logger.Warn("Missing cmsContentNu edited content for node {NodeId}, consider rebuilding.", dto.Id); + Current.Logger.Warn("Missing cmsContentNu edited content for node {NodeId}, consider rebuilding.", dto.Id); } else { @@ -236,7 +236,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource { if (Debugger.IsAttached) throw new InvalidOperationException("Missing cmsContentNu published content for node " + dto.Id + ", consider rebuilding."); - Current.Logger.Warn("Missing cmsContentNu published content for node {NodeId}, consider rebuilding.", dto.Id); + Current.Logger.Warn("Missing cmsContentNu published content for node {NodeId}, consider rebuilding.", dto.Id); } else { diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index a39e26e2b1..15e45cfa71 100755 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -131,9 +131,9 @@ namespace Umbraco.Web.PublishedCache.NuCache // stores need to be populated, happens in OnResolutionFrozen which uses _localDbExists to // figure out whether it can read the databases or it should populate them from sql - _logger.Info("Creating the content store, localContentDbExists? {LocalContentDbExists}", _localContentDbExists); + _logger.Info("Creating the content store, localContentDbExists? {LocalContentDbExists}", _localContentDbExists); _contentStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localContentDb); - _logger.Info("Creating the media store, localMediaDbExists? {LocalMediaDbExists}", _localMediaDbExists); + _logger.Info("Creating the media store, localMediaDbExists? {LocalMediaDbExists}", _localMediaDbExists); _mediaStore = new ContentStore(publishedSnapshotAccessor, variationContextAccessor, logger, _localMediaDb); } else @@ -182,7 +182,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _localContentDb = BTree.GetTree(localContentDbPath, _localContentDbExists); _localMediaDb = BTree.GetTree(localMediaDbPath, _localMediaDbExists); - _logger.Info("Registered with MainDom, localContentDbExists? {LocalContentDbExists}, localMediaDbExists? {LocalMediaDbExists}", _localContentDbExists, _localMediaDbExists); + _logger.Info("Registered with MainDom, localContentDbExists? {LocalContentDbExists}, localMediaDbExists? {LocalMediaDbExists}", _localContentDbExists, _localMediaDbExists); } /// @@ -690,7 +690,7 @@ namespace Umbraco.Web.PublishedCache.NuCache foreach (var payload in payloads) { - _logger.Debug("Notified {ChangeTypes} for content {ContentId}", payload.ChangeTypes, payload.Id); + _logger.Debug("Notified {ChangeTypes} for content {ContentId}", payload.ChangeTypes, payload.Id); if (payload.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) { @@ -783,7 +783,7 @@ namespace Umbraco.Web.PublishedCache.NuCache foreach (var payload in payloads) { - _logger.Debug("Notified {ChangeTypes} for media {MediaId}", payload.ChangeTypes, payload.Id); + _logger.Debug("Notified {ChangeTypes} for media {MediaId}", payload.ChangeTypes, payload.Id); if (payload.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) { @@ -854,7 +854,7 @@ namespace Umbraco.Web.PublishedCache.NuCache return; foreach (var payload in payloads) - _logger.Debug("Notified {ChangeTypes} for {ItemType} {ItemId}", payload.ChangeTypes, payload.ItemType, payload.Id); + _logger.Debug("Notified {ChangeTypes} for {ItemType} {ItemId}", payload.ChangeTypes, payload.ItemType, payload.Id); Notify(_contentStore, payloads, RefreshContentTypesLocked); Notify(_mediaStore, payloads, RefreshMediaTypesLocked); @@ -938,7 +938,7 @@ namespace Umbraco.Web.PublishedCache.NuCache var idsA = payloads.Select(x => x.Id).ToArray(); foreach (var payload in payloads) - _logger.Debug("Notified {RemovedStatus} for data type {DataTypeId}", + _logger.Debug("Notified {RemovedStatus} for data type {DataTypeId}", payload.Removed ? "Removed" : "Refreshed", payload.Id); diff --git a/src/Umbraco.Web/PublishedCache/PublishedContentTypeCache.cs b/src/Umbraco.Web/PublishedCache/PublishedContentTypeCache.cs index 8eb50b0588..0f6e9af6bd 100644 --- a/src/Umbraco.Web/PublishedCache/PublishedContentTypeCache.cs +++ b/src/Umbraco.Web/PublishedCache/PublishedContentTypeCache.cs @@ -72,7 +72,7 @@ namespace Umbraco.Web.PublishedCache /// An identifier. public void ClearContentType(int id) { - _logger.Debug("Clear content type w/id {ContentTypeId}", id); + _logger.Debug("Clear content type w/id {ContentTypeId}", id); try { @@ -107,7 +107,7 @@ namespace Umbraco.Web.PublishedCache /// A data type identifier. public void ClearDataType(int id) { - _logger.Debug("Clear data type w/id {DataTypeId}.", id); + _logger.Debug("Clear data type w/id {DataTypeId}.", id); // there is no recursion to handle here because a PublishedContentType contains *all* its // properties ie both its own properties and those that were inherited (it's based upon an diff --git a/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs b/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs index eae198bb59..5255da6521 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByConfigured404.cs @@ -69,7 +69,7 @@ namespace Umbraco.Web.Routing if (error404.HasValue) { - _logger.Debug("Got id={ErrorNodeId}.", error404.Value); + _logger.Debug("Got id={ErrorNodeId}.", error404.Value); content = frequest.UmbracoContext.Content.GetById(error404.Value); diff --git a/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs b/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs index b339198928..8cc52054f3 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs @@ -49,7 +49,7 @@ namespace Umbraco.Web.Routing if (nodeId > 0) { - _logger.Debug("Id={NodeId}", nodeId); + _logger.Debug("Id={NodeId}", nodeId); node = frequest.UmbracoContext.Content.GetById(nodeId); if (node != null) @@ -62,7 +62,7 @@ namespace Umbraco.Web.Routing } frequest.PublishedContent = node; - _logger.Debug("Found node with id={PublishedContentId}", frequest.PublishedContent.Id); + _logger.Debug("Found node with id={PublishedContentId}", frequest.PublishedContent.Id); } else { diff --git a/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs b/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs index 6c1195d222..265d6ff3a4 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByRedirectUrl.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.Routing if (redirectUrl == null) { - _logger.Debug("No match for route: {Route}", route); + _logger.Debug("No match for route: {Route}", route); return false; } @@ -50,14 +50,14 @@ namespace Umbraco.Web.Routing var url = content == null ? "#" : content.Url(redirectUrl.Culture); if (url.StartsWith("#")) { - _logger.Debug("Route {Route} matches content {ContentId} which has no URL.", route, redirectUrl.ContentId); + _logger.Debug("Route {Route} matches content {ContentId} which has no URL.", route, redirectUrl.ContentId); return false; } // Appending any querystring from the incoming request to the redirect URL url = string.IsNullOrEmpty(frequest.Uri.Query) ? url : url + frequest.Uri.Query; - _logger.Debug("Route {Route} matches content {ContentId} with URL '{Url}', redirecting.", route, content.Id, url); + _logger.Debug("Route {Route} matches content {ContentId} with url '{Url}', redirecting.", route, content.Id, url); frequest.SetRedirectPermanent(url); diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrl.cs b/src/Umbraco.Web/Routing/ContentFinderByUrl.cs index 074193417a..571dfddd2e 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrl.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrl.cs @@ -46,13 +46,13 @@ namespace Umbraco.Web.Routing { if (docreq == null) throw new System.ArgumentNullException(nameof(docreq)); - Logger.Debug("Test route {Route}", route); + Logger.Debug("Test route {Route}", route); var node = docreq.UmbracoContext.Content.GetByRoute(docreq.UmbracoContext.InPreviewMode, route, culture: docreq.Culture?.Name); if (node != null) { docreq.PublishedContent = node; - Logger.Debug("Got content, id={NodeId}", node.Id); + Logger.Debug("Got content, id={NodeId}", node.Id); } else { diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs index 0ee5f3d42d..9f470b83ac 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Routing if (node != null) { frequest.PublishedContent = node; - Logger.Debug("Path '{UriAbsolutePath}' is an alias for id={PublishedContentId}", frequest.Uri.AbsolutePath, frequest.PublishedContent.Id); + Logger.Debug("Path '{UriAbsolutePath}' is an alias for id={PublishedContentId}", frequest.Uri.AbsolutePath, frequest.PublishedContent.Id); } } diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAndTemplate.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAndTemplate.cs index a02ebbb2a8..bb5cea063a 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByUrlAndTemplate.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAndTemplate.cs @@ -56,11 +56,11 @@ namespace Umbraco.Web.Routing if (template == null) { - Logger.Debug("Not a valid template: '{TemplateAlias}'", templateAlias); + Logger.Debug("Not a valid template: '{TemplateAlias}'", templateAlias); return false; } - Logger.Debug("Valid template: '{TemplateAlias}'", templateAlias); + Logger.Debug("Valid template: '{TemplateAlias}'", templateAlias); // look for node corresponding to the rest of the route var route = frequest.HasDomain ? (frequest.Domain.ContentId + path) : path; @@ -68,14 +68,14 @@ namespace Umbraco.Web.Routing if (node == null) { - Logger.Debug("Not a valid route to node: '{Route}'", route); + Logger.Debug("Not a valid route to node: '{Route}'", route); return false; } // IsAllowedTemplate deals both with DisableAlternativeTemplates and ValidateAlternativeTemplates settings if (!node.IsAllowedTemplate(template.Id)) { - Logger.Warn("Alternative template '{TemplateAlias}' is not allowed on node {NodeId}.", template.Alias, node.Id); + Logger.Warn("Alternative template '{TemplateAlias}' is not allowed on node {NodeId}.", template.Alias, node.Id); frequest.PublishedContent = null; // clear return false; } diff --git a/src/Umbraco.Web/Routing/DefaultUrlProvider.cs b/src/Umbraco.Web/Routing/DefaultUrlProvider.cs index f26f05c36c..fdd76a9160 100644 --- a/src/Umbraco.Web/Routing/DefaultUrlProvider.cs +++ b/src/Umbraco.Web/Routing/DefaultUrlProvider.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Routing { if (string.IsNullOrWhiteSpace(route)) { - _logger.Debug("Couldn't find any page with nodeId={NodeId}. This is most likely caused by the page not being published.", id); + _logger.Debug("Couldn't find any page with nodeId={NodeId}. This is most likely caused by the page not being published.", id); return null; } diff --git a/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs b/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs index 9fefeeb843..f2494696cf 100644 --- a/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs +++ b/src/Umbraco.Web/Routing/NotFoundHandlerHelper.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Routing } catch (Exception ex) { - Current.Logger.Error(ex, "Could not parse xpath expression: {ContentXPath}", errorPage.ContentXPath); + Current.Logger.Error(ex, "Could not parse xpath expression: {ContentXPath}", errorPage.ContentXPath); return null; } } diff --git a/src/Umbraco.Web/Routing/PublishedRouter.cs b/src/Umbraco.Web/Routing/PublishedRouter.cs index 676b973271..a02fd5872a 100644 --- a/src/Umbraco.Web/Routing/PublishedRouter.cs +++ b/src/Umbraco.Web/Routing/PublishedRouter.cs @@ -253,7 +253,7 @@ namespace Umbraco.Web.Routing // note - we are not handling schemes nor ports here. - _logger.Debug("{TracePrefix}Uri={RequestUri}", tracePrefix, request.Uri); + _logger.Debug("{TracePrefix}Uri={RequestUri}", tracePrefix, request.Uri); var domainsCache = request.UmbracoContext.PublishedSnapshot.Domains; var domains = domainsCache.GetAll(includeWildcards: false).ToList(); @@ -305,12 +305,12 @@ namespace Umbraco.Web.Routing else { // not matching any existing domain - _logger.Debug("{TracePrefix}Matches no domain", tracePrefix); + _logger.Debug("{TracePrefix}Matches no domain", tracePrefix); request.Culture = defaultCulture == null ? CultureInfo.CurrentUICulture : new CultureInfo(defaultCulture); } - _logger.Debug("{TracePrefix}Culture={CultureName}", tracePrefix, request.Culture.Name); + _logger.Debug("{TracePrefix}Culture={CultureName}", tracePrefix, request.Culture.Name); return request.Domain != null; } @@ -326,7 +326,7 @@ namespace Umbraco.Web.Routing return; var nodePath = request.PublishedContent.Path; - _logger.Debug("{TracePrefix}Path={NodePath}", tracePrefix, nodePath); + _logger.Debug("{TracePrefix}Path={NodePath}", tracePrefix, nodePath); var rootNodeId = request.HasDomain ? request.Domain.ContentId : (int?)null; var domain = DomainUtilities.FindWildcardDomainInPath(request.UmbracoContext.PublishedSnapshot.Domains.GetAll(true), nodePath, rootNodeId); @@ -334,11 +334,11 @@ namespace Umbraco.Web.Routing if (domain != null) { request.Culture = domain.Culture; - _logger.Debug("{TracePrefix}Got domain on node {DomainContentId}, set culture to {CultureName}", tracePrefix, domain.ContentId, request.Culture.Name); + _logger.Debug("{TracePrefix}Got domain on node {DomainContentId}, set culture to {CultureName}", tracePrefix, domain.ContentId, request.Culture.Name); } else { - _logger.Debug("{TracePrefix}No match.", tracePrefix); + _logger.Debug("{TracePrefix}No match.", tracePrefix); } } @@ -380,7 +380,7 @@ namespace Umbraco.Web.Routing /// A value indicating whether a document and template were found. private void FindPublishedContentAndTemplate(PublishedRequest request) { - _logger.Debug("FindPublishedContentAndTemplate: Path={UriAbsolutePath}", request.Uri.AbsolutePath); + _logger.Debug("FindPublishedContentAndTemplate: Path={UriAbsolutePath}", request.Uri.AbsolutePath); // run the document finders FindPublishedContent(request); @@ -423,7 +423,7 @@ namespace Umbraco.Web.Routing //iterate but return on first one that finds it var found = _contentFinders.Any(finder => { - _logger.Debug("Finder {ContentFinderType}", finder.GetType().FullName); + _logger.Debug("Finder {ContentFinderType}", finder.GetType().FullName); return finder.TryFindContent(request); }); @@ -457,7 +457,7 @@ namespace Umbraco.Web.Routing const int maxLoop = 8; do { - _logger.Debug("HandlePublishedContent: Loop {LoopCounter}", i); + _logger.Debug("HandlePublishedContent: Loop {LoopCounter}", i); // handle not found if (request.HasPublishedContent == false) @@ -543,13 +543,13 @@ namespace Umbraco.Web.Routing if (valid == false) { // bad redirect - log and display the current page (legacy behavior) - _logger.Debug("FollowInternalRedirects: Failed to redirect to id={InternalRedirectId}: value is not an int nor a GuidUdi.", + _logger.Debug("FollowInternalRedirects: Failed to redirect to id={InternalRedirectId}: value is not an int nor a GuidUdi.", request.PublishedContent.GetProperty(Constants.Conventions.Content.InternalRedirectId).GetSourceValue()); } if (internalRedirectNode == null) { - _logger.Debug("FollowInternalRedirects: Failed to redirect to id={InternalRedirectId}: no such published document.", + _logger.Debug("FollowInternalRedirects: Failed to redirect to id={InternalRedirectId}: no such published document.", request.PublishedContent.GetProperty(Constants.Conventions.Content.InternalRedirectId).GetSourceValue()); } else if (internalRedirectId == request.PublishedContent.Id) @@ -561,7 +561,7 @@ namespace Umbraco.Web.Routing { request.SetInternalRedirectPublishedContent(internalRedirectNode); // don't use .PublishedContent here redirect = true; - _logger.Debug("FollowInternalRedirects: Redirecting to id={InternalRedirectId}", internalRedirectId); + _logger.Debug("FollowInternalRedirects: Redirecting to id={InternalRedirectId}", internalRedirectId); } return redirect; @@ -701,7 +701,7 @@ namespace Umbraco.Web.Routing if (request.HasTemplate) _logger.Debug("FindTemplate: Has a template already, but also an alternative template."); - _logger.Debug("FindTemplate: Look for alternative template alias={AltTemplate}", altTemplate); + _logger.Debug("FindTemplate: Look for alternative template alias={AltTemplate}", altTemplate); // IsAllowedTemplate deals both with DisableAlternativeTemplates and ValidateAlternativeTemplates settings if (request.PublishedContent.IsAllowedTemplate(altTemplate)) @@ -712,16 +712,16 @@ namespace Umbraco.Web.Routing if (template != null) { request.TemplateModel = template; - _logger.Debug("FindTemplate: Got alternative template id={TemplateId} alias={TemplateAlias}", template.Id, template.Alias); + _logger.Debug("FindTemplate: Got alternative template id={TemplateId} alias={TemplateAlias}", template.Id, template.Alias); } else { - _logger.Debug("FindTemplate: The alternative template with alias={AltTemplate} does not exist, ignoring.", altTemplate); + _logger.Debug("FindTemplate: The alternative template with alias={AltTemplate} does not exist, ignoring.", altTemplate); } } else { - _logger.Warn("FindTemplate: Alternative template {TemplateAlias} is not allowed on node {NodeId}, ignoring.", altTemplate, request.PublishedContent.Id); + _logger.Warn("FindTemplate: Alternative template {TemplateAlias} is not allowed on node {NodeId}, ignoring.", altTemplate, request.PublishedContent.Id); // no allowed, back to default var templateId = request.PublishedContent.TemplateId; @@ -744,7 +744,7 @@ namespace Umbraco.Web.Routing } else { - _logger.Debug("FindTemplate: Running with template id={TemplateId} alias={TemplateAlias}", request.TemplateModel.Id, request.TemplateModel.Alias); + _logger.Debug("FindTemplate: Running with template id={TemplateId} alias={TemplateAlias}", request.TemplateModel.Id, request.TemplateModel.Alias); } } @@ -756,7 +756,7 @@ namespace Umbraco.Web.Routing return null; } - _logger.Debug("GetTemplateModel: Get template id={TemplateId}", templateId); + _logger.Debug("GetTemplateModel: Get template id={TemplateId}", templateId); if (templateId == null) throw new InvalidOperationException("The template is not set, the page cannot render."); @@ -764,7 +764,7 @@ namespace Umbraco.Web.Routing var template = _services.FileService.GetTemplate(templateId.Value); if (template == null) throw new InvalidOperationException("The template with Id " + templateId + " does not exist, the page cannot render."); - _logger.Debug("GetTemplateModel: Got template id={TemplateId} alias={TemplateAlias}", template.Id, template.Alias); + _logger.Debug("GetTemplateModel: Got template id={TemplateId} alias={TemplateAlias}", template.Id, template.Alias); return template; } diff --git a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs index 81bb45e270..a126592ffc 100644 --- a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs @@ -239,7 +239,7 @@ namespace Umbraco.Web.Scheduling throw new InvalidOperationException("The task runner has completed."); // add task - _logger.Debug("{LogPrefix} Task Added {TaskType}", _logPrefix , task.GetType().FullName); + _logger.Debug("{LogPrefix} Task Added {TaskType}", _logPrefix , task.GetType().FullName); _tasks.Post(task); // start @@ -259,12 +259,12 @@ namespace Umbraco.Web.Scheduling { if (_completed) { - _logger.Debug("{LogPrefix} Task cannot be added {TaskType}, the task runner has already shutdown", _logPrefix, task.GetType().FullName); + _logger.Debug("{LogPrefix} Task cannot be added {TaskType}, the task runner has already shutdown", _logPrefix, task.GetType().FullName); return false; } // add task - _logger.Debug("{LogPrefix} Task added {TaskType}", _logPrefix, task.GetType().FullName); + _logger.Debug("{LogPrefix} Task added {TaskType}", _logPrefix, task.GetType().FullName); _tasks.Post(task); // start @@ -321,7 +321,7 @@ namespace Umbraco.Web.Scheduling _shutdownToken = _shutdownTokenSource.Token; _runningTask = Task.Run(async () => await Pump().ConfigureAwait(false), _shutdownToken); - _logger.Debug("{LogPrefix} Starting", _logPrefix); + _logger.Debug("{LogPrefix} Starting", _logPrefix); } /// @@ -342,7 +342,7 @@ namespace Umbraco.Web.Scheduling var hasTasks = TaskCount > 0; if (!force && hasTasks) - _logger.Info("{LogPrefix} Waiting for tasks to complete", _logPrefix); + _logger.Info("{LogPrefix} Waiting for tasks to complete", _logPrefix); // complete the queue // will stop waiting on the queue or on a latch @@ -408,7 +408,7 @@ namespace Umbraco.Web.Scheduling } catch (Exception ex) { - _logger.Error(ex, "{LogPrefix} Task runner exception", _logPrefix); + _logger.Error(ex, "{LogPrefix} Task runner exception", _logPrefix); } } } @@ -440,7 +440,7 @@ namespace Umbraco.Web.Scheduling if (_shutdownToken.IsCancellationRequested == false && TaskCount > 0) continue; // if we really have nothing to do, stop - _logger.Debug("{LogPrefix} Stopping", _logPrefix); + _logger.Debug("{LogPrefix} Stopping", _logPrefix); if (_options.PreserveRunningTask == false) _runningTask = null; @@ -567,7 +567,7 @@ namespace Umbraco.Web.Scheduling catch (Exception ex) { - _logger.Error(ex, "{LogPrefix} Task has failed", _logPrefix); + _logger.Error(ex, "{LogPrefix} Task has failed", _logPrefix); } } @@ -601,7 +601,7 @@ namespace Umbraco.Web.Scheduling private void OnEvent(TypedEventHandler, TArgs> handler, string name, TArgs e) { - _logger.Debug("{LogPrefix} OnEvent {EventName}", _logPrefix, name); + _logger.Debug("{LogPrefix} OnEvent {EventName}", _logPrefix, name); if (handler == null) return; @@ -611,7 +611,7 @@ namespace Umbraco.Web.Scheduling } catch (Exception ex) { - _logger.Error(ex, "{LogPrefix} {Name} exception occurred", _logPrefix, name); + _logger.Error(ex, "{LogPrefix} {Name} exception occurred", _logPrefix, name); } } @@ -698,7 +698,7 @@ namespace Umbraco.Web.Scheduling if (_terminating == false) { _terminating = true; - _logger.Info("{LogPrefix} Terminating {Immediate}", _logPrefix, immediate ? immediate.ToString() : string.Empty); + _logger.Info("{LogPrefix} Terminating {Immediate}", _logPrefix, immediate ? immediate.ToString() : string.Empty); onTerminating = true; } } @@ -791,7 +791,7 @@ namespace Umbraco.Web.Scheduling /// private void StopImmediate() { - _logger.Info("{LogPrefix} Canceling tasks", _logPrefix); + _logger.Info("{LogPrefix} Canceling tasks", _logPrefix); try { Shutdown(true, true); // cancel all tasks, wait for the current one to end @@ -825,7 +825,7 @@ namespace Umbraco.Web.Scheduling terminatedSource = _terminatedSource; } - _logger.Info("{LogPrefix} Tasks {TaskStatus}, terminated", + _logger.Info("{LogPrefix} Tasks {TaskStatus}, terminated", _logPrefix, immediate ? "cancelled" : "completed"); diff --git a/src/Umbraco.Web/Scheduling/KeepAlive.cs b/src/Umbraco.Web/Scheduling/KeepAlive.cs index 2dcf9a24a7..5ee10e4c2a 100644 --- a/src/Umbraco.Web/Scheduling/KeepAlive.cs +++ b/src/Umbraco.Web/Scheduling/KeepAlive.cs @@ -70,7 +70,7 @@ namespace Umbraco.Web.Scheduling } catch (Exception ex) { - _logger.Error(ex, "Keep alive failed (at '{keepAlivePingUrl}').", keepAlivePingUrl); + _logger.Error(ex, "Keep alive failed (at '{keepAlivePingUrl}').", keepAlivePingUrl); } } diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs index 97afe25e22..b7ec7ffc0e 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs @@ -67,7 +67,7 @@ namespace Umbraco.Web.Scheduling // run var result = _contentService.PerformScheduledPublish(DateTime.Now); foreach (var grouped in result.GroupBy(x => x.Result)) - _logger.Info("Scheduled publishing result: '{StatusCount}' items with status {Status}", grouped.Count(), grouped.Key); + _logger.Info("Scheduled publishing result: '{StatusCount}' items with status {Status}", grouped.Count(), grouped.Key); } finally { diff --git a/src/Umbraco.Web/Scheduling/TempFileCleanup.cs b/src/Umbraco.Web/Scheduling/TempFileCleanup.cs index d2a254dfd6..05f96f0e75 100644 --- a/src/Umbraco.Web/Scheduling/TempFileCleanup.cs +++ b/src/Umbraco.Web/Scheduling/TempFileCleanup.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web.Scheduling dir.Refresh(); //in case it's changed during runtime if (!dir.Exists) { - _logger.Debug("The cleanup folder doesn't exist {Folder}", dir.FullName); + _logger.Debug("The cleanup folder doesn't exist {Folder}", dir.FullName); return; } @@ -66,7 +66,7 @@ namespace Umbraco.Web.Scheduling } catch (Exception ex) { - _logger.Error(ex, "Could not delete temp file {FileName}", file.FullName); + _logger.Error(ex, "Could not delete temp file {FileName}", file.FullName); } } } diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs index eb6b81ba16..16cc8c210a 100644 --- a/src/Umbraco.Web/Search/ExamineComponent.cs +++ b/src/Umbraco.Web/Search/ExamineComponent.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Search var registeredIndexers = _examineManager.Indexes.OfType().Count(x => x.EnableDefaultEventHandler); - _logger.Info("Adding examine event handlers for {RegisteredIndexers} index providers.", registeredIndexers); + _logger.Info("Adding examine event handlers for {RegisteredIndexers} index providers.", registeredIndexers); // don't bind event handlers if we're not suppose to listen if (registeredIndexers == 0) diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index e655b87767..49ed6f6f99 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -315,7 +315,7 @@ namespace Umbraco.Web.Security if (member == null) { //this should not happen - Current.Logger.Warn("The member validated but then no member was returned with the username {Username}", username); + Current.Logger.Warn("The member validated but then no member was returned with the username {Username}", username); return false; } //Log them in diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index bf9ee654c4..dd10e576e0 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -149,7 +149,7 @@ namespace Umbraco.Web.Security.Providers if (MemberService.Exists(username)) { status = MembershipCreateStatus.DuplicateUserName; - Current.Logger.Warn>("Cannot create member as username already exists: {Username}", username); + Current.Logger.Warn, string>("Cannot create member as username already exists: {Username}", username); return null; } @@ -157,7 +157,7 @@ namespace Umbraco.Web.Security.Providers if (MemberService.GetByEmail(email) != null && RequiresUniqueEmail) { status = MembershipCreateStatus.DuplicateEmail; - Current.Logger.Warn>("Cannot create member as a member with the same email address exists: {Email}", email); + Current.Logger.Warn, string>("Cannot create member as a member with the same email address exists: {Email}", email); return null; } @@ -525,7 +525,7 @@ namespace Umbraco.Web.Security.Providers if (member == null) { - Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user does not exist", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user does not exist", username, GetCurrentRequestIpAddress()); return new ValidateUserResult { @@ -535,7 +535,7 @@ namespace Umbraco.Web.Security.Providers if (member.IsApproved == false) { - Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is not approved", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is not approved", username, GetCurrentRequestIpAddress()); return new ValidateUserResult { @@ -545,7 +545,7 @@ namespace Umbraco.Web.Security.Providers } if (member.IsLockedOut) { - Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is locked", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is locked", username, GetCurrentRequestIpAddress()); return new ValidateUserResult { @@ -571,11 +571,11 @@ namespace Umbraco.Web.Security.Providers member.IsLockedOut = true; member.LastLockoutDate = DateTime.Now; - Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is now locked out, max invalid password attempts exceeded", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}, the user is now locked out, max invalid password attempts exceeded", username, GetCurrentRequestIpAddress()); } else { - Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt failed for username {Username} from IP address {IpAddress}", username, GetCurrentRequestIpAddress()); } requiresFullSave = true; @@ -591,7 +591,7 @@ namespace Umbraco.Web.Security.Providers member.LastLoginDate = DateTime.Now; - Current.Logger.Info("Login attempt succeeded for username {Username} from IP address {IpAddress}", username, GetCurrentRequestIpAddress()); + Current.Logger.Info("Login attempt succeeded for username {Username} from IP address {IpAddress}", username, GetCurrentRequestIpAddress()); } // don't raise events for this! It just sets the member dates, if we do raise events this will diff --git a/src/Umbraco.Web/Templates/HtmlUrlParser.cs b/src/Umbraco.Web/Templates/HtmlUrlParser.cs index 0692b75fa7..721e8c04f4 100644 --- a/src/Umbraco.Web/Templates/HtmlUrlParser.cs +++ b/src/Umbraco.Web/Templates/HtmlUrlParser.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.Templates { // find all relative URLs (ie. URLs that contain ~) var tags = ResolveUrlPattern.Matches(text); - _logger.Debug(typeof(IOHelper), "After regex: {Duration} matched: {TagsCount}", timer.Stopwatch.ElapsedMilliseconds, tags.Count); + _logger.Debug(typeof(IOHelper), "After regex: {Duration} matched: {TagsCount}", timer.Stopwatch.ElapsedMilliseconds, tags.Count); foreach (Match tag in tags) { var url = ""; diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 57c7027598..ea78ef7aa0 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -175,7 +175,7 @@ namespace Umbraco.Web.Trees // TODO: in the future we could return a validation statement so we can have some UI to notify the user they don't have access if (ignoreUserStartNodes == false && HasPathAccess(id, queryStrings) == false) { - Logger.Warn("User {Username} does not have access to node with id {Id}", Security.CurrentUser.Username, id); + Logger.Warn("User {Username} does not have access to node with id {Id}", Security.CurrentUser.Username, id); return nodes; } diff --git a/src/Umbraco.Web/UmbracoApplicationBase.cs b/src/Umbraco.Web/UmbracoApplicationBase.cs index 32a949e972..c9a4e18dd6 100644 --- a/src/Umbraco.Web/UmbracoApplicationBase.cs +++ b/src/Umbraco.Web/UmbracoApplicationBase.cs @@ -132,7 +132,7 @@ namespace Umbraco.Web BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null); - Current.Logger.Info("Application shutdown. Details: {ShutdownReason}\r\n\r\n_shutDownMessage={ShutdownMessage}\r\n\r\n_shutDownStack={ShutdownStack}", + Current.Logger.Info("Application shutdown. Details: {ShutdownReason}\r\n\r\n_shutDownMessage={ShutdownMessage}\r\n\r\n_shutDownStack={ShutdownStack}", HostingEnvironment.ShutdownReason, shutDownMessage, shutDownStack); @@ -140,7 +140,7 @@ namespace Umbraco.Web catch (Exception) { //if for some reason that fails, then log the normal output - Current.Logger.Info("Application shutdown. Reason: {ShutdownReason}", HostingEnvironment.ShutdownReason); + Current.Logger.Info("Application shutdown. Reason: {ShutdownReason}", HostingEnvironment.ShutdownReason); } Current.Logger.DisposeIfDisposable(); @@ -195,7 +195,7 @@ namespace Umbraco.Web } catch (Exception ex) { - Current.Logger.Error(ex, "Error in {Name} handler.", name); + Current.Logger.Error(ex, "Error in {Name} handler.", name); throw; } } diff --git a/src/Umbraco.Web/UmbracoModule.cs b/src/Umbraco.Web/UmbracoModule.cs index 2ec4141f5a..bfa5361a8a 100644 --- a/src/Umbraco.Web/UmbracoModule.cs +++ b/src/Umbraco.Web/UmbracoModule.cs @@ -50,7 +50,7 @@ namespace Umbraco.Web var end = false; var response = context.Response; - logger.Debug("Response status: Redirect={Redirect}, Is404={Is404}, StatusCode={ResponseStatusCode}", + logger.Debug("Response status: Redirect={Redirect}, Is404={Is404}, StatusCode={ResponseStatusCode}", pcr.IsRedirect ? (pcr.IsRedirectPermanent ? "permanent" : "redirect") : "none", pcr.Is404 ? "true" : "false", pcr.ResponseStatusCode); diff --git a/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs index 1646c8a426..a5c0c2bc17 100644 --- a/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FileUploadCleanupFilterAttribute.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.WebApi.Filters } catch (System.Exception ex) { - Current.Logger.Error(ex, "Could not delete temp file {FileName}", f.TempFilePath); + Current.Logger.Error(ex, "Could not delete temp file {FileName}", f.TempFilePath); } } } @@ -111,7 +111,7 @@ namespace Umbraco.Web.WebApi.Filters tempFolders.Add(dir); } - Current.Logger.Debug("Removing temp file {FileName}", f.TempFilePath); + Current.Logger.Debug("Removing temp file {FileName}", f.TempFilePath); try { @@ -119,7 +119,7 @@ namespace Umbraco.Web.WebApi.Filters } catch (System.Exception ex) { - Current.Logger.Error(ex, "Could not delete temp file {FileName}", f.TempFilePath); + Current.Logger.Error(ex, "Could not delete temp file {FileName}", f.TempFilePath); } //clear out the temp path so it's not returned in the response @@ -138,12 +138,12 @@ namespace Umbraco.Web.WebApi.Filters } else { - Current.Logger.Warn("The actionExecutedContext.Request.Content.Value is not IHaveUploadedFiles, it is {ObjectType}", objectContent.Value.GetType()); + Current.Logger.Warn("The actionExecutedContext.Request.Content.Value is not IHaveUploadedFiles, it is {ObjectType}", objectContent.Value.GetType()); } } else { - Current.Logger.Warn("The actionExecutedContext.Request.Content is not ObjectContent, it is {RequestObjectType}", actionExecutedContext.Request.Content.GetType()); + Current.Logger.Warn("The actionExecutedContext.Request.Content is not ObjectContent, it is {RequestObjectType}", actionExecutedContext.Request.Content.GetType()); } } } diff --git a/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs b/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs index 1dd43f5b2a..983c377e80 100644 --- a/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs +++ b/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.WebApi var requestUrl = context.ExceptionContext?.ControllerContext?.Request?.RequestUri?.AbsoluteUri; var controllerType = context.ExceptionContext?.ActionContext?.ControllerContext?.Controller?.GetType(); - _logger.Error(controllerType, context.Exception, "Unhandled controller exception occurred for request '{RequestUrl}'", requestUrl); + _logger.Error(controllerType, context.Exception, "Unhandled controller exception occurred for request '{RequestUrl}'", requestUrl); } } From a6e1c2e90170dc796a2ed5f601b59f7d1a94a9a9 Mon Sep 17 00:00:00 2001 From: Chad Date: Mon, 22 Feb 2021 21:53:53 +1300 Subject: [PATCH 31/99] Fixes #9615 - Upgrade to Htmlsanitizer v5 (#9856) --- build/NuSpecs/UmbracoCms.Web.nuspec | 1 + src/Umbraco.Core/Constants-SvgSanitizer.cs | 23 +++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 1 + src/Umbraco.Web/Runtime/WebInitialComposer.cs | 9 ++++++++ src/Umbraco.Web/Services/IconService.cs | 22 ++++++++---------- src/Umbraco.Web/Umbraco.Web.csproj | 7 ++++-- 6 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 src/Umbraco.Core/Constants-SvgSanitizer.cs diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec index e0ffd57aff..fc31551d6c 100644 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ b/build/NuSpecs/UmbracoCms.Web.nuspec @@ -42,6 +42,7 @@ + diff --git a/src/Umbraco.Core/Constants-SvgSanitizer.cs b/src/Umbraco.Core/Constants-SvgSanitizer.cs new file mode 100644 index 0000000000..c92b9f56c7 --- /dev/null +++ b/src/Umbraco.Core/Constants-SvgSanitizer.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; + +namespace Umbraco.Core +{ + public static partial class Constants + { + /// + /// Defines the alias identifiers for Umbraco's core application sections. + /// + public static class SvgSanitizer + { + /// + /// Allowlist for SVG attributes. + /// + public static readonly IList Attributes = new [] { "accent-height", "accumulate", "additive", "alignment-baseline", "allowReorder", "alphabetic", "amplitude", "arabic-form", "ascent", "attributeName", "attributeType", "autoReverse", "azimuth", "baseFrequency", "baseline-shift", "baseProfile", "bbox", "begin", "bias", "by", "calcMode", "cap-height", "class", "clip", "clipPathUnits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "contentScriptType", "contentStyleType", "cursor", "cx", "cy", "d", "decelerate", "descent", "diffuseConstant", "direction", "display", "divisor", "dominant-baseline", "dur", "dx", "dy", "edgeMode", "elevation", "enable-background", "end", "exponent", "externalResourcesRequired", "Section", "fill", "fill-opacity", "fill-rule", "filter", "filterRes", "filterUnits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "format", "from", "fr", "fx", "fy", "g1", "g2", "glyph-name", "glyph-orientation-horizontal", "glyph-orientation-vertical", "glyphRef", "gradientTransform", "gradientUnits", "hanging", "height", "href", "hreflang", "horiz-adv-x", "horiz-origin-x", "ISection", "id", "ideographic", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kernelMatrix", "kernelUnitLength", "kerning", "keyPoints", "keySplines", "keyTimes", "lang", "lengthAdjust", "letter-spacing", "lighting-color", "limitingConeAngle", "local", "MSection", "marker-end", "marker-mid", "marker-start", "markerHeight", "markerUnits", "markerWidth", "mask", "maskContentUnits", "maskUnits", "mathematical", "max", "media", "method", "min", "mode", "NSection", "name", "numOctaves", "offset", "opacity", "operator", "order", "orient", "orientation", "origin", "overflow", "overline-position", "overline-thickness", "panose-1", "paint-order", "path", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "ping", "pointer-events", "points", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "r", "radius", "referrerPolicy", "refX", "refY", "rel", "rendering-intent", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "restart", "result", "rotate", "rx", "ry", "scale", "seed", "shape-rendering", "slope", "spacing", "specularConstant", "specularExponent", "speed", "spreadMethod", "startOffset", "stdDeviation", "stemh", "stemv", "stitchTiles", "stop-color", "stop-opacity", "strikethrough-position", "strikethrough-thickness", "string", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "surfaceScale", "systemLanguage", "tabindex", "tableValues", "target", "targetX", "targetY", "text-anchor", "text-decoration", "text-rendering", "textLength", "to", "transform", "type", "u1", "u2", "underline-position", "underline-thickness", "unicode", "unicode-bidi", "unicode-range", "units-per-em", "v-alphabetic", "v-hanging", "v-ideographic", "v-mathematical", "values", "vector-effect", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "viewBox", "viewTarget", "visibility", "width", "widths", "word-spacing", "writing-mode", "x", "x-height", "x1", "x2", "xChannelSelector", "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "y", "y1", "y2", "yChannelSelector", "z", "zoomAndPan" }; + + /// + /// Allowlist for SVG tabs. + /// + public static readonly IList Tags = new [] { "a", "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "discard", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hatch", "hatchpath", "hkern", "image", "line", "linearGradient", "marker", "mask", "mesh", "meshgradient", "meshpatch", "meshrow", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "set", "solidcolor", "stop", "svg", "switch", "symbol", "text", "textPath", "title", "tref", "tspan", "unknown", "use", "view", "vkern" }; + } + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 1cbf8a7b3f..8f4877f7f6 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -259,6 +259,7 @@ + diff --git a/src/Umbraco.Web/Runtime/WebInitialComposer.cs b/src/Umbraco.Web/Runtime/WebInitialComposer.cs index ac7e34d5cb..b15641b503 100644 --- a/src/Umbraco.Web/Runtime/WebInitialComposer.cs +++ b/src/Umbraco.Web/Runtime/WebInitialComposer.cs @@ -40,6 +40,7 @@ using Current = Umbraco.Web.Composing.Current; using Umbraco.Web.PropertyEditors; using Umbraco.Core.Models; using Umbraco.Web.Models; +using Ganss.XSS; namespace Umbraco.Web.Runtime { @@ -139,6 +140,14 @@ namespace Umbraco.Web.Runtime composition.RegisterUnique(); composition.RegisterUnique(); composition.RegisterUnique(); + composition.Register(_ => + { + var sanitizer = new HtmlSanitizer(); + sanitizer.AllowedAttributes.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Attributes); + sanitizer.AllowedCssProperties.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Attributes); + sanitizer.AllowedTags.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Tags); + return sanitizer; + },Lifetime.Singleton); composition.RegisterUnique(factory => ExamineManager.Instance); diff --git a/src/Umbraco.Web/Services/IconService.cs b/src/Umbraco.Web/Services/IconService.cs index a74fa909e0..175650fd12 100644 --- a/src/Umbraco.Web/Services/IconService.cs +++ b/src/Umbraco.Web/Services/IconService.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Ganss.XSS; using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.IO; @@ -12,31 +13,24 @@ namespace Umbraco.Web.Services public class IconService : IIconService { private readonly IGlobalSettings _globalSettings; + private readonly IHtmlSanitizer _htmlSanitizer; - public IconService(IGlobalSettings globalSettings) + public IconService(IGlobalSettings globalSettings, IHtmlSanitizer htmlSanitizer) { _globalSettings = globalSettings; + _htmlSanitizer = htmlSanitizer; } /// public IList GetAllIcons() { - var icons = new List(); var directory = new DirectoryInfo(IOHelper.MapPath($"{_globalSettings.IconsPath}/")); var iconNames = directory.GetFiles("*.svg"); - iconNames.OrderBy(f => f.Name).ToList().ForEach(iconInfo => - { - var icon = GetIcon(iconInfo); + return iconNames.OrderBy(f => f.Name) + .Select(iconInfo => GetIcon(iconInfo)).WhereNotNull().ToList(); - if (icon != null) - { - icons.Add(icon); - } - }); - - return icons; } /// @@ -70,10 +64,12 @@ namespace Umbraco.Web.Services try { var svgContent = System.IO.File.ReadAllText(iconPath); + var sanitizedString = _htmlSanitizer.Sanitize(svgContent); + var svg = new IconModel { Name = iconName, - SvgString = svgContent + SvgString = sanitizedString }; return svg; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index c3aa0433c5..b85b81bb9e 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -65,6 +65,9 @@ + + 5.0.376 + 2.7.0.100 @@ -1295,7 +1298,7 @@ - + + - -
-
Content of tab 1
-
-
-
Content of tab 2
-
-
+ + + +
+
Content of tab 1
+
+
+
Content of tab 2
+
+
+
@@ -37,7 +40,7 @@ Use this directive to render a tabs navigation. (function () { "use strict"; - function Controller() { + function Controller(eventsService) { var vm = this; @@ -62,7 +65,7 @@ Use this directive to render a tabs navigation. selectedTab.active = true; }; - eventsService.on("tab.tabChange", function(name, args){ + eventsService.on("app.tabChange", function(name, args){ console.log("args", args); }); From 739d9a81886728029d5a9e2c68f98e96dfabca91 Mon Sep 17 00:00:00 2001 From: Rachel Breeze Date: Tue, 6 Apr 2021 02:44:14 +0100 Subject: [PATCH 83/99] Improved accessibility of link picker (#10099) * Added support for screeen reader alerts on the embed so that assitive technology knows when a url retrieve has been succesfull. Added labels for the controls Preview reload only triggered if the values for height and width change * Added control ids for the link picker * Add French translation --- .../tree/umbtreesearchbox.directive.js | 1 + .../linkpicker/linkpicker.html | 67 ++++++++++--------- .../components/tree/umb-tree-search-box.html | 1 + src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 1 + .../Umbraco/config/lang/en_us.xml | 1 + src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 1 + 6 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreesearchbox.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreesearchbox.directive.js index 3e2e7e362e..2ae17fdc6b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreesearchbox.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreesearchbox.directive.js @@ -15,6 +15,7 @@ function treeSearchBox(localizationService, searchService, $q) { datatypeKey: "@", hideSearchCallback: "=", searchCallback: "=", + inputId: "@", autoFocus: "=" }, restrict: "E", // restrict to an element diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.html index 093e69b5ed..0a2a8223e9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.html @@ -16,7 +16,7 @@
- + + ng-disabled="model.target.id || model.target.udi" + id="urlLinkPicker"/> - + + ng-model="model.target.anchor" + id="anchor"/> @@ -41,19 +43,21 @@
- + + ng-model="model.target.name" + id="nodeNameLinkPicker"/> - + + text="{{vm.labels.openInNewWindow}}" + input-id="openInNewWindow"> @@ -61,36 +65,35 @@
Link to page
- + +
- - +
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-box.html b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-box.html index 77498cd007..054472e4b6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-box.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-box.html @@ -2,6 +2,7 @@ Select one of the options to edit the node. Perform action %0% on the %1% node Add image caption + Search content tree References diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 5448436aab..2b7c3ec842 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -2335,6 +2335,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Select one of the options to edit the node. Perform action %0% on the %1% node Add image caption + Search content tree References diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index 52e511a035..8900272af7 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -2212,6 +2212,7 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Partial View Macro de Partial View Membre + Chercher dans l'arborescence de contenu Références From db6d572235afc7e061ecd4eabd10a5e9bbd2575c Mon Sep 17 00:00:00 2001 From: Rachel Breeze Date: Tue, 6 Apr 2021 02:50:14 +0100 Subject: [PATCH 84/99] Accessibility: Alerts the user how many results have been returned on a tree search (#10100) * Added support for screeen reader alerts on the embed so that assitive technology knows when a url retrieve has been succesfull. Added labels for the controls Preview reload only triggered if the values for height and width change * Tree search details the number of search items returned * Add French translations --- .../tree/umb-tree-search-results.html | 49 +++++++++---------- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 4 ++ .../Umbraco/config/lang/en_us.xml | 4 ++ src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 4 ++ 4 files changed, 36 insertions(+), 25 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-results.html b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-results.html index f472251624..fbabf4c67c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-results.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tree/umb-tree-search-results.html @@ -1,30 +1,29 @@
- - Sorry, we can not find what you are looking for. - - -
    -
  • -
      -
    • -
      - -
      + +

      Sorry, we can not find what you are looking for.

      +
      +

      1 item returned

      +

      {{results.length}} items returned

      +
        +
      • +
          +
        • +
          + +
          +
        • +
      • -
      -
    • -
    +
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 6559b2565a..38dde65f57 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -2577,4 +2577,8 @@ To manage your website, simply open the Umbraco backoffice and start adding cont View published version Stay in preview mode + + item returned + items returned + diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 2b7c3ec842..f7d6341711 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -2596,4 +2596,8 @@ To manage your website, simply open the Umbraco backoffice and start adding cont View published version Stay in preview mode + + item returned + items returned + diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index 8900272af7..69e2189c67 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -2372,4 +2372,8 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à ]]> + + élément retrouvé + éléments retrouvés + From fc77252ec756cf90bb74e7fbbe6dd6d75cbdacfc Mon Sep 17 00:00:00 2001 From: Dave de Moel Date: Mon, 1 Mar 2021 14:54:52 +0100 Subject: [PATCH 85/99] Updated LightInject to v6.4.0 --- build/NuSpecs/UmbracoCms.Core.nuspec | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 2 +- src/Umbraco.Tests/Umbraco.Tests.csproj | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index fce15eb487..35eef49ec2 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -23,7 +23,7 @@ the latter would pick anything below 3.0.0 and that includes prereleases such as 3.0.0-alpha, and we do not want this to happen as the alpha of the next major is, really, the next major already. --> - + diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 15149d510e..b27b4f9895 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -77,7 +77,7 @@ runtime; build; native; contentfiles; analyzers all
- + diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 9d4bc4294c..8397e0baf3 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -83,7 +83,7 @@ 1.8.14 - + diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index d02d4f6a03..d77ca52200 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -71,7 +71,7 @@ 2.7.0.100 - + @@ -1309,4 +1309,4 @@ - + \ No newline at end of file From c84f616a17b6c9d2dec5dfef7cf5f249914fa525 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 17 Mar 2021 17:00:17 +0100 Subject: [PATCH 86/99] Remove HtmlSanitizer once more - see #9803 --- build/NuSpecs/UmbracoCms.Web.nuspec | 1 - src/Umbraco.Core/Constants-SvgSanitizer.cs | 23 ------------------- src/Umbraco.Core/Umbraco.Core.csproj | 1 - src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 1 + src/Umbraco.Web/Runtime/WebInitialComposer.cs | 10 -------- src/Umbraco.Web/Services/IconService.cs | 8 ++----- src/Umbraco.Web/Umbraco.Web.csproj | 5 +--- 7 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 src/Umbraco.Core/Constants-SvgSanitizer.cs diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec index fc31551d6c..e0ffd57aff 100644 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ b/build/NuSpecs/UmbracoCms.Web.nuspec @@ -42,7 +42,6 @@ - diff --git a/src/Umbraco.Core/Constants-SvgSanitizer.cs b/src/Umbraco.Core/Constants-SvgSanitizer.cs deleted file mode 100644 index c92b9f56c7..0000000000 --- a/src/Umbraco.Core/Constants-SvgSanitizer.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Core -{ - public static partial class Constants - { - /// - /// Defines the alias identifiers for Umbraco's core application sections. - /// - public static class SvgSanitizer - { - /// - /// Allowlist for SVG attributes. - /// - public static readonly IList Attributes = new [] { "accent-height", "accumulate", "additive", "alignment-baseline", "allowReorder", "alphabetic", "amplitude", "arabic-form", "ascent", "attributeName", "attributeType", "autoReverse", "azimuth", "baseFrequency", "baseline-shift", "baseProfile", "bbox", "begin", "bias", "by", "calcMode", "cap-height", "class", "clip", "clipPathUnits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "contentScriptType", "contentStyleType", "cursor", "cx", "cy", "d", "decelerate", "descent", "diffuseConstant", "direction", "display", "divisor", "dominant-baseline", "dur", "dx", "dy", "edgeMode", "elevation", "enable-background", "end", "exponent", "externalResourcesRequired", "Section", "fill", "fill-opacity", "fill-rule", "filter", "filterRes", "filterUnits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "format", "from", "fr", "fx", "fy", "g1", "g2", "glyph-name", "glyph-orientation-horizontal", "glyph-orientation-vertical", "glyphRef", "gradientTransform", "gradientUnits", "hanging", "height", "href", "hreflang", "horiz-adv-x", "horiz-origin-x", "ISection", "id", "ideographic", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kernelMatrix", "kernelUnitLength", "kerning", "keyPoints", "keySplines", "keyTimes", "lang", "lengthAdjust", "letter-spacing", "lighting-color", "limitingConeAngle", "local", "MSection", "marker-end", "marker-mid", "marker-start", "markerHeight", "markerUnits", "markerWidth", "mask", "maskContentUnits", "maskUnits", "mathematical", "max", "media", "method", "min", "mode", "NSection", "name", "numOctaves", "offset", "opacity", "operator", "order", "orient", "orientation", "origin", "overflow", "overline-position", "overline-thickness", "panose-1", "paint-order", "path", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "ping", "pointer-events", "points", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "r", "radius", "referrerPolicy", "refX", "refY", "rel", "rendering-intent", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "restart", "result", "rotate", "rx", "ry", "scale", "seed", "shape-rendering", "slope", "spacing", "specularConstant", "specularExponent", "speed", "spreadMethod", "startOffset", "stdDeviation", "stemh", "stemv", "stitchTiles", "stop-color", "stop-opacity", "strikethrough-position", "strikethrough-thickness", "string", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "surfaceScale", "systemLanguage", "tabindex", "tableValues", "target", "targetX", "targetY", "text-anchor", "text-decoration", "text-rendering", "textLength", "to", "transform", "type", "u1", "u2", "underline-position", "underline-thickness", "unicode", "unicode-bidi", "unicode-range", "units-per-em", "v-alphabetic", "v-hanging", "v-ideographic", "v-mathematical", "values", "vector-effect", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "viewBox", "viewTarget", "visibility", "width", "widths", "word-spacing", "writing-mode", "x", "x-height", "x1", "x2", "xChannelSelector", "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "y", "y1", "y2", "yChannelSelector", "z", "zoomAndPan" }; - - /// - /// Allowlist for SVG tabs. - /// - public static readonly IList Tags = new [] { "a", "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "discard", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hatch", "hatchpath", "hkern", "image", "line", "linearGradient", "marker", "mask", "mesh", "meshgradient", "meshpatch", "meshrow", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "set", "solidcolor", "stop", "svg", "switch", "symbol", "text", "textPath", "title", "tref", "tspan", "unknown", "use", "view", "vkern" }; - } - } -} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index b27b4f9895..635d8080cf 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -261,7 +261,6 @@ - diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 2ad23e1b73..51d9763ac3 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -111,6 +111,7 @@ runtime; build; native; contentfiles; analyzers all + diff --git a/src/Umbraco.Web/Runtime/WebInitialComposer.cs b/src/Umbraco.Web/Runtime/WebInitialComposer.cs index b15641b503..5d97bfe4a2 100644 --- a/src/Umbraco.Web/Runtime/WebInitialComposer.cs +++ b/src/Umbraco.Web/Runtime/WebInitialComposer.cs @@ -40,7 +40,6 @@ using Current = Umbraco.Web.Composing.Current; using Umbraco.Web.PropertyEditors; using Umbraco.Core.Models; using Umbraco.Web.Models; -using Ganss.XSS; namespace Umbraco.Web.Runtime { @@ -140,15 +139,6 @@ namespace Umbraco.Web.Runtime composition.RegisterUnique(); composition.RegisterUnique(); composition.RegisterUnique(); - composition.Register(_ => - { - var sanitizer = new HtmlSanitizer(); - sanitizer.AllowedAttributes.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Attributes); - sanitizer.AllowedCssProperties.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Attributes); - sanitizer.AllowedTags.UnionWith(Umbraco.Core.Constants.SvgSanitizer.Tags); - return sanitizer; - },Lifetime.Singleton); - composition.RegisterUnique(factory => ExamineManager.Instance); // configure the container for web diff --git a/src/Umbraco.Web/Services/IconService.cs b/src/Umbraco.Web/Services/IconService.cs index 15e673e6ba..fad53103c0 100644 --- a/src/Umbraco.Web/Services/IconService.cs +++ b/src/Umbraco.Web/Services/IconService.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using Ganss.XSS; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Configuration; @@ -15,13 +14,11 @@ namespace Umbraco.Web.Services public class IconService : IIconService { private readonly IGlobalSettings _globalSettings; - private readonly IHtmlSanitizer _htmlSanitizer; private readonly IAppPolicyCache _cache; - public IconService(IGlobalSettings globalSettings, IHtmlSanitizer htmlSanitizer, AppCaches appCaches) + public IconService(IGlobalSettings globalSettings, AppCaches appCaches) { _globalSettings = globalSettings; - _htmlSanitizer = htmlSanitizer; _cache = appCaches.RuntimeCache; } @@ -78,12 +75,11 @@ namespace Umbraco.Web.Services try { var svgContent = System.IO.File.ReadAllText(iconPath); - var sanitizedString = _htmlSanitizer.Sanitize(svgContent); var svg = new IconModel { Name = iconName, - SvgString = sanitizedString + SvgString = svgContent }; return svg; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index d77ca52200..ce244f126c 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -65,9 +65,6 @@ - - 5.0.376 - 2.7.0.100 @@ -1299,7 +1296,7 @@ - + - + diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 635d8080cf..2ea5292d73 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -77,7 +77,7 @@ runtime; build; native; contentfiles; analyzers all - + diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 8397e0baf3..9d4bc4294c 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -83,7 +83,7 @@ 1.8.14 - + diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ce244f126c..a6cbefa825 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -68,7 +68,7 @@ 2.7.0.100 - + @@ -1306,4 +1306,4 @@ - \ No newline at end of file + From 2d2a89f216bb14f94ad83396bc185e27be9d5e46 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 7 Apr 2021 13:42:46 +0200 Subject: [PATCH 90/99] Revert "Add copy logic to Media Picker (#9957)" This reverts commit f7c032af65cac83182782c758a3ab79c86b92e70. --- .../src/common/services/clipboard.service.js | 43 +-- .../mediapicker/mediapicker.controller.js | 76 +---- .../mediapicker/mediapicker.html | 274 ++++++++---------- .../mediapicker/mediapicker.controller.js | 42 +-- .../mediapicker/mediapicker.html | 3 - src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 1 - .../Umbraco/config/lang/en_us.xml | 1 - 7 files changed, 149 insertions(+), 291 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/clipboard.service.js b/src/Umbraco.Web.UI.Client/src/common/services/clipboard.service.js index 167c134e62..83fd3d08c2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/clipboard.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/clipboard.service.js @@ -16,7 +16,6 @@ function clipboardService($window, notificationsService, eventsService, localSto const TYPES = {}; TYPES.ELEMENT_TYPE = "elementType"; TYPES.BLOCK = "block"; - TYPES.IMAGE = "image"; TYPES.RAW = "raw"; var clearPropertyResolvers = {}; @@ -285,7 +284,7 @@ function clipboardService($window, notificationsService, eventsService, localSto * * @param {string} type A string defining the type of data to storing, example: 'elementType', 'contentNode' * @param {string} alias A string defining the alias of the data to store, example: 'product' - * @param {object} data A object containing the properties to be saved, this could be the object of a ElementType, ContentNode, ... + * @param {object} entry A object containing the properties to be saved, this could be the object of a ElementType, ContentNode, ... * @param {string} displayLabel (optional) A string swetting the label to display when showing paste entries. * @param {string} displayIcon (optional) A string setting the icon to display when showing paste entries. * @param {string} uniqueKey (optional) A string prodiving an identifier for this entry, existing entries with this key will be removed to ensure that you only have the latest copy of this data. @@ -319,46 +318,6 @@ function clipboardService($window, notificationsService, eventsService, localSto }; - /** - * @ngdoc method - * @name umbraco.services.clipboardService#copy - * @methodOf umbraco.services.clipboardService - * - * @param {string} type A string defining the type of data to storing, example: 'elementType', 'contentNode' - * @param {string} alias A string defining the alias of the data to store, example: 'product' - * @param {object[]} data An array of objects containing the properties to be saved, this could be the object of a ElementType, ContentNode, ... - * - * @description - * Saves multiple JS-object to the clipboard. - */ - service.copyMultiple = function (type, alias, data, firstLevelClearupMethod) { - - var storage = retriveStorage(); - - data.forEach(item => { - var displayLabel = item.displayLabel || item.name; - var displayIcon = item.displayIcon || iconHelper.convertFromLegacyIcon(item.icon); - var uniqueKey = item.uniqueKey || item.key || console.error("missing unique key for this content"); - - // remove previous copies of this entry: - storage.entries = storage.entries.filter( - (entry) => { - return entry.unique !== uniqueKey; - } - ); - - var entry = { unique: uniqueKey, type: type, alias: alias, data: prepareEntryForStorage(type, item, firstLevelClearupMethod), label: displayLabel, icon: displayIcon, date: Date.now() }; - storage.entries.push(entry); - }); - - if (saveStorage(storage) === true) { - notificationsService.success("Clipboard", "Copied to clipboard."); - } else { - notificationsService.error("Clipboard", "Couldnt copy this data to clipboard."); - } - - }; - /** * @ngdoc method diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js index 700bfa5715..fec2e632c5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //used for the media picker dialog angular.module("umbraco") .controller("Umbraco.Editors.MediaPickerController", - function ($scope, $timeout, mediaResource, entityResource, userService, mediaHelper, mediaTypeHelper, eventsService, treeService, localStorageService, localizationService, editorService, umbSessionStorage, notificationsService, clipboardService) { + function ($scope, $timeout, mediaResource, entityResource, userService, mediaHelper, mediaTypeHelper, eventsService, treeService, localStorageService, localizationService, editorService, umbSessionStorage, notificationsService) { var vm = this; @@ -19,8 +19,6 @@ angular.module("umbraco") vm.enterSubmitFolder = enterSubmitFolder; vm.focalPointChanged = focalPointChanged; vm.changePagination = changePagination; - vm.onNavigationChanged = onNavigationChanged; - vm.clickClearClipboard = clickClearClipboard; vm.clickHandler = clickHandler; vm.clickItemName = clickItemName; @@ -29,9 +27,6 @@ angular.module("umbraco") vm.selectLayout = selectLayout; vm.showMediaList = false; - vm.navigation = []; - vm.clipboardImages = []; - var dialogOptions = $scope.model; $scope.disableFolderSelect = (dialogOptions.disableFolderSelect && dialogOptions.disableFolderSelect !== "0") ? true : false; @@ -105,43 +100,15 @@ angular.module("umbraco") function setTitle() { if (!$scope.model.title) { - localizationService.localizeMany(["defaultdialogs_selectMedia", "defaultdialogs_tabClipboard"]) + localizationService.localize("defaultdialogs_selectMedia") .then(function (data) { - $scope.model.title = data[0]; - - - vm.navigation = [{ - "alias": "empty", - "name": data[0], - "icon": "icon-umb-media", - "active": true, - "view": "" - }, - { - "alias": "clipboard", - "name": data[1], - "icon": "icon-paste-in", - "view": "", - "disabled": vm.clipboardImages.length === 0 - }]; - - vm.activeTab = vm.navigation[0]; + $scope.model.title = data; }); } } function onInit() { - clipboardService.retriveEntriesOfType(clipboardService.TYPES.IMAGE, ["Media"]).forEach(item => { - var media = item.data.media; - if ((($scope.disableFolderSelect || $scope.onlyImages) && media.isFolder) || - ($scope.onlyFolders && !media.isFolder)) { - return; - } - setDefaultData(media); - vm.clipboardImages.push(media); - }); - setTitle(); userService.getCurrentUser().then(function (userData) { @@ -182,7 +149,7 @@ angular.module("umbraco") .then(function (node) { $scope.target = node; // Moving directly to existing node's folder - gotoFolder({ id: node.parentId }).then(function () { + gotoFolder({ id: node.parentId }).then(function() { selectMedia(node); $scope.target.url = mediaHelper.resolveFileFromEntity(node); $scope.target.thumbnail = mediaHelper.resolveFileFromEntity(node, true); @@ -202,10 +169,10 @@ angular.module("umbraco") function upload(v) { var fileSelect = $(".umb-file-dropzone .file-select"); - if (fileSelect.length === 0) { + if (fileSelect.length === 0){ localizationService.localize('media_uploadNotAllowed').then(function (message) { notificationsService.warning(message); }); } - else { + else{ fileSelect.trigger("click"); } } @@ -428,19 +395,6 @@ angular.module("umbraco") }); }; - function onNavigationChanged(tab) { - vm.activeTab.active = false; - vm.activeTab = tab; - vm.activeTab.active = true; - }; - - function clickClearClipboard() { - vm.onNavigationChanged(vm.navigation[0]); - vm.navigation[1].disabled = true; - vm.clipboardImages = []; - clipboardService.clearEntriesOfType(clipboardService.TYPES.IMAGE, ["Media"]); - }; - var debounceSearchMedia = _.debounce(function () { $scope.$apply(function () { if (vm.searchOptions.filter) { @@ -550,7 +504,13 @@ angular.module("umbraco") var allowedTypes = dialogOptions.filter ? dialogOptions.filter.split(",") : null; for (var i = 0; i < data.length; i++) { - setDefaultData(data[i]); + if (data[i].metaData.MediaPath !== null) { + data[i].thumbnail = mediaHelper.resolveFileFromEntity(data[i], true); + data[i].image = mediaHelper.resolveFileFromEntity(data[i], false); + } + if (data[i].metaData.UpdateDate !== null){ + data[i].updateDate = data[i].metaData.UpdateDate; + } data[i].filtered = allowedTypes && allowedTypes.indexOf(data[i].metaData.ContentTypeAlias) < 0; } @@ -563,16 +523,6 @@ angular.module("umbraco") }); } - function setDefaultData(item) { - if (item.metaData.MediaPath !== null) { - item.thumbnail = mediaHelper.resolveFileFromEntity(item, true); - item.image = mediaHelper.resolveFileFromEntity(item, false); - } - if (item.metaData.UpdateDate !== null) { - item.updateDate = item.metaData.UpdateDate; - } - } - function preSelectMedia() { for (var folderIndex = 0; folderIndex < $scope.images.length; folderIndex++) { var folderImage = $scope.images[folderIndex]; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.html index 9fd31de537..df0c8e3cef 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.html @@ -3,8 +3,6 @@ -
-
+ -
+
-
+
-
- -
-
- - +
+
+ + +
+
+
+
+ + +
+ +
    +
  • + + +
  • +
  • + + +
  • +
  • + + + +
  • +
+ +
+ + + + + + + + + + + +
+ + +
+ + + + +
- - -
+ + + + diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js index b47dd2f470..f3a57224e2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //this controller simply tells the dialogs service to open a mediaPicker window //with a specified callback, this callback will receive an object with a selection on it angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController", - function ($scope, entityResource, mediaHelper, $timeout, userService, localizationService, editorService, angularHelper, overlayService, clipboardService) { + function ($scope, entityResource, mediaHelper, $timeout, userService, localizationService, editorService, angularHelper, overlayService) { var vm = this; @@ -10,7 +10,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl vm.add = add; vm.remove = remove; - vm.copyItem = copyItem; vm.editItem = editItem; vm.showAdd = showAdd; @@ -54,7 +53,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // it's prone to someone "fixing" it at some point without knowing the effects. Rather use toString() // compares and be completely sure it works. var found = medias.find(m => m.udi.toString() === id.toString() || m.id.toString() === id.toString()); - + var mediaItem = found || { name: vm.labels.deletedItem, @@ -95,7 +94,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl function sync() { $scope.model.value = $scope.ids.join(); removeAllEntriesAction.isDisabled = $scope.ids.length === 0; - copyAllEntriesAction.isDisabled = removeAllEntriesAction.isDisabled; } function setDirty() { @@ -129,7 +127,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl ]; localizationService.localizeMany(labelKeys) - .then(function (data) { + .then(function(data) { vm.labels.deletedItem = data[0]; vm.labels.trashed = data[1]; @@ -143,7 +141,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl else { $scope.model.config.startNodeId = userData.startMediaIds.length !== 1 ? -1 : userData.startMediaIds[0]; $scope.model.config.startNodeIsVirtual = userData.startMediaIds.length !== 1; - } + } } // only allow users to add and edit media if they have access to the media section @@ -163,23 +161,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl setDirty(); } - function copyAllEntries() { - clipboardService.copyMultiple(clipboardService.TYPES.IMAGE, - "Media", - $scope.mediaItems.map(item => { - return { "media": item, "key": item.udi } - }), clearNodeForCopy); - } - - function copyItem(item) { - clipboardService.copy(clipboardService.TYPES.IMAGE, "Media", { "media": item }, null, null, item.udi, clearNodeForCopy); - } - - function clearNodeForCopy(item) { - delete item.media.selected; - delete item.media.selectable; - } - function editItem(item) { var mediaEditor = { id: item.id, @@ -279,14 +260,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl }); } - var copyAllEntriesAction = { - labelKey: 'clipboard_labelForCopyAllEntries', - labelTokens: ['Media'], - icon: "documents", - method: copyAllEntries, - isDisabled: true - } - var removeAllEntriesAction = { labelKey: 'clipboard_labelForRemoveAllEntries', labelTokens: [], @@ -294,10 +267,9 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl method: removeAllEntries, isDisabled: true }; - + if (multiPicker === true) { var propertyActions = [ - copyAllEntriesAction, removeAllEntriesAction ]; @@ -315,12 +287,12 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl cancel: ".unsortable", update: function () { setDirty(); - $timeout(function () { + $timeout(function() { // TODO: Instead of doing this with a timeout would be better to use a watch like we do in the // content picker. Then we don't have to worry about setting ids, render models, models, we just set one and let the // watch do all the rest. $scope.ids = $scope.mediaItems.map(media => $scope.model.config.idType === "udi" ? media.udi : media.id); - + sync(); }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html index 1090c4a1f0..c09d7c7613 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html @@ -37,9 +37,6 @@
- diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 38dde65f57..5865d39a75 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -539,7 +539,6 @@ %0%.]]> %0% from the %1% group]]> Yes, remove - Clipboard There are no dictionary items. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index f7d6341711..102f04371d 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -545,7 +545,6 @@ %0%.]]> %0% from the %1% group]]> Yes, remove - Clipboard There are no dictionary items. From 8b6fc762b5edb6af3c62b306265d788a0ed458e1 Mon Sep 17 00:00:00 2001 From: Mole Date: Wed, 7 Apr 2021 13:54:42 +0200 Subject: [PATCH 91/99] Reintroduce old constructor to make non-breaking --- src/Umbraco.Core/Mapping/UmbracoMapper.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Umbraco.Core/Mapping/UmbracoMapper.cs b/src/Umbraco.Core/Mapping/UmbracoMapper.cs index bd2f916524..36e3f9eab9 100644 --- a/src/Umbraco.Core/Mapping/UmbracoMapper.cs +++ b/src/Umbraco.Core/Mapping/UmbracoMapper.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using Umbraco.Core.Composing; using Umbraco.Core.Exceptions; using Umbraco.Core.Scoping; @@ -58,6 +59,14 @@ namespace Umbraco.Core.Mapping profile.DefineMaps(this); } + /// + /// Initializes a new instance of the class. + /// + /// + [Obsolete("This constructor is no longer used and will be removed in future versions, use the other constructor instead")] + public UmbracoMapper(MapDefinitionCollection profiles) : this(profiles, Current.ScopeProvider) + {} + #region Define private static TTarget ThrowCtor(TSource source, MapperContext context) From 9fdbbb54fb3e56f973d684e658940f561612e5b9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 7 Apr 2021 15:44:28 +0200 Subject: [PATCH 92/99] Update cypress test to make macros in the grid work again --- .../cypress/integration/Content/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts index b7f0b40fa6..0cec374c5d 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts @@ -761,7 +761,7 @@ context('Content', () => { cy.umbracoTreeItem("content", [name]).click(); // Click add cy.get(':nth-child(2) > .preview-row > .preview-col > .preview-cell').click(); // Choose 1 column layout. - cy.get('.umb-column > .templates-preview > :nth-child(2) > .ng-binding').click(); // Choose headline + cy.get('.umb-column > .templates-preview > :nth-child(2) > small').click(); // Choose headline cy.get('.umb-cell-placeholder').click(); // Click macro cy.get(':nth-child(4) > .umb-card-grid-item > :nth-child(1)').click(); From ecf67669ce9cdb4bac5fd52719e43a1fb605e4b5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 7 Apr 2021 16:25:46 +0200 Subject: [PATCH 93/99] Attributes could be multiple items, test specifically if `Directory` is an attribute --- src/Umbraco.Web/Editors/CodeFileController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index 409cded781..a6d142a6ea 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -638,7 +638,10 @@ namespace Umbraco.Web.Editors { var path = IOHelper.MapPath(systemDirectory + "/" + virtualPath); var dirInfo = new DirectoryInfo(path); - return dirInfo.Attributes == FileAttributes.Directory; + + // If you turn off indexing in Windows this will have the attribute: + // `FileAttributes.Directory | FileAttributes.NotContentIndexed` + return (dirInfo.Attributes & FileAttributes.Directory) != 0; } // this is an internal class for passing stylesheet data from the client to the controller while editing From 8d8fb2d15c087943a5b5fb5bb8da7d42f48e550a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 12 Apr 2021 12:27:12 +0200 Subject: [PATCH 94/99] =?UTF-8?q?Dont=20show=20block=20catalogue=20if=20on?= =?UTF-8?q?ly=20one=20block=20is=20available.=20Enable=20ente=E2=80=A6=20(?= =?UTF-8?q?#9575)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Dont show block catalogue if only one block is available. Enable entering clipboard directly. * corrected button states * jump clipboard icon when adding items to the clipboard. * fix merge issue * add missing eventsService * correcting missing parts from Merge Co-authored-by: Niels Lyngsø Co-authored-by: Mads Rasmussen --- .../blockpicker/blockpicker.controller.js | 11 +- .../umb-block-list-property-editor.html | 32 +++-- .../umb-block-list-property-editor.less | 110 ++++++++++++++---- .../umbBlockListPropertyEditor.component.js | 97 ++++++++++++--- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 3 + src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 2 + .../Umbraco/config/lang/en_us.xml | 2 + 7 files changed, 207 insertions(+), 50 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js index 90803a3765..5e6613c0f4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockpicker/blockpicker.controller.js @@ -17,7 +17,6 @@ angular.module("umbraco") "alias": "empty", "name": data[0], "icon": "icon-add", - "active": true, "view": "" }, { @@ -28,10 +27,16 @@ angular.module("umbraco") "disabled": vm.model.clipboardItems.length === 0 }]; - vm.activeTab = vm.navigation[0]; + if (vm.model.openClipboard === true) { + vm.activeTab = vm.navigation[1]; + } else { + vm.activeTab = vm.navigation[0]; + } + + vm.activeTab.active = true; } ); - + vm.onNavigationChanged = function (tab) { vm.activeTab.active = false; vm.activeTab = tab; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html index 9726daf5e6..87c0026d56 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html @@ -10,7 +10,7 @@
- + + class="btn-reset umb-block-list__clipboard-button umb-outline" + ng-class="{'--jump': vm.jumpClipboardButton}" + ng-disabled="vm.clipboardItems.length === 0" + ng-click="vm.requestShowClipboard(vm.layout.length, $event)" + localize="title" + title="@blockEditor_tabClipboard"> + + + Clipboard + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.less index e290c6e856..019a772fdd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.less @@ -236,30 +236,98 @@ ng-form.ng-invalid-val-server-match-settings > .umb-block-list__block > .umb-blo } } } -.umb-block-list__create-button { - position: relative; + +.umb-block-list__actions { display: flex; - width: 100%; - align-items: center; - justify-content: center; + border: 1px dashed @ui-action-discreet-border; - color: @ui-action-discreet-type; - font-weight: bold; - margin: 2px 0; - padding: 5px 15px; - box-sizing: border-box; border-radius: @baseBorderRadius; -} + box-sizing: border-box; -.umb-block-list__create-button:hover { - color: @ui-action-discreet-type-hover; - border-color: @ui-action-discreet-border-hover; - text-decoration: none; -} + &:hover { + border-color: transparent; + > button { -.umb-block-list__create-button.--disabled, -.umb-block-list__create-button.--disabled:hover { - color: @gray-7; - border-color: @gray-7; - cursor: default; + border-color: @ui-action-discreet-border; + + &.umb-block-list__clipboard-button { + opacity: 1; + } + } + + } + + > button { + position: relative; + display: flex; + //width: 100%; + align-items: center; + justify-content: center; + + color: @ui-action-discreet-type; + font-weight: bold; + margin: -1px; + padding: 5px 15px; + + border: 1px dashed transparent; + border-radius: @baseBorderRadius; + box-sizing: border-box; + + &:hover { + color: @ui-action-discreet-type-hover; + border-color: @ui-action-discreet-border-hover; + text-decoration: none; + z-index: 1; + } + + &[disabled], + &[disabled]:hover { + color: @gray-7; + border-color: @gray-7; + cursor: default; + } + + &.umb-block-list__create-button { + flex-grow: 1; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + &.umb-block-list__clipboard-button { + margin-left: 0; + padding: 5px 12px; + font-size: 18px;// Align with block action buttons. + border-top-left-radius: 0; + border-bottom-left-radius: 0; + + opacity: 0; + &:hover, &:focus { + opacity: 1; + } + + &.--jump { + + @keyframes umb-block-list__jump-clipboard-button { + 0% { opacity: 0; } + 10% { opacity: 1; } + 90% { opacity: 1; } + 100% { opacity: 0; } + } + animation: umb-block-list__jump-clipboard-button 2s; + + i{ + @keyframes umb-block-list__jump-clipboard-button-i { + 10% { transform: scale(1); } + 10% { transform: scale(1.33); } + 20% { transform: scale(.82); } + 30% { transform: scale(1.24); } + 40% { transform: scale(.94); } + 50% { transform: scale(1); } + } + animation: umb-block-list__jump-clipboard-button-i 2s; + } + } + + } + } } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js index 613e6a8c6a..2d9b13ec7a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js @@ -28,7 +28,7 @@ } }); - function BlockListController($scope, editorService, clipboardService, localizationService, overlayService, blockEditorService, udiService, serverValidationManager, angularHelper) { + function BlockListController($scope, $timeout, editorService, clipboardService, localizationService, overlayService, blockEditorService, udiService, serverValidationManager, angularHelper, eventsService) { var unsubscribe = []; var modelObject; @@ -53,6 +53,8 @@ }; vm.supportCopy = clipboardService.isSupported(); + vm.clipboardItems = []; + unsubscribe.push(eventsService.on("clipboardService.storageUpdate", updateClipboard)); vm.layout = []; // The layout object specific to this Block Editor, will be a direct reference from Property Model. vm.availableBlockTypes = []; // Available block entries of this property editor. @@ -187,6 +189,8 @@ vm.availableContentTypesAliases = modelObject.getAvailableAliasesForBlockContent(); vm.availableBlockTypes = modelObject.getAvailableBlocksForBlockPicker(); + updateClipboard(true); + vm.loading = false; $scope.$evalAsync(); @@ -406,9 +410,34 @@ editorService.open(blockEditorModel); } - vm.showCreateDialog = showCreateDialog; + vm.requestShowCreate = requestShowCreate; + function requestShowCreate(createIndex, mouseEvent) { - function showCreateDialog(createIndex, $event) { + if (vm.blockTypePicker) { + return; + } + + if (vm.availableBlockTypes.length === 1) { + var wasAdded = false; + var blockType = vm.availableBlockTypes[0]; + + wasAdded = addNewBlock(createIndex, blockType.blockConfigModel.contentElementTypeKey); + + if(wasAdded && !(mouseEvent.ctrlKey || mouseEvent.metaKey)) { + userFlowWhenBlockWasCreated(createIndex); + } + } else { + showCreateDialog(createIndex); + } + + } + vm.requestShowClipboard = requestShowClipboard; + function requestShowClipboard(createIndex, mouseEvent) { + showCreateDialog(createIndex, true); + } + + vm.showCreateDialog = showCreateDialog; + function showCreateDialog(createIndex, openClipboard) { if (vm.blockTypePicker) { return; @@ -424,6 +453,7 @@ $parentForm: vm.propertyForm, // pass in a $parentForm, this maintains the FormController hierarchy with the infinite editing view (if it contains a form) availableItems: vm.availableBlockTypes, title: vm.labels.grid_addElement, + openClipboard: openClipboard, orderBy: "$index", view: "views/common/infiniteeditors/blockpicker/blockpicker.html", size: (amountOfAvailableTypes > 8 ? "medium" : "small"), @@ -444,19 +474,15 @@ } }, submit: function(blockPickerModel, mouseEvent) { - var added = false; + var wasAdded = false; if (blockPickerModel && blockPickerModel.selectedItem) { - added = addNewBlock(createIndex, blockPickerModel.selectedItem.blockConfigModel.contentElementTypeKey); + wasAdded = addNewBlock(createIndex, blockPickerModel.selectedItem.blockConfigModel.contentElementTypeKey); } if(!(mouseEvent.ctrlKey || mouseEvent.metaKey)) { editorService.close(); - if (added && vm.layout.length > createIndex) { - if (inlineEditing === true) { - activateBlock(vm.layout[createIndex].$block); - } else if (inlineEditing === false && vm.layout[createIndex].$block.hideContentInOverlay !== true) { - editBlock(vm.layout[createIndex].$block, false, createIndex, blockPickerModel.$parentForm, {createFlow: true}); - } + if (wasAdded) { + userFlowWhenBlockWasCreated(createIndex); } } }, @@ -475,7 +501,28 @@ clipboardService.clearEntriesOfType(clipboardService.TYPES.BLOCK, vm.availableContentTypesAliases); }; - blockPickerModel.clipboardItems = []; + blockPickerModel.clipboardItems = vm.clipboardItems; + + // open block picker overlay + editorService.open(blockPickerModel); + + }; + function userFlowWhenBlockWasCreated(createIndex) { + if (vm.layout.length > createIndex) { + var blockObject = vm.layout[createIndex].$block; + if (inlineEditing === true) { + blockObject.activate(); + } else if (inlineEditing === false && blockObject.hideContentInOverlay !== true) { + blockObject.edit(); + } + } + } + + function updateClipboard(firstTime) { + + var oldAmount = vm.clipboardItems.length; + + vm.clipboardItems = []; var entriesForPaste = clipboardService.retriveEntriesOfType(clipboardService.TYPES.ELEMENT_TYPE, vm.availableContentTypesAliases); entriesForPaste.forEach(function (entry) { @@ -511,19 +558,33 @@ if(Array.isArray(entry.data) === false) { pasteEntry.blockConfigModel = modelObject.getBlockConfiguration(entry.data.data.contentTypeKey); } - blockPickerModel.clipboardItems.push(pasteEntry); + vm.clipboardItems.push(pasteEntry); }); - blockPickerModel.clipboardItems.sort( (a, b) => { + vm.clipboardItems.sort( (a, b) => { return b.date - a.date }); - // open block picker overlay - editorService.open(blockPickerModel); + if(firstTime !== true && vm.clipboardItems.length > oldAmount) { + jumpClipboard(); + } + } - }; + var jumpClipboardTimeout; + function jumpClipboard() { - var requestCopyAllBlocks = function () { + if(jumpClipboardTimeout) { + return; + } + + vm.jumpClipboardButton = true; + jumpClipboardTimeout = $timeout(() => { + vm.jumpClipboardButton = false; + jumpClipboardTimeout = null; + }, 2000); + } + + function requestCopyAllBlocks() { var aliases = []; diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 39a6fee671..737181c668 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1891,7 +1891,10 @@ Mange hilsner fra Umbraco robotten Error! The ElementType of this block does not exist anymore + Tilføj indhold + Tilføj %0% Feltet %0% bruger editor %1% som ikke er supporteret for blokke. + Hvad er Indholdsskabeloner? diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index 5865d39a75..3f6c985a0f 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -2543,6 +2543,8 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Error! The ElementType of this block does not exist anymore + Add content + Add %0% Property '%0%' uses editor '%1%' which is not supported in blocks. diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 102f04371d..87b58e5063 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -2562,6 +2562,8 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Error! The ElementType of this block does not exist anymore + Add content + Add %0% Property '%0%' uses editor '%1%' which is not supported in blocks. From 18fa631f1c225abd877555a2ccae81bf3b51c32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 12 Apr 2021 14:38:52 +0200 Subject: [PATCH 95/99] use paste-resolvers (#10121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Niels Lyngsø --- .../nestedcontent/nestedcontent.controller.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js index e1238313cc..5d7d37f7bf 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js @@ -8,7 +8,7 @@ angular.module('umbraco').run(['clipboardService', function (clipboardService) { - function clearNestedContentPropertiesForStorage(prop, propClearingMethod) { + function resolveNestedContentPropertiesForPaste(prop, propClearingMethod) { // if prop.editor is "Umbraco.NestedContent" if ((typeof prop === 'object' && prop.editor === "Umbraco.NestedContent")) { @@ -17,8 +17,8 @@ for (var i = 0; i < value.length; i++) { var obj = value[i]; - // remove the key - delete obj.key; + // generate a new key. + obj.key = String.CreateGuid(); // Loop through all inner properties: for (var k in obj) { @@ -28,10 +28,10 @@ } } - clipboardService.registerClearPropertyResolver(clearNestedContentPropertiesForStorage, clipboardService.TYPES.ELEMENT_TYPE) + clipboardService.registerPastePropertyResolver(resolveNestedContentPropertiesForPaste, clipboardService.TYPES.ELEMENT_TYPE) - function clearInnerNestedContentPropertiesForStorage(prop, propClearingMethod) { + function resolveInnerNestedContentPropertiesForPaste(prop, propClearingMethod) { // if we got an array, and it has a entry with ncContentTypeAlias this meants that we are dealing with a NestedContent property data. if ((Array.isArray(prop) && prop.length > 0 && prop[0].ncContentTypeAlias !== undefined)) { @@ -39,8 +39,8 @@ for (var i = 0; i < prop.length; i++) { var obj = prop[i]; - // remove the key - delete obj.key; + // generate a new key. + obj.key = String.CreateGuid(); // Loop through all inner properties: for (var k in obj) { @@ -50,7 +50,7 @@ } } - clipboardService.registerClearPropertyResolver(clearInnerNestedContentPropertiesForStorage, clipboardService.TYPES.RAW) + clipboardService.registerPastePropertyResolver(resolveInnerNestedContentPropertiesForPaste, clipboardService.TYPES.RAW) }]); angular From de4a7eff855efddf343865f3f93e350075f172cb Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Mon, 12 Apr 2021 23:19:32 +1000 Subject: [PATCH 96/99] Fixes some property editors ensuring ngModelController(#10013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Niels Lyngsø --- src/Umbraco.Web.UI.Client/package-lock.json | 376 +++++++++--------- .../components/buttons/umbtoggle.directive.js | 2 + .../property/umbproperty.directive.js | 6 + .../validation/valformmanager.directive.js | 5 +- .../validation/valpropertymsg.directive.js | 9 +- .../boolean/boolean.controller.js | 10 +- .../propertyeditors/boolean/boolean.html | 24 +- .../colorpicker/colorpicker.controller.js | 2 +- .../colorpicker/colorpicker.html | 24 +- .../multicolorpicker.controller.js | 12 +- .../contentpicker/contentpicker.controller.js | 18 +- .../contentpicker/contentpicker.html | 20 +- .../datepicker/datepicker.controller.js | 9 +- .../imagecropper/imagecropper.controller.js | 18 +- .../imagecropper/imagecropper.html | 3 + .../markdowneditor.controller.js | 10 +- .../markdowneditor/markdowneditor.html | 9 +- .../mediapicker/mediapicker.controller.js | 42 +- .../mediapicker/mediapicker.html | 14 +- .../membergrouppicker.controller.js | 15 +- .../membergrouppicker/membergrouppicker.html | 19 +- .../membergroups/membergroups.controller.js | 8 + .../membergroups/membergroups.html | 5 + .../memberpicker/memberpicker.controller.js | 15 +- .../memberpicker/memberpicker.html | 21 +- .../multiurlpicker.controller.js | 16 +- .../multiurlpicker/multiurlpicker.html | 8 +- .../nestedcontent/nestedcontent.controller.js | 7 +- .../slider/slider.controller.js | 10 +- .../views/propertyeditors/slider/slider.html | 18 +- .../userpicker/userpicker.controller.js | 10 +- .../userpicker/userpicker.html | 29 +- 32 files changed, 460 insertions(+), 334 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 4245cf3b23..e17a6fe57c 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -104,7 +104,7 @@ "@babel/helper-annotate-as-pure": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha1-Mj053QtQ4Qx8Bsp9djjmhk2MXDI=", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -113,7 +113,7 @@ "@babel/helper-builder-binary-assignment-operator-visitor": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha1-a2lijf5Ah3mODE7Zjj1Kay+9L18=", + "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", "dev": true, "requires": { "@babel/helper-explode-assignable-expression": "^7.1.0", @@ -145,7 +145,7 @@ "@babel/helper-explode-assignable-expression": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha1-U3+hP28WdN90WwwA7I/k6ZaByPY=", + "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", @@ -155,7 +155,7 @@ "@babel/helper-function-name": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha1-oM6wFoX3M1XUNgwSR/WCv6/I/1M=", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.0.0", @@ -166,7 +166,7 @@ "@babel/helper-get-function-arity": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha1-g1ctQyDipGVyY3NBE8QoaLZOScM=", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -193,7 +193,7 @@ "@babel/helper-module-imports": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha1-lggbcRHkhtpNLNlxrRpP4hbMLj0=", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -216,7 +216,7 @@ "@babel/helper-optimise-call-expression": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha1-opIMVwKwc8Fd5REGIAqoytIEl9U=", + "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -225,7 +225,7 @@ "@babel/helper-plugin-utils": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha1-u7P77phmHFaQNCN8wDlnupm08lA=", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", "dev": true }, "@babel/helper-regex": { @@ -240,7 +240,7 @@ "@babel/helper-remap-async-to-generator": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha1-Nh2AghtvONp1vT8HheziCojF/n8=", + "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", @@ -265,7 +265,7 @@ "@babel/helper-simple-access": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha1-Ze65VMjCRb6qToWdphiPOdceWFw=", + "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", "dev": true, "requires": { "@babel/template": "^7.1.0", @@ -991,7 +991,7 @@ "accord": { "version": "0.29.0", "resolved": "https://registry.npmjs.org/accord/-/accord-0.29.0.tgz", - "integrity": "sha1-t0HBdtAENcWSnUZt/oz2vukzseQ=", + "integrity": "sha512-3OOR92FTc2p5/EcOzPcXp+Cbo+3C15nV9RXHlOUBCBpHhcB+0frbSNR9ehED/o7sTcyGVtqGJpguToEdlXhD0w==", "dev": true, "requires": { "convert-source-map": "^1.5.0", @@ -1027,7 +1027,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1038,7 +1038,7 @@ "ace-builds": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.4.2.tgz", - "integrity": "sha1-avwuQ6e17/3ETYQHQ2EShSVo6A0=" + "integrity": "sha512-M1JtZctO2Zg+1qeGUFZXtYKsyaRptqQtqpVzlj80I0NzGW9MF3um0DBuizIvQlrPYUlTdm+wcOPZpZoerkxQdA==" }, "acorn": { "version": "7.1.0", @@ -1136,7 +1136,7 @@ "angular-animate": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.7.5.tgz", - "integrity": "sha1-H/xsKpze4ieiunnMbNj3HsRNtdw=" + "integrity": "sha512-kU/fHIGf2a4a3bH7E1tzALTHk+QfoUSCK9fEcMFisd6ZWvNDwPzXWAilItqOC3EDiAXPmGHaNc9/aXiD9xrAxQ==" }, "angular-aria": { "version": "1.7.9", @@ -1166,12 +1166,12 @@ "angular-cookies": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.7.5.tgz", - "integrity": "sha1-HFqzwFzcQ/F3e+lQbmRYfLNUNjQ=" + "integrity": "sha512-/8xvvSl/Z9Vwu8ChRm+OQE3vmli8Icwl8uTYkHqD7j7cknJP9kNaf7SgsENlsLVtOqLE/I7TCFYrSx3bmSeNQA==" }, "angular-dynamic-locale": { "version": "0.1.37", "resolved": "https://registry.npmjs.org/angular-dynamic-locale/-/angular-dynamic-locale-0.1.37.tgz", - "integrity": "sha1-fon70uxFvdaryJ82zaiJODjkk1Q=", + "integrity": "sha512-m5Kyk8W8/mOZSqRxuByOwHBjv8labLBAgvl0Z3iQx2xT/tWCqb94imKUPwumudszdPDjxeopwyucQvm8Sw7ogw==", "requires": { "@types/angular": "^1.6.25" } @@ -1179,7 +1179,7 @@ "angular-i18n": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-i18n/-/angular-i18n-1.7.5.tgz", - "integrity": "sha1-Lie2Thl3qMa2sFHFHQF1xtTcglI=" + "integrity": "sha512-52+Jpt8HRJV2bqSbSU6fWkwOvGzj/DxbNpKXxnTuCS9heuJrlm77BS/lhrF4BA8+Uudnh7npr5/yRELobP+8Yw==" }, "angular-local-storage": { "version": "0.7.1", @@ -1189,32 +1189,32 @@ "angular-messages": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-messages/-/angular-messages-1.7.5.tgz", - "integrity": "sha1-fC/XgTFaQ6GYOLEX2gFCqYhFThQ=" + "integrity": "sha512-YDpJpFLyrIgZjE/sIAjgww1y6r3QqXBJbNDI0QjftD37vHXLkwvAOo3A4bxPw8BikyGLcJrFrgf6hRAzntJIWA==" }, "angular-mocks": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-mocks/-/angular-mocks-1.7.5.tgz", - "integrity": "sha1-yLq6WgbtYLk0aXAmtJIWliavOEs=" + "integrity": "sha512-I+Ue2Bkx6R9W5178DYrNvzjIdGh4wKKoCWsgz8dc7ysH4mA70Q3M9v5xRF0RUu7r+2CZj+nDeUecvh2paxcYvg==" }, "angular-route": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-route/-/angular-route-1.7.5.tgz", - "integrity": "sha1-NKNkjEB6FKAw0HXPSFMY4zuiPw4=" + "integrity": "sha512-7KfyEVVOWTI+jTY/j5rUNCIHGRyeCOx7YqZI/Ci3IbDK7GIsy6xH+hS5ai0Xi0sLjzDZ0PUDO4gBn+K0dVtlOg==" }, "angular-sanitize": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-sanitize/-/angular-sanitize-1.7.5.tgz", - "integrity": "sha1-ddSeFQccqccFgedtIJQPJjcuJNI=" + "integrity": "sha512-wjKCJOIwrkEvfD0keTnKGi6We13gtoCAQIHcdoqyoo3gwvcgNfYymVQIS3+iCGVcjfWz0jHuS3KgB4ysRWsTTA==" }, "angular-touch": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/angular-touch/-/angular-touch-1.7.5.tgz", - "integrity": "sha1-7SYyKmhfApmyPLauqYNMEZQk2kY=" + "integrity": "sha512-XNAZNG0RA1mtdwBJheViCF1H/7wOygp4MLIfs5y1K+rne6AeaYKZcV6EJs9fvgfLKLO6ecm1+3J8hoCkdhhxQw==" }, "angular-ui-sortable": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/angular-ui-sortable/-/angular-ui-sortable-0.19.0.tgz", - "integrity": "sha1-SsQ5H8TU3lcRDbS10xp8GY0xT9A=", + "integrity": "sha512-u/uc981Nzg4XN1bMU9qKleMTSt7F1XjMWnyGw6gxPLIeQeLZm8jWNy7tj8y2r2HmvzXFbQVq2z6rObznFKAekQ==", "requires": { "angular": ">=1.2.x", "jquery": ">=3.1.x", @@ -1277,7 +1277,7 @@ "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -1556,13 +1556,13 @@ "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, "array-sort": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha1-5MBTVkU/VvU1EqfR1hI/LFTAqIo=", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", "dev": true, "requires": { "default-compare": "^1.0.0", @@ -1573,7 +1573,7 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } @@ -1599,7 +1599,7 @@ "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", "dev": true }, "asap": { @@ -1612,7 +1612,7 @@ "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -1633,7 +1633,7 @@ "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, "async": { @@ -1695,7 +1695,7 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, "autoprefixer": { @@ -1730,7 +1730,7 @@ "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, "babel-plugin-dynamic-import-node": { @@ -2170,7 +2170,7 @@ "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha1-1oDu7yX4zZGtUz9bAe7UjmTK9oM=", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", "dev": true }, "bluebird": { @@ -2200,7 +2200,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -2345,7 +2345,7 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "bufferstreams": { @@ -2460,7 +2460,7 @@ }, "callsites": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true }, @@ -2493,7 +2493,7 @@ "caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA=", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", "dev": true, "requires": { "browserslist": "^4.0.0", @@ -2551,7 +2551,7 @@ "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, "chart.js": { @@ -2603,7 +2603,7 @@ "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { "micromatch": "^3.1.4", @@ -2664,7 +2664,7 @@ "clean-css": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha1-LUEe92uFabbQyEBo2r6FsKpeXBc=", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", "dev": true, "requires": { "source-map": "~0.6.0" @@ -2673,7 +2673,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } @@ -2710,7 +2710,7 @@ "clipboard": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha1-g22v1mzw/qXXHOXVsL9ulYAJES0=", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", "requires": { "good-listener": "^1.2.2", "select": "^1.1.2", @@ -2877,7 +2877,7 @@ "color-string": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha1-ybvF8BtYtUkvPWhXRZy2WQziBMw=", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", "dev": true, "requires": { "color-name": "^1.0.0", @@ -2985,7 +2985,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -3018,7 +3018,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -3069,7 +3069,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -3112,13 +3112,13 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha1-UbU3qMQ+DwTewZk7/83VBOdYrCA=", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -3139,7 +3139,7 @@ "copy-props": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha1-k7scrfr9MdpbuKnUtB9HHsOnLf4=", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", "dev": true, "requires": { "each-props": "^1.3.0", @@ -3211,7 +3211,7 @@ "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { "nice-try": "^1.0.4", @@ -3250,7 +3250,7 @@ "css-declaration-sorter": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha1-wZiUD2OnbX42wecQGLABchBUyyI=", + "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", "dev": true, "requires": { "postcss": "^7.0.1", @@ -3260,7 +3260,7 @@ "css-select": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha1-q0OGzsnh9miFVWSxfDcztDsqXt4=", + "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", "dev": true, "requires": { "boolbase": "^1.0.0", @@ -3272,7 +3272,7 @@ "css-select-base-adapter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc=", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", "dev": true }, "css-tree": { @@ -3300,7 +3300,7 @@ "cssesc": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha1-OxO9G7HLNuG8taTc0n9UxdyzVwM=", + "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", "dev": true }, "cssnano": { @@ -3368,7 +3368,7 @@ "cssnano-util-raw-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI=", + "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", "dev": true, "requires": { "postcss": "^7.0.0" @@ -3377,13 +3377,13 @@ "cssnano-util-same-parent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M=", + "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", "dev": true }, "csso": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha1-e564vmFiiXPBsmHhadLwJACOdYs=", + "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", "dev": true, "requires": { "css-tree": "1.0.0-alpha.29" @@ -3392,7 +3392,7 @@ "css-tree": { "version": "1.0.0-alpha.29", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha1-P6nU7zFCy9HDAedmTB81K9gvWjk=", + "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", "dev": true, "requires": { "mdn-data": "~1.1.0", @@ -3705,7 +3705,7 @@ "default-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha1-y2ETGESthNhHiPto/QFoHKd4Gi8=", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", "dev": true, "requires": { "kind-of": "^5.0.2" @@ -3714,7 +3714,7 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } @@ -3728,7 +3728,7 @@ "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { "object-keys": "^1.0.12" @@ -3784,7 +3784,7 @@ "delegate": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha1-tmtxwxWFIuirV0T3INjKDCr1kWY=" + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, "depd": { "version": "1.1.2", @@ -3824,7 +3824,7 @@ "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=" + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, "dir-glob": { "version": "3.0.1", @@ -3917,7 +3917,7 @@ "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { "dom-serializer": "0", @@ -3927,7 +3927,7 @@ "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { "is-obj": "^1.0.0" @@ -4042,7 +4042,7 @@ "each-props": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha1-6kWkFNFt1c+kGbGoFyDVygaJIzM=", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", "dev": true, "requires": { "is-plain-object": "^2.0.1", @@ -4121,7 +4121,7 @@ "engine.io": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha1-tgKBw1SEpw7gNR6g6/+D7IyVIqI=", + "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", "dev": true, "requires": { "accepts": "~1.3.4", @@ -4135,7 +4135,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -4177,7 +4177,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -4194,7 +4194,7 @@ "engine.io-parser": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha1-dXq5cPvy37Mse3SwMyFtVznveaY=", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", "dev": true, "requires": { "after": "0.8.2", @@ -4235,7 +4235,7 @@ "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -4262,7 +4262,7 @@ "es-to-primitive": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha1-7fckeAM0VujdqO8J4ArZZQcH83c=", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -4501,13 +4501,13 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -4516,7 +4516,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -4649,7 +4649,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -4771,7 +4771,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extend-shallow": { @@ -4880,7 +4880,7 @@ "fancy-log": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha1-28GRVPVYaQFQojlToK29A1vkX8c=", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", "dev": true, "requires": { "ansi-gray": "^0.1.1", @@ -5092,7 +5092,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -5233,7 +5233,7 @@ "flatpickr": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.5.2.tgz", - "integrity": "sha1-R8itRyoJbl+350uAmwcDU1OD8g0=" + "integrity": "sha512-jDy4QYGpmiy7+Qk8QvKJ4spjDdxcx9cxMydmq1x427HkKWBw0qizLYeYM2F6tMcvvqGjU5VpJS55j4LnsaBblA==" }, "flatted": { "version": "2.0.1", @@ -5332,7 +5332,7 @@ "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -5996,7 +5996,7 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, "get-proxy": { @@ -6229,7 +6229,7 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -6381,7 +6381,7 @@ "gulp-babel": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/gulp-babel/-/gulp-babel-8.0.0.tgz", - "integrity": "sha1-4NqW9PLsSojdOjAw9HbjirISbYc=", + "integrity": "sha512-oomaIqDXxFkg7lbpBou/gnUkX51/Y/M2ZfSjL2hdqXTAlSWZcgZtd2o0cOH0r/eE8LWD0+Q/PsLsr2DKOoqToQ==", "dev": true, "requires": { "plugin-error": "^1.0.1", @@ -6505,7 +6505,7 @@ "vinyl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha1-2FsH2pbkWNJbL/4Z/s6fLKoT7YY=", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { "clone": "^2.1.1", @@ -6551,7 +6551,7 @@ "gulp-less": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.1.tgz", - "integrity": "sha1-NIwzpd3nogfFdxsdgmHRrBAhzu0=", + "integrity": "sha512-hmM2k0FfQp7Ptm3ZaqO2CkMX3hqpiIOn4OHtuSsCeFym63F7oWlEua5v6u1cIjVUKYsVIs9zPg9vbqTEb/udpA==", "dev": true, "requires": { "accord": "^0.29.0", @@ -6596,7 +6596,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -6630,7 +6630,7 @@ "gulp-notify": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-3.2.0.tgz", - "integrity": "sha1-KugiUAnfiB7vWb5d1aLxM3OHdk4=", + "integrity": "sha512-qEocs1UVoDKKUjfsxJNMNwkRla0PbsyJwsqNNXpzYWsLQ29LhxRMY3wnTGZcc4hMHtalnvah/Dwlwb4NijH/0A==", "dev": true, "requires": { "ansi-colors": "^1.0.1", @@ -6716,7 +6716,7 @@ "gulp-postcss": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/gulp-postcss/-/gulp-postcss-8.0.0.tgz", - "integrity": "sha1-jTdyzU0nvKVeyMtMjlduO95NxVA=", + "integrity": "sha512-Wtl6vH7a+8IS/fU5W9IbOpcaLqKxd5L1DUOzaPmlnCbX1CrG0aWdwVnC3Spn8th0m8D59YbysV5zPUe1n/GJYg==", "dev": true, "requires": { "fancy-log": "^1.3.2", @@ -6729,7 +6729,7 @@ "gulp-rename": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz", - "integrity": "sha1-3hxxjnxAla6GH3KW708ySGSCQL0=", + "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==", "dev": true }, "gulp-sort": { @@ -6808,7 +6808,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -6830,7 +6830,7 @@ "gulp-watch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-5.0.1.tgz", - "integrity": "sha1-g9N4dS9b+0baAj5zwX7R2nBmIV0=", + "integrity": "sha512-HnTSBdzAOFIT4wmXYPDUn783TaYAq9bpaN05vuZNP5eni3z3aRx0NAKbjhhMYtcq76x4R1wf4oORDGdlrEjuog==", "dev": true, "requires": { "ansi-colors": "1.1.0", @@ -6915,7 +6915,7 @@ "vinyl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha1-2FsH2pbkWNJbL/4Z/s6fLKoT7YY=", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { "clone": "^2.1.1", @@ -7041,7 +7041,7 @@ "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { "ajv": "^6.5.5", @@ -7051,7 +7051,7 @@ "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -7069,7 +7069,7 @@ "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha1-d3asYn8+p3JQz8My2rfd9eT10R0=", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", "dev": true, "requires": { "isarray": "2.0.1" @@ -7162,7 +7162,7 @@ "hex-color-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4=", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", "dev": true }, "homedir-polyfill": { @@ -7195,7 +7195,7 @@ "html-comment-regex": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c=", + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", "dev": true }, "html-encoding-sniffer": { @@ -7312,7 +7312,7 @@ "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -7328,7 +7328,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "image-size": { @@ -7495,7 +7495,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, "inquirer": { @@ -7591,7 +7591,7 @@ "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { "loose-envify": "^1.0.0" @@ -7624,7 +7624,7 @@ "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { "is-relative": "^1.0.0", @@ -7935,7 +7935,7 @@ "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { "is-unc-path": "^1.0.0" @@ -7944,7 +7944,7 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, "is-retry-allowed": { @@ -7964,7 +7964,7 @@ "is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha1-kyHb0pwhLlypnE+peUxxS8r6L3U=", + "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", "dev": true, "requires": { "html-comment-regex": "^1.1.0" @@ -7973,7 +7973,7 @@ "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha1-oFX2rlcZLK7jKeeoYBGLSXqVDzg=", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", "dev": true, "requires": { "has-symbols": "^1.0.0" @@ -7988,7 +7988,7 @@ "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { "unc-path-regex": "^0.1.2" @@ -8027,7 +8027,7 @@ "isbinaryfile": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha1-XW3vPt6/boyoyunDAYOoBLX4voA=", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", "dev": true, "requires": { "buffer-alloc": "^1.2.0" @@ -8104,7 +8104,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { @@ -8245,7 +8245,7 @@ "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "json-buffer": { @@ -8258,7 +8258,7 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "json-schema": { @@ -8270,7 +8270,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -8483,7 +8483,7 @@ "karma-jasmine": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-2.0.1.tgz", - "integrity": "sha1-JuPjHy+vJy3YDrsOGJiRTMOhl2M=", + "integrity": "sha512-iuC0hmr9b+SNn1DaUD2QEYtUxkS1J+bSJSn7ejdEexs7P8EYvA1CWkEdrDQ+8jVH3AgWlCNwjYsT1chjcNW9lA==", "dev": true, "requires": { "jasmine-core": "^3.3" @@ -8645,7 +8645,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true } @@ -8948,7 +8948,7 @@ "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -9024,7 +9024,7 @@ "make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha1-KbM/MSqo9UfEpeSQ9Wr87JkTOtY=", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { "kind-of": "^6.0.2" @@ -9204,7 +9204,7 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, "mimic-response": { @@ -9225,7 +9225,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -9276,7 +9276,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -9305,7 +9305,7 @@ "mute-stdout": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha1-rLAwDrTeI6fd7sAU4+lgRLNHIzE=", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", "dev": true }, "mute-stream": { @@ -9324,7 +9324,7 @@ "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -9354,7 +9354,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, @@ -9366,7 +9366,7 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "node-notifier": { @@ -9431,7 +9431,7 @@ "normalize-url": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", "dev": true }, "nouislider": { @@ -12575,7 +12575,7 @@ "nth-check": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", "dev": true, "requires": { "boolbase": "~1.0.0" @@ -12602,7 +12602,7 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "object-assign": { @@ -12804,7 +12804,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -12895,7 +12895,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -13117,7 +13117,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-root": { @@ -13175,7 +13175,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -13197,7 +13197,7 @@ "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha1-dwFr2JGdCsN3/c3QMiMolTyleBw=", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", "dev": true, "requires": { "ansi-colors": "^1.0.1", @@ -13235,7 +13235,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "supports-color": { @@ -13252,7 +13252,7 @@ "postcss-calc": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha1-Ntd7qwI7Dsu5eJ2E3LI8SUEUVDY=", + "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", "dev": true, "requires": { "css-unit-converter": "^1.1.1", @@ -13277,7 +13277,7 @@ "postcss-convert-values": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8=", + "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", "dev": true, "requires": { "postcss": "^7.0.0", @@ -13296,7 +13296,7 @@ "postcss-discard-duplicates": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha1-P+EzzTyCKC5VD8myORdqkge3hOs=", + "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", "dev": true, "requires": { "postcss": "^7.0.0" @@ -13305,7 +13305,7 @@ "postcss-discard-empty": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha1-yMlR6fc+2UKAGUWERKAq2Qu592U=", + "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", "dev": true, "requires": { "postcss": "^7.0.0" @@ -13314,7 +13314,7 @@ "postcss-discard-overridden": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha1-ZSrvipZybwKfXj4AFG7npOdV/1c=", + "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", "dev": true, "requires": { "postcss": "^7.0.0" @@ -13372,7 +13372,7 @@ "postcss-minify-font-values": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY=", + "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", "dev": true, "requires": { "postcss": "^7.0.0", @@ -13433,7 +13433,7 @@ "postcss-normalize-charset": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=", + "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", "dev": true, "requires": { "postcss": "^7.0.0" @@ -13499,7 +13499,7 @@ "postcss-normalize-unicode": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs=", + "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", "dev": true, "requires": { "browserslist": "^4.0.0", @@ -13510,7 +13510,7 @@ "postcss-normalize-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE=", + "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", "dev": true, "requires": { "is-absolute-url": "^2.0.0", @@ -13590,7 +13590,7 @@ "postcss-unique-selectors": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w=", + "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", "dev": true, "requires": { "alphanum-sort": "^1.0.0", @@ -13601,7 +13601,7 @@ "postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", "dev": true }, "prelude-ls": { @@ -13631,14 +13631,14 @@ }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, "process-nextick-args": { @@ -13713,7 +13713,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "q": { @@ -13725,7 +13725,7 @@ "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha1-xF6cYYAL0IfviNfiVkI73Unl0HE=", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true }, "qs": { @@ -13758,7 +13758,7 @@ "randomatic": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha1-t3bvxZN1mE42xTey9RofCv8Noe0=", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", "dev": true, "requires": { "is-number": "^4.0.0", @@ -13769,7 +13769,7 @@ "is-number": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "dev": true } } @@ -13828,7 +13828,7 @@ "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -13866,7 +13866,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -13897,7 +13897,7 @@ "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha1-SoVuxLVuQHfFV1icroXnpMiGmhE=", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", "dev": true }, "regenerate-unicode-properties": { @@ -13940,7 +13940,7 @@ "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha1-jRnTHPYySCtYkEn4KB+T28uk0H8=", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, "regexpu-core": { @@ -14010,7 +14010,7 @@ "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", "dev": true }, "repeat-string": { @@ -14049,7 +14049,7 @@ "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "optional": true, "requires": { @@ -14289,7 +14289,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -14311,7 +14311,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -14363,7 +14363,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "sax": { @@ -14481,7 +14481,7 @@ "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha1-1rkYHBpI05cyTISHHvvPxz/AZUs=", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "dev": true }, "signal-exit": { @@ -14493,7 +14493,7 @@ "signalr": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/signalr/-/signalr-2.4.0.tgz", - "integrity": "sha1-kq8AjmtSetSzbpT7s0DhNQh6YNI=", + "integrity": "sha512-GPJHb3pcNk3IUui5/WG8lMuarEn+Vpc8wEvJ60w0KQ43W9FHnJcuNcF8dkZePr81eBslzicsRdyEunKNF7KjZQ==", "requires": { "jquery": ">=1.6.4" } @@ -14510,7 +14510,7 @@ "is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "dev": true } } @@ -14559,7 +14559,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -14665,7 +14665,7 @@ "socket.io": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha1-oGnF/qvuPmshSnW0DOBlLhz7mYA=", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", "dev": true, "requires": { "debug": "~3.1.0", @@ -14679,7 +14679,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -14702,7 +14702,7 @@ "socket.io-client": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha1-3LOBA0NqtFeN2wJmOK4vIbYjZx8=", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", "dev": true, "requires": { "backo2": "1.0.2", @@ -14730,7 +14730,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -14764,7 +14764,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -14813,7 +14813,7 @@ "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { "atob": "^2.1.1", @@ -14832,7 +14832,7 @@ "sparkles": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha1-AI22XtzmxQ7sDF4ijhlFBh3QQ3w=", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", "dev": true }, "spdx-correct": { @@ -14908,7 +14908,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "optional": true, @@ -15019,7 +15019,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -15195,7 +15195,7 @@ "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -15287,7 +15287,7 @@ "tar-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", "dev": true, "optional": true, "requires": { @@ -15326,7 +15326,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -15374,7 +15374,7 @@ "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { "readable-stream": "~2.3.6", @@ -15474,7 +15474,7 @@ "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { "os-tmpdir": "~1.0.2" @@ -15569,7 +15569,7 @@ "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { "psl": "^1.1.24", @@ -15734,7 +15734,7 @@ "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, "unbzip2-stream": { @@ -15757,7 +15757,7 @@ "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha1-BtzjSg5op7q8KbNluOdLiSUgOWE=" + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, "undertaker": { "version": "1.2.1", @@ -15785,13 +15785,13 @@ "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha1-JhmADEyCWADv3YNDr33Zkzy+KBg=", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha1-jtKjJWmWG86SJ9Cc0/+7j+1fAgw=", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", "dev": true, "requires": { "unicode-canonical-property-names-ecmascript": "^1.0.4", @@ -15917,7 +15917,7 @@ "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -15949,7 +15949,7 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, "useragent": { @@ -16008,7 +16008,7 @@ "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -16297,7 +16297,7 @@ "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -16328,7 +16328,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -16354,7 +16354,7 @@ "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "requires": { "async-limiter": "~1.0.0", diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbtoggle.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbtoggle.directive.js index bbda02806e..fb58b4287d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbtoggle.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbtoggle.directive.js @@ -129,6 +129,8 @@ replace: true, templateUrl: 'views/components/buttons/umb-toggle.html', scope: { + // TODO: This should have required ngModel so we can track and validate user input correctly + // https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#custom-control-example checked: "=", disabled: "=", inputId: "@", diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js index 2b2f36dd7d..f4cfacbf70 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js @@ -35,6 +35,12 @@ vm.$onInit = onInit; + vm.setDirty = function () { + // NOTE: We need to use scope because we haven't changd it to vm.propertyForm in the html and that + // might mean a breaking change. + $scope.propertyForm.$setDirty(); + } + vm.setPropertyError = function (errorMsg) { vm.property.propertyErrorMessage = errorMsg; }; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js index c7894da171..55878db2e9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js @@ -44,9 +44,7 @@ function valFormManager(serverValidationManager, $rootScope, $timeout, $location this.isShowingValidation = () => $scope.showValidation === true; - this.notify = function () { - notify($scope); - } + this.notify = notify; this.isValid = function () { return !$scope.formCtrl.$invalid; @@ -112,6 +110,7 @@ function valFormManager(serverValidationManager, $rootScope, $timeout, $location }); //watch the list of validation errors to notify the application of any validation changes + // TODO: Wouldn't it be easier/faster to watch formCtrl.$invalid ? scope.$watch(() => angularHelper.countAllFormErrors(formCtrl), function (e) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js index 26c0403f85..f9e2af584f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js @@ -177,8 +177,9 @@ function valPropertyMsg(serverValidationManager, localizationService, angularHel watcher = scope.$watchCollection( () => formCtrl, function (updatedFormController) { - var ngModels = []; - collectAllNgModelControllersRecursively(updatedFormController.$getControls(), ngModels); + let childControls = updatedFormController.$getControls(); + let ngModels = []; + collectAllNgModelControllersRecursively(childControls, ngModels); ngModels.forEach(x => { if (!x.$validators.serverValidityResetter) { x.$validators.serverValidityResetter = resetServerValidityValidator(x); @@ -201,7 +202,7 @@ function valPropertyMsg(serverValidationManager, localizationService, angularHel hasError = false; formCtrl.$setValidity('valPropertyMsg', true); scope.errorMsg = ""; - + } // This deals with client side validation changes and is executed anytime validators change on the containing @@ -264,6 +265,8 @@ function valPropertyMsg(serverValidationManager, localizationService, angularHel //listen for form validation changes. //The alternative is to add a watch to formCtrl.$invalid but that would lead to many more watches then // subscribing to this single watch. + // TODO: Really? Since valFormManager is watching a countof all errors which is more overhead than watching formCtrl.$invalid + // and there's a TODO there that it should just watch formCtrl.$invalid valFormManager.onValidationStatusChanged(function (evt, args) { checkValidationStatus(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.controller.js index dab8d2c6f8..018c2b72c1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.controller.js @@ -1,4 +1,4 @@ -function booleanEditorController($scope, angularHelper) { +function booleanEditorController($scope) { // Setup the default config // This allow to overwrite the configuration when property editor is re-used @@ -36,6 +36,12 @@ function booleanEditorController($scope, angularHelper) { } } + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } + } + setupViewModel(); if ($scope.model && !$scope.model.value) { @@ -51,7 +57,7 @@ function booleanEditorController($scope, angularHelper) { // Update the value when the toggle is clicked $scope.toggle = function(){ - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); if ($scope.renderModel.value){ $scope.model.value = $scope.model.config.falsevalue; setupViewModel(); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.html index 75f3f5452a..aa47e0c667 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.html @@ -1,11 +1,17 @@
- - + + + + + + + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js index 886d051f4d..8166255a26 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js @@ -63,7 +63,7 @@ function ColorPickerController($scope, $timeout) { // this is required to re-validate $timeout(function () { var newColor = color ? color.value : null; - $scope.propertyForm.selectedColor.$setViewValue(newColor); + vm.modelValueForm.selectedColor.$setViewValue(newColor); }); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.html index b7942b7f68..cb5c80a6f1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.html @@ -1,17 +1,19 @@ 
-
- You haven't defined any colors -
+ +
+ You haven't defined any colors +
- - + + - + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/multicolorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/multicolorpicker.controller.js index 967137b930..cb5905e2c9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/multicolorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/multicolorpicker.controller.js @@ -104,7 +104,7 @@ return x.value === item.value && x.label === item.label; }); - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); } function add(evt) { @@ -130,7 +130,7 @@ $scope.newLabel = ""; $scope.hasError = false; $scope.focusOnNew = true; - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); return; } @@ -156,6 +156,12 @@ $scope.newLabel = defaultLabel; } + function setDirty() { + if (vm.modelValueForm) { + vm.modelValueForm.selectedColor.$setDirty(); + } + } + $scope.sortableOptions = { axis: 'y', containment: 'parent', @@ -164,7 +170,7 @@ items: '> div.control-group', tolerance: 'pointer', update: function (e, ui) { - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); } }; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js index 0f012810ba..e818fe9a23 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js @@ -15,7 +15,7 @@ * @param {any} editorService * @param {any} userService */ -function contentPickerController($scope, $q, $routeParams, $location, entityResource, editorState, iconHelper, angularHelper, navigationService, localizationService, editorService, userService, overlayService) { +function contentPickerController($scope, $q, $routeParams, $location, entityResource, editorState, iconHelper, navigationService, localizationService, editorService, userService, overlayService) { var vm = { labels: { @@ -112,7 +112,7 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso scroll: true, zIndex: 6000, update: function (e, ui) { - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); } }; @@ -180,7 +180,7 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso $scope.clear(); $scope.add(data); } - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); }, treeAlias: $scope.model.config.startNode.type, section: $scope.model.config.startNode.type, @@ -257,9 +257,9 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso _.each(model.selection, function (item, i) { $scope.add(item); }); - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); } - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); editorService.close(); } @@ -288,7 +288,7 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso var currIds = $scope.model.value ? $scope.model.value.split(',') : []; if (currIds.length > 0) { currIds.splice(index, 1); - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); $scope.model.value = currIds.join(); } @@ -375,6 +375,12 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso } }); + function setDirty() { + if ($scope.contentPickerForm && $scope.contentPickerForm.modelValue) { + $scope.contentPickerForm.modelValue.$setDirty(); + } + } + /** Syncs the renderModel based on the actual model.value and returns a promise */ function syncRenderModel(doValidation) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html index 1a17ea2698..8ebbaae91f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html @@ -19,14 +19,12 @@
- @@ -64,16 +62,18 @@
+ + -
+
You need to add at least {{model.config.minNumber}} items
-
+
You can only have {{model.config.maxNumber}} items selected
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js index 30b6fc4c8f..af1dea167a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js @@ -161,7 +161,14 @@ function dateTimePickerController($scope, angularHelper, dateHelper, validationM else { $scope.model.value = null; } - angularHelper.getCurrentForm($scope).$setDirty(); + + setDirty(); + } + + function setDirty() { + if ($scope.datePickerForm) { + $scope.datePickerForm.datepicker.$setDirty(); + } } /** Sets the value of the date picker control adn associated viewModel objects based on the model value */ diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js index 70c74d0391..4df8f7e596 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js @@ -31,7 +31,7 @@ angular.module('umbraco') }; //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); } /** @@ -67,7 +67,13 @@ angular.module('umbraco') function onFileSelected(value, files) { setModelValueWithSrc(value); //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); + } + + function setDirty() { + if ($scope.imageCropperForm) { + $scope.imageCropperForm.modelValue.$setDirty(); + } } function imageLoaded(isCroppable, hasDimensions) { @@ -84,7 +90,7 @@ angular.module('umbraco') if (files && files[0]) { $scope.imageSrc = files[0].fileSrc; //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); } } @@ -138,7 +144,7 @@ angular.module('umbraco') $scope.currentPoint = null; //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); } else { // we have a crop open already - close the crop (this will discard any changes made) @@ -168,7 +174,7 @@ angular.module('umbraco') $scope.close(); //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); }; function reset() { @@ -201,7 +207,7 @@ angular.module('umbraco') } //set form to dirty to track changes - $scope.imageCropperForm.$setDirty(); + setDirty(); }; function isCustomCrop(crop) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html index 84ddf7ee3b..241d61660e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html @@ -2,6 +2,9 @@ ng-controller="Umbraco.PropertyEditors.ImageCropperController"> + + + -
- + +
-
+ + +
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js index f3a57224e2..ca46f30bb7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //this controller simply tells the dialogs service to open a mediaPicker window //with a specified callback, this callback will receive an object with a selection on it angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController", - function ($scope, entityResource, mediaHelper, $timeout, userService, localizationService, editorService, angularHelper, overlayService) { + function ($scope, entityResource, mediaHelper, $timeout, userService, localizationService, editorService, overlayService) { var vm = this; @@ -13,6 +13,9 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl vm.editItem = editItem; vm.showAdd = showAdd; + vm.mediaItems = []; + let selectedIds = []; + //check the pre-values for multi-picker var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false; var onlyImages = $scope.model.config.onlyImages && $scope.model.config.onlyImages !== '0' ? true : false; @@ -22,9 +25,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl $scope.allowAddMedia = false; function setupViewModel() { - $scope.mediaItems = []; - $scope.ids = []; - $scope.isMultiPicker = multiPicker; if ($scope.model.value) { @@ -77,12 +77,12 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } - $scope.mediaItems.push(media); + vm.mediaItems.push(media); if ($scope.model.config.idType === "udi") { - $scope.ids.push(media.udi); + selectedIds.push(media.udi); } else { - $scope.ids.push(media.id); + selectedIds.push(media.id); } }); @@ -92,12 +92,14 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl } function sync() { - $scope.model.value = $scope.ids.join(); - removeAllEntriesAction.isDisabled = $scope.ids.length === 0; + $scope.model.value = selectedIds.join(); + removeAllEntriesAction.isDisabled = selectedIds.length === 0; } function setDirty() { - angularHelper.getCurrentForm($scope).$setDirty(); + if (vm.modelValueForm) { + vm.modelValueForm.modelValue.$setDirty(); + } } function reloadUpdatedMediaItems(updatedMediaNodes) { @@ -105,7 +107,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // reload. We only reload the images that is already picked but has been updated. // We have to get the entities from the server because the media // can be edited without being selected - $scope.mediaItems.forEach(media => { + vm.mediaItems.forEach(media => { if (updatedMediaNodes.indexOf(media.udi) !== -1) { media.loading = true; entityResource.getById(media.udi, "Media") @@ -155,8 +157,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl } function remove(index) { - $scope.mediaItems.splice(index, 1); - $scope.ids.splice(index, 1); + vm.mediaItems.splice(index, 1); + selectedIds.splice(index, 1); sync(); setDirty(); } @@ -174,7 +176,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl .then(function (mediaEntity) { // if an image is selecting more than once // we need to update all the media items - $scope.mediaItems.forEach(media => { + vm.mediaItems.forEach(media => { if (media.id === model.mediaNode.id) { angular.extend(media, mediaEntity); media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); @@ -208,13 +210,13 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } - $scope.mediaItems.push(media); + vm.mediaItems.push(media); if ($scope.model.config.idType === "udi") { - $scope.ids.push(media.udi); + selectedIds.push(media.udi); } else { - $scope.ids.push(media.id); + selectedIds.push(media.id); } }); @@ -250,8 +252,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl overlayService.close(); }, submit: function () { - $scope.mediaItems.length = 0;// AngularJS way to empty the array. - $scope.ids.length = 0;// AngularJS way to empty the array. + vm.mediaItems.length = 0;// AngularJS way to empty the array. + selectedIds.length = 0;// AngularJS way to empty the array. sync(); setDirty(); overlayService.close(); @@ -291,7 +293,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // TODO: Instead of doing this with a timeout would be better to use a watch like we do in the // content picker. Then we don't have to worry about setting ids, render models, models, we just set one and let the // watch do all the rest. - $scope.ids = $scope.mediaItems.map(media => $scope.model.config.idType === "udi" ? media.udi : media.id); + selectedIds = vm.mediaItems.map(media => $scope.model.config.idType === "udi" ? media.udi : media.id); sync(); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html index c09d7c7613..22a683fa49 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html @@ -1,11 +1,11 @@
-

-

+

+

-
    -
  • +
      +
    • @@ -46,13 +46,15 @@

  • -
  • - + + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.controller.js index 73def3cc65..5362cb1f10 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.controller.js @@ -18,6 +18,12 @@ function memberGroupPicker($scope, editorService, memberGroupResource){ }); } + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } + } + $scope.openMemberGroupPicker = function() { var memberGroupPicker = { multiPicker: true, @@ -32,6 +38,7 @@ function memberGroupPicker($scope, editorService, memberGroupResource){ if (newGroupIds && newGroupIds.length) { memberGroupResource.getByIds(newGroupIds).then(function (groups) { $scope.renderModel = _.union($scope.renderModel, groups); + setDirty(); editorService.close(); }); } @@ -47,10 +54,13 @@ function memberGroupPicker($scope, editorService, memberGroupResource){ editorService.memberGroupPicker(memberGroupPicker); }; - $scope.remove =function(index){ + // TODO: I don't believe this is used + $scope.remove = function(index){ $scope.renderModel.splice(index, 1); + setDirty(); }; + // TODO: I don't believe this is used $scope.add = function (item) { var currIds = _.map($scope.renderModel, function (i) { return i.id; @@ -58,11 +68,14 @@ function memberGroupPicker($scope, editorService, memberGroupResource){ if (currIds.indexOf(item) < 0) { $scope.renderModel.push({ name: item, id: item, icon: 'icon-users' }); + setDirty(); } }; + // TODO: I don't believe this is used $scope.clear = function() { $scope.renderModel = []; + setDirty(); }; function renderModelIds() { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.html index b1cafafb0d..5a0788149e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergrouppicker/membergrouppicker.html @@ -1,21 +1,22 @@
    - +
    - + + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.controller.js index 6662a86571..2213841ece 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.controller.js @@ -10,6 +10,12 @@ return selected; }; + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } + } + $scope.pickGroup = function() { editorService.memberGroupPicker({ multiPicker: true, @@ -24,6 +30,7 @@ $scope.model.value[group.name] = true; }); }); + setDirty(); editorService.close(); }, close: function () { @@ -34,6 +41,7 @@ $scope.removeGroup = function (group) { $scope.model.value[group] = false; + setDirty(); } } angular.module('umbraco').controller("Umbraco.PropertyEditors.MemberGroupController", memberGroupController); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.html index 2715e11b15..abfa628e90 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/membergroups/membergroups.html @@ -12,4 +12,9 @@ ng-click="pickGroup()"> Add + + + + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js index c3137360e2..315eb18ee4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.controller.js @@ -1,6 +1,6 @@ //this controller simply tells the dialogs service to open a memberPicker window //with a specified callback, this callback will receive an object with a selection on it -function memberPickerController($scope, entityResource, iconHelper, angularHelper, editorService){ +function memberPickerController($scope, entityResource, iconHelper, editorService){ function trim(str, chr) { var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g'); @@ -27,11 +27,16 @@ function memberPickerController($scope, entityResource, iconHelper, angularHelpe } else { $scope.clear(); $scope.add(data); - } - angularHelper.getCurrentForm($scope).$setDirty(); + } } }; + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } + } + //since most of the pre-value config's are used in the dialog options (i.e. maxNumber, minNumber, etc...) we'll merge the // pre-value config on to the dialog options if ($scope.model.config) { @@ -60,6 +65,7 @@ function memberPickerController($scope, entityResource, iconHelper, angularHelpe $scope.remove = function (index) { $scope.renderModel.splice(index, 1); + setDirty(); }; $scope.add = function (item) { @@ -76,7 +82,8 @@ function memberPickerController($scope, entityResource, iconHelper, angularHelpe if (currIds.indexOf(itemId) < 0) { item.icon = iconHelper.convertFromLegacyIcon(item.icon); - $scope.renderModel.push({ name: item.name, id: item.id, udi: item.udi, icon: item.icon}); + $scope.renderModel.push({ name: item.name, id: item.id, udi: item.udi, icon: item.icon }); + setDirty(); } }; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html index 99f7fffba8..4efa7283da 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/memberpicker/memberpicker.html @@ -1,22 +1,23 @@
    - +
    - + + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js index 172f9b2249..cfad66456d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js @@ -1,4 +1,4 @@ -function multiUrlPickerController($scope, angularHelper, localizationService, entityResource, iconHelper, editorService) { +function multiUrlPickerController($scope, localizationService, entityResource, iconHelper, editorService) { var vm = { labels: { @@ -16,8 +16,6 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en $scope.model.value = []; } - var currentForm = angularHelper.getCurrentForm($scope); - $scope.sortableOptions = { axis: "y", containment: "parent", @@ -27,7 +25,7 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en scroll: true, zIndex: 6000, update: function () { - currentForm.$setDirty(); + setDirty(); } }; @@ -66,7 +64,7 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en $scope.remove = function ($index) { $scope.renderModel.splice($index, 1); - currentForm.$setDirty(); + setDirty(); }; $scope.openLinkPicker = function (link, $index) { @@ -122,7 +120,7 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en link.published = true; } - currentForm.$setDirty(); + setDirty(); } editorService.close(); }, @@ -133,6 +131,12 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en editorService.linkPicker(linkPicker); }; + function setDirty() { + if ($scope.multiUrlPickerForm) { + $scope.multiUrlPickerForm.modelValue.$setDirty(); + } + } + function init() { localizationService.localizeMany(["general_recycleBin"]) .then(function (data) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html index 503f4aac9b..12877bff88 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html @@ -18,9 +18,9 @@
    + + diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js index 5d7d37f7bf..68d375360e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js @@ -169,11 +169,14 @@ method: removeAllEntries, isDisabled: true }; + // helper to force the current form into the dirty state function setDirty() { - if ($scope.$parent.$parent.propertyForm) { - $scope.$parent.$parent.propertyForm.$setDirty(); + + if (vm.umbProperty) { + vm.umbProperty.setDirty(); } + }; function addNode(alias) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.controller.js index f5f0f7f2a2..b0c3b88bc6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.controller.js @@ -1,4 +1,4 @@ -function sliderController($scope, angularHelper) { +function sliderController($scope) { let sliderRef = null; @@ -14,7 +14,13 @@ function setModelValue(values) { $scope.model.value = values ? values.toString() : null; - angularHelper.getCurrentForm($scope).$setDirty(); + setDirty(); + } + + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } } $scope.setup = function(slider) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.html index 27c59194c1..567280b306 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.html @@ -1,12 +1,14 @@ 
    -
    - - -
    + +
    + + +
    + +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.controller.js index 217a9c8421..2b0a5326f6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.controller.js @@ -10,6 +10,12 @@ function userPickerController($scope, iconHelper, editorService, overlayService, var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false; + function setDirty() { + if ($scope.modelValueForm) { + $scope.modelValueForm.modelValue.$setDirty(); + } + } + $scope.openUserPicker = function () { var currentSelection = []; @@ -42,7 +48,7 @@ function userPickerController($scope, iconHelper, editorService, overlayService, submit: function () { $scope.renderModel.splice(index, 1); $scope.userName = ''; - + setDirty(); overlayService.close(); }, close: function () { @@ -68,11 +74,13 @@ function userPickerController($scope, iconHelper, editorService, overlayService, if (currIds.indexOf(itemId) < 0) { item.icon = item.icon ? iconHelper.convertFromLegacyIcon(item.icon) : "icon-user"; $scope.renderModel.push({ name: item.name, id: item.id, udi: item.udi, icon: item.icon, avatars: item.avatars }); + setDirty(); } }; $scope.clear = function() { $scope.renderModel = []; + setDirty(); }; var unsubscribe = $scope.$on("formSubmitting", function (ev, args) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.html index 8345317eee..331f5e0a94 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/userpicker/userpicker.html @@ -1,21 +1,22 @@
    -
    - +
    + -
    +
    - + - + + +
    From 2534f99cdba1fe7a34c675783652a97b89ee271f Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska Date: Wed, 14 Apr 2021 16:55:37 +0200 Subject: [PATCH 97/99] Adding new RecycleBin event handlers --- .../Implement/DocumentRepository.cs | 2 +- .../Repositories/Implement/MediaRepository.cs | 2 +- .../Cache/DistributedCacheBinder_Handlers.cs | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index e196a8a13c..a97569d571 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -918,7 +918,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cacheKey = CacheKeys.ContentRecycleBinCacheKey; // always cache either true or false - return cache.GetCacheItem(cacheKey, () => CountChildren(Constants.System.RecycleBinContent) > 0); + return cache.GetCacheItem(cacheKey, () => CountChildren(RecycleBinId) > 0); } #endregion diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index c9001eed31..ac180d54ef 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -377,7 +377,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cacheKey = CacheKeys.MediaRecycleBinCacheKey; // always cache either true or false - return cache.GetCacheItem(cacheKey, () => CountChildren(Constants.System.RecycleBinMedia) > 0); + return cache.GetCacheItem(cacheKey, () => CountChildren(RecycleBinId) > 0); } #endregion diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index 3b2cf3e23d..c3cd53168e 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Core; using Umbraco.Core.Events; using Umbraco.Core.Logging; using Umbraco.Core.Models; @@ -121,6 +122,8 @@ namespace Umbraco.Web.Cache // bind to media events - handles all media changes Bind(() => MediaService.TreeChanged += MediaService_TreeChanged, () => MediaService.TreeChanged -= MediaService_TreeChanged); + Bind(() => MediaService.EmptiedRecycleBin += MediaService_EmptiedRecycleBin, + () => MediaService.EmptiedRecycleBin -= MediaService_EmptiedRecycleBin); // bind to content events Bind(() => ContentService.Saved += ContentService_Saved, // needed for permissions @@ -129,6 +132,8 @@ namespace Umbraco.Web.Cache () => ContentService.Copied -= ContentService_Copied); Bind(() => ContentService.TreeChanged += ContentService_TreeChanged,// handles all content changes () => ContentService.TreeChanged -= ContentService_TreeChanged); + Bind(() => ContentService.EmptiedRecycleBin += ContentService_EmptiedRecycleBin, + () => ContentService.EmptiedRecycleBin -= ContentService_EmptiedRecycleBin); // TreeChanged should also deal with this //Bind(() => ContentService.SavedBlueprint += ContentService_SavedBlueprint, @@ -200,7 +205,12 @@ namespace Umbraco.Web.Cache private void ContentService_Deleted(IContentService sender, DeleteEventArgs e) { } private void ContentService_Moved(IContentService sender, MoveEventArgs e) { } private void ContentService_Trashed(IContentService sender, MoveEventArgs e) { } - private void ContentService_EmptiedRecycleBin(IContentService sender, RecycleBinEventArgs e) { } + + private void ContentService_EmptiedRecycleBin(IContentService sender, RecycleBinEventArgs e) + { + var payloads = new[] { new ContentCacheRefresher.JsonPayload(Constants.System.RecycleBinContent, null, TreeChangeTypes.RefreshNode) }; + _distributedCache.RefreshByPayload(ContentCacheRefresher.UniqueId, payloads); + } private void ContentService_Published(IContentService sender, PublishEventArgs e) { } private void ContentService_Unpublished(IContentService sender, PublishEventArgs e) { } @@ -413,7 +423,12 @@ namespace Umbraco.Web.Cache private void MediaService_Deleted(IMediaService sender, DeleteEventArgs e) { } private void MediaService_Moved(IMediaService sender, MoveEventArgs e) { } private void MediaService_Trashed(IMediaService sender, MoveEventArgs e) { } - private void MediaService_EmptiedRecycleBin(IMediaService sender, RecycleBinEventArgs e) { } + + private void MediaService_EmptiedRecycleBin(IMediaService sender, RecycleBinEventArgs e) + { + var payloads = new[] { new MediaCacheRefresher.JsonPayload(Constants.System.RecycleBinMedia, null, TreeChangeTypes.RefreshNode) }; + _distributedCache.RefreshByPayload(MediaCacheRefresher.UniqueId, payloads); + } #endregion From 038afa566495e251a46f97ef8897701cb56f1b2d Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska Date: Thu, 15 Apr 2021 09:00:58 +0200 Subject: [PATCH 98/99] Fixing tests after adding the new event related to EmptiedRecycleBin --- .../Integration/ContentEventsTests.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Tests/Integration/ContentEventsTests.cs b/src/Umbraco.Tests/Integration/ContentEventsTests.cs index af8ebe626e..fdf0b98705 100644 --- a/src/Umbraco.Tests/Integration/ContentEventsTests.cs +++ b/src/Umbraco.Tests/Integration/ContentEventsTests.cs @@ -1097,11 +1097,12 @@ namespace Umbraco.Tests.Integration ResetEvents(); ServiceContext.ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); - Assert.AreEqual(2, _msgCount); - Assert.AreEqual(2, _events.Count); + Assert.AreEqual(3, _msgCount); + Assert.AreEqual(3, _events.Count); var i = 0; var m = 0; - Assert.AreEqual($"{m:000}: ContentRepository/Remove/{content.Id}", _events[i++].ToString()); + Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content.Id}", _events[i++].ToString()); + Assert.AreEqual($"{m:000}: ContentCacheRefresher/RefreshNode/{Constants.System.RecycleBinContent}", _events[i++].ToString()); m++; Assert.AreEqual($"{m:000}: ContentCacheRefresher/Remove/{content.Id}", _events[i].ToString()); } @@ -1122,12 +1123,14 @@ namespace Umbraco.Tests.Integration ResetEvents(); ServiceContext.ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); - Assert.AreEqual(3, _msgCount); - Assert.AreEqual(4, _events.Count); + Assert.AreEqual(4, _msgCount); + Assert.AreEqual(5, _events.Count); var i = 0; var m = 0; Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content1.Id}", _events[i++].ToString()); - Assert.AreEqual($"{m:000}: ContentRepository/Remove/{content2.Id}", _events[i++].ToString()); + Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content2.Id}", _events[i++].ToString()); + + Assert.AreEqual($"{m:000}: ContentCacheRefresher/RefreshNode/{Constants.System.RecycleBinContent}", _events[i++].ToString()); m++; Assert.AreEqual($"{m:000}: ContentCacheRefresher/Remove/{content1.Id}", _events[i++].ToString()); Assert.AreEqual($"{m:000}: ContentCacheRefresher/Remove/{content2.Id}", _events[i].ToString()); @@ -1153,8 +1156,8 @@ namespace Umbraco.Tests.Integration ServiceContext.ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); - Assert.AreEqual(14, _msgCount); - Assert.AreEqual(14, _events.Count); + Assert.AreEqual(15, _msgCount); + Assert.AreEqual(15, _events.Count); var i = 0; var m = 0; @@ -1170,7 +1173,9 @@ namespace Umbraco.Tests.Integration Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content2C[1].Id}", _events[i++].ToString()); Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content2C[0].Id}", _events[i++].ToString()); Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content1C[0].Id}", _events[i++].ToString()); - Assert.AreEqual($"{m:000}: ContentRepository/Remove/{content1.Id}", _events[i++].ToString()); + Assert.AreEqual($"{m++:000}: ContentRepository/Remove/{content1.Id}", _events[i++].ToString()); + + Assert.AreEqual($"{m:000}: ContentCacheRefresher/RefreshNode/{Constants.System.RecycleBinContent}", _events[i++].ToString()); m++; Assert.AreEqual($"{m:000}: ContentCacheRefresher/Remove/{content1.Id}", _events[i].ToString()); } From 7d09de6d0fdc3ccbc48aa3b15afe5d6d883ae86e Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska Date: Thu, 15 Apr 2021 10:33:21 +0200 Subject: [PATCH 99/99] Removing unused param --- src/Umbraco.Web/Trees/ContentTreeControllerBase.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index f602ea30f3..6ad133c359 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -26,11 +26,9 @@ namespace Umbraco.Web.Trees { public abstract class ContentTreeControllerBase : TreeController { - private readonly AppCaches _appCaches; protected ContentTreeControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper) : base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper) { - _appCaches = appCaches; } protected ContentTreeControllerBase()